I am trying to change the colors of different groups of the nvd3 scatter chart here but am unable to understand how to do so. I would like to change the colors of the 4 series in the example to orange, green, yellow, red.
nv.addGraph(function() {
chart = nv.models.scatterChart()
.showDistX(true)
.showDistY(true)
.color( d3.scale.category10().range() ); // tried to change to green, orange here but it did not work
};
I tried
.color( d3.rgb("green"), d3.rgb("orange") );
but then the plot did not even appear. I am new to javascript. So please excuse my mistake if it is too simple.
Edit
I also would like to know how to choose the color based on RGB values.
Thanks
green
ororange
? – Comorin