Color of Lines

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nitin
Posts: 16
Joined: Wed Dec 03, 2003 10:21 am
Location: Pune

Color of Lines

Post by nitin » Wed Dec 03, 2003 10:26 am

Hi,
I am using XYSeriesCollection and added three XYSeries
I want to change the colors of these series
How can I do it?
Plz help

mleggio
Posts: 1
Joined: Thu Dec 11, 2003 4:25 pm

Post by mleggio » Thu Dec 11, 2003 4:28 pm

I have the same problem. Please, help us

nitin
Posts: 16
Joined: Wed Dec 03, 2003 10:21 am
Location: Pune

Post by nitin » Fri Dec 12, 2003 6:28 am

Hey I have solved the problem
U can use
StandardXYItemRenderer ren = new StandardXYItemRenderer ();
ren.setSeriesPaint(0, new Color(0, 0, 0));
ren.setSeriesPaint(1, new Color(255, 0, 0));
ren.setSeriesPaint(2, new Color(0, 255, 0));
ren.setSeriesPaint(3, new Color(0, 0, 255));
and then set ren in xyplot

Locked