Background colo wont change

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
venkatesh20
Posts: 2
Joined: Wed May 23, 2012 12:01 pm
antibot: No, of course not.

Background colo wont change

Post by venkatesh20 » Wed May 23, 2012 12:39 pm

Code: Select all

convergencePlot = new CombinedDomainXYPlot(objPlot.getDomainAxis());
convergencePlot.setGap(12D);
		convergencePlot.setBackgroundPaint(Color.white);
		convergencePlot.setDomainGridlinePaint(Color.gray);
		convergencePlot.setRangeGridlinePaint(Color.gray);
		convergencePlot.setDomainGridlinesVisible(true);
		convergencePlot.setDomainPannable(true);

panel = new ChartPanel(jfreechart);
return panel;

Q1: This is my code, i am trying to change the background color of the plot to gray and gridlines to gray. But it just ignores the color i suppy and always the background color is gray and gridline color is white.

Q2: In case of combinedXYplot is it possible to set the color for each line manually? when i have more than 3 plots, i really get very light colors which are hard to see.

Thanks in advance

Locked