1

Good day!

I am very new to working with D3 in React. I want to make a very simple continuous colorbar legend in my React app, that basically looks like this:

Colorbar

I have tried to follow this example, but I get the following error: Module not found: Can't resolve '@d3/color-legend' in 'D:\Work\code\chart\src\components'. Doing npm install d3-color-legend does not work. As I understand, the code will only work in Observable. But I would really like to use the legend in my app.

How do I fix this?

Any and all help is greatly appreciated, thanks!

CarlaVdB
  • 165
  • 11

0 Answers0