Hello, I am currently working on the last data visualization project: visualize data with a tree map. My progress can be found here .
I have to give my treemap cells a “fill” value based on their category(Wii, PS4 etc.)
I know I can do this manually with a lot of typing, but for my last project I wanted to do this “right” by using scale, however I keep bumping into problems.
I have tried:
const ordinalScale=d3.scaleOrdinal().domain(consoles).range(consoleColors); "or" const ordinalScale=d3.scale.ordinal().domain(consoles).range(consoleColors); "and even" const ordinalScale=d3.scaleOrdinal(d3.schemeCategory10)
I really tried googling first but all these methods some to work on other peoples code but not mine.
Any advice would be more than welcome.