Skip to content

Commit

Permalink
fix(vx-demo): use color scale from d3-scale-chromatic
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-ox committed Jan 2, 2020
1 parent 3d68b00 commit b2238d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/vx-demo/src/components/tiles/chord.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Arc } from '@vx/shape';
import { Group } from '@vx/group';
import { Chord, Ribbon } from '@vx/chord';
import { scaleOrdinal } from '@vx/scale';
import { schemeDark2 } from 'd3-scale-chromatic';

const bg = '#e4e3d8';

Expand All @@ -19,7 +20,7 @@ function descending(a, b) {

const color = scaleOrdinal({
domain: [1, 2, 3, 4],
range: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666'],
range: schemeDark2,
});

export default ({ width, height, centerSize = 20, events = false }) => {
Expand Down
3 changes: 2 additions & 1 deletion packages/vx-demo/src/pages/chord.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { Arc } from '@vx/shape';
import { Group } from '@vx/group';
import { Chord, Ribbon } from '@vx/chord';
import { scaleOrdinal } from '@vx/scale';
import { schemeDark2 } from 'd3-scale-chromatic';
const bg = '#e4e3d8';
Expand All @@ -35,7 +36,7 @@ function descending(a, b) {
const color = scaleOrdinal({
domain: [1, 2, 3, 4],
range: ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666'],
range: schemeDark2,
});
export default ({ width, height, centerSize = 20, events = false }) => {
Expand Down

0 comments on commit b2238d0

Please sign in to comment.