plouc / nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
https://nivo.rocks
MIT License
13.2k stars 1.03k forks source link

Colors Documentation Page Doesn't Explain Custom Colors #2629

Open jwalkerinterpres opened 3 months ago

jwalkerinterpres commented 3 months ago

Describe/explain the bug Your color customization page is missing one tiny but critical detail, and it makes it seem as if Nivo can only use pre-defined colors (not custom ones).

One currently has to go all the way to Stack Overflow, where a 20+ vote answer explains how simple custom colors are (they're just arrays of color codes).

To Reproduce

Steps to reproduce the behavior:

  1. Find someone who doesn't know Nivo
  2. Ask them to find how to create a chart with custom colors in the docs
  3. (Watch them read and re-read https://nivo.rocks/guides/colors/ but not find an answer)

Expected behavior

It would only take a tiny addition to the docs to explain this critical detail, eg.

Custom Colors If you want to use your own color set, simply provide an array of color hex vaues instead of a color scheme, eg. colors={['#111111', '#222222']}

tarjep commented 2 months ago

Been struggling with the same thing. This information is quite crucial to allow for custom colors.

kamranayub commented 3 days ago

Was just looking for this since I'm trying to use a minimalist style and a single datum with my primary site color 👍