Get Color with getSeriesPaint returns null

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rahan
Posts: 12
Joined: Fri Jul 08, 2005 3:30 pm

Get Color with getSeriesPaint returns null

Post by Rahan » Thu Jul 24, 2008 2:33 pm

Hi

i have a Timeserieschart and i will change the color with

Code: Select all

renderer.setSeriesPaint(series, color);
but before i will save the old color with

Code: Select all

renderer.getSeriesPaint(series);
but i become a null object.

I read here in the forum getSeriesPaint

that the colours are generally assigned when the chart is first drawn.

But i create a chart and open the chart in a Frame. I see the color, but

Code: Select all

renderer.getSeriesPaint(series);
returns still a null object.

How can i get the color?

Locked