how to set the color for different series

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
vivian

how to set the color for different series

Post by vivian » Wed Feb 27, 2002 5:06 pm

how to set the color in the chart to represent different series other than the default color set?
the default is: series 1: red 2: blue 3: green 4: yellow. can i modify it using the API?

Reji Mani

Re: how to set the color for different series

Post by Reji Mani » Thu Feb 28, 2002 1:29 am

Hi Vivian,

Hope this will help you,

Paint[] paintArr = {Color.cyan,Color.pink....};//user defined paint array
Plot plot = chart.getPlot();
plot.setSeriesPaint(paintArr);

regards,

Reji

Locked