question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supplying function to colorBy for custom colour broken in v0.56.0

See original GitHub issue

In 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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
plouccommented, Apr 19, 2019

Yes, the API changed, now the custom coloring function can be passed to colors instead of colorBy.

0reactions
zvictorcommented, Aug 22, 2022

You can have a look at the SwarmPlot colors documentation on https://nivo.rocks/swarmplot

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 😅

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found