I am trying to change the colors of the different groups of the nvd3 scatterplot here , but I cannot figure out how to do this. I would like to change the colors of series 4 in the example to orange, green, yellow, red.
nv.addGraph(function() {
chart = nv.models.scatterChart()
.showDistX(true)
.showDistY(true)
.color( d3.scale.category10().range() );
};
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 this is too easy.
Edit
I would also like to know how to choose a color based on RGB values.
thank
source
share