Set same color for different series

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jacopo
Posts: 1
Joined: Mon Mar 19, 2012 1:40 am
antibot: No, of course not.

Set same color for different series

Post by jacopo » Mon Mar 19, 2012 1:46 am

Hi all,
I have two XYSeries that belong to a same dataset. First series has to show shapes only, while second series has to show lines only. Both must have the same color. Is there a way to do it ?

itsmaddy
Posts: 10
Joined: Wed Dec 15, 2010 1:05 pm
antibot: No, of course not.

Re: Set same color for different series

Post by itsmaddy » Mon Mar 19, 2012 8:09 am

use renderer to set the color

renderer.setSeriesPaint(seriesIndex, Color.black);
plot.setRenderer(seriesIndex, renderer);

Locked