Changing the line colour of a timeseries chart??

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
am
Posts: 22
Joined: Mon May 09, 2005 4:56 pm

Changing the line colour of a timeseries chart??

Post by am » Tue May 17, 2005 12:01 pm

Is there any way of specify what colour you want certain line to be?

uvoigt
Posts: 168
Joined: Mon Aug 23, 2004 10:50 am
Location: Germany

Post by uvoigt » Tue May 17, 2005 3:36 pm

Hi,

you can use the renderer of the line to change its color.
The following example changes the color of the first series of the first dataset:

Code: Select all

XYPlot plot;
// ... create the plot
XYItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.RED);
Please search the forum before posting questions. Most of your questions already have been answered.

Ulrich

Guest

THANKS

Post by Guest » Tue May 17, 2005 3:54 pm

Cheers Ulrich, that helps me alot.. was just having trouble finding what i required thats why i posted it on the forumn!!!

Thanks Again

8)

Locked