Skip to content

Commit

Permalink
feat(colors): use nivo default colors id instead of value
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Aug 10, 2017
1 parent 751d442 commit 2a5b075
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 53 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nivo",
"version": "0.9.0",
"version": "0.10.0",
"licenses": [
{
"type": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/bubble/BubbleProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const bubbleDefaultProps = {
padding: 1,

// theming
colors: Nivo.defaults.colorRange,
colors: 'nivo',
colorBy: 'depth',

// placeholders
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/chord/Chord.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Chord.defaultProps = {
arcBorderWidth: 1,

// colors
colors: Nivo.defaults.colorRange,
colors: 'nivo',
}

export default Chord
2 changes: 1 addition & 1 deletion src/components/charts/treemap/TreeMapProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ export const treeMapDefaultProps = {
motionStiffness: 120,
motionDamping: 10,

colors: Nivo.defaults.colorRange,
colors: 'nivo',
colorBy: 'depth',
}
49 changes: 0 additions & 49 deletions stories/charts/stream.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,52 +51,3 @@ stories.add('regular stacked chart', () =>
)

stories.add('custom curve', () => <Stream {...commonProperties} curve="step" />)

/*
stories.add('stacked', () =>
<Line {...commonProperties} stacked={true} curve={select('curve', curveOptions, 'linear')} />
)
stories.add('with custom curve', () =>
<Line {...commonProperties} stacked={true} curve="monotoneX" />
)
stories.add('with markers label', () =>
<Line
{...commonProperties}
stacked={boolean('stacked', true)}
curve={select('curve', curveOptions, 'linear')}
enableMarkersLabel={true}
markersSize={10}
markersBorderColor="#fff"
markersBorderWidth={2}
/>
)
stories.add('abusing markers label', () =>
<Line
{...commonProperties}
stacked={boolean('stacked', true)}
curve={select('curve', curveOptions, 'monotoneX')}
enableMarkersLabel={true}
markersSize={26}
markersLabelYOffset={3}
axisLeft={{
tickSize: 10,
}}
/>
)
stories.add('using data colors', () =>
<Line
{...commonProperties}
stacked={boolean('stacked', true)}
curve={select('curve', curveOptions, 'linear')}
colorBy={d => d.color}
enableMarkersLabel={true}
markersSize={10}
markersBorderColor="#fff"
markersBorderWidth={2}
/>
)
*/

0 comments on commit 2a5b075

Please sign in to comment.