From 2a5b0757513cd3d385ee205322e28ca56851465a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Benitte?= Date: Thu, 10 Aug 2017 13:46:14 +0900 Subject: [PATCH] feat(colors): use nivo default colors id instead of value --- package.json | 2 +- src/components/charts/bubble/BubbleProps.js | 2 +- src/components/charts/chord/Chord.js | 2 +- src/components/charts/treemap/TreeMapProps.js | 2 +- stories/charts/stream.stories.js | 49 ------------------- 5 files changed, 4 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index d9e6627b8..96361c960 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nivo", - "version": "0.9.0", + "version": "0.10.0", "licenses": [ { "type": "MIT", diff --git a/src/components/charts/bubble/BubbleProps.js b/src/components/charts/bubble/BubbleProps.js index 2426c5c4a..fc4a9599b 100644 --- a/src/components/charts/bubble/BubbleProps.js +++ b/src/components/charts/bubble/BubbleProps.js @@ -71,7 +71,7 @@ export const bubbleDefaultProps = { padding: 1, // theming - colors: Nivo.defaults.colorRange, + colors: 'nivo', colorBy: 'depth', // placeholders diff --git a/src/components/charts/chord/Chord.js b/src/components/charts/chord/Chord.js index f48be199a..017efcfe8 100644 --- a/src/components/charts/chord/Chord.js +++ b/src/components/charts/chord/Chord.js @@ -134,7 +134,7 @@ Chord.defaultProps = { arcBorderWidth: 1, // colors - colors: Nivo.defaults.colorRange, + colors: 'nivo', } export default Chord diff --git a/src/components/charts/treemap/TreeMapProps.js b/src/components/charts/treemap/TreeMapProps.js index b6107a0d6..cd73e3a7f 100644 --- a/src/components/charts/treemap/TreeMapProps.js +++ b/src/components/charts/treemap/TreeMapProps.js @@ -89,6 +89,6 @@ export const treeMapDefaultProps = { motionStiffness: 120, motionDamping: 10, - colors: Nivo.defaults.colorRange, + colors: 'nivo', colorBy: 'depth', } diff --git a/stories/charts/stream.stories.js b/stories/charts/stream.stories.js index cbba5aae3..7716b959d 100644 --- a/stories/charts/stream.stories.js +++ b/stories/charts/stream.stories.js @@ -51,52 +51,3 @@ stories.add('regular stacked chart', () => ) stories.add('custom curve', () => ) - -/* -stories.add('stacked', () => - -) - -stories.add('with custom curve', () => - -) - -stories.add('with markers label', () => - -) - -stories.add('abusing markers label', () => - -) - -stories.add('using data colors', () => - d.color} - enableMarkersLabel={true} - markersSize={10} - markersBorderColor="#fff" - markersBorderWidth={2} - /> -) -*/