Skip to content

Commit

Permalink
fix(scatterplot): fix wrong legend item color in ScatterPlotCanvas (#372
Browse files Browse the repository at this point in the history
)

* Fix wrong legend item color in ScatterPlotCanvas

* Remove itemTextColor from renderLegendToCanvas param

* Change default colorBy prop to 'serie.id' not 'id' in website
  • Loading branch information
AhyoungRyu authored and Raphaël Benitte committed Dec 10, 2018
1 parent b40d620 commit 155fdfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/scatterplot/src/ScatterPlotCanvas.js
Expand Up @@ -216,7 +216,7 @@ class ScatterPlotCanvas extends Component {
const legendData = data.map(serie => ({
id: serie.id,
label: serie.id,
color: getColor(serie),
color: getColor({ serie }),
}))

legends.forEach(legend => {
Expand Down
Expand Up @@ -47,7 +47,7 @@ export default class ScatterPlotCanvas extends Component {
pixelRatio: window && window.devicePixelRatio ? window.devicePixelRatio : 1,

colors: 'nivo',
colorBy: 'id',
colorBy: 'serie.id',

symbolSize: 4,
symbolShape: 'circle',
Expand Down

0 comments on commit 155fdfa

Please sign in to comment.