Supplying function to colorBy for custom colour broken in v0.56.0
See original GitHub issueIn v0.55.0 I could provide a function for colorBy like this:
colorBy: ({ id, data })=> data[`${id}_MyColourInData`]
which would assign a custom colour from the data to a bar in the bar and line charts.
In 0.56.0 it seems to be ignored and assigns the Nivo colour scheme instead.
This affects Line, Bar and maybe other chart types
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Custom Data Colors using Function
Solved: Hello, I am trying to set custom Data Colors for a bar graph based on their values. I would like to visual...
Read more >Questions API Release Log - Learnosity Reference
Fixed a bug where isExpanded math scoring method did not properly score the term ... This enables users to customize the focus state...
Read more >Processing
Color 1: Color by Numbers. Color 2: Components. Control 1: Decisions. Control 2: Repetition. Data 1: Variables. Data 2: Text. Data 3: Conversion,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, the API changed, now the custom coloring function can be passed to
colors
instead ofcolorBy
.Only a few charts support
colorBy
? I can’t make it work with @nivo/scatterplot 🥹I was hoping to replicate this Recharts effect in which the element changes color on hover. But I can’t even change its color in static mode, let alone while hovering 😅