Colors of Bar Graph

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
raldy

Colors of Bar Graph

Post by raldy » Tue Sep 10, 2002 10:30 am

Hi! I just created a bar graph, the problem is my data needs plenty different colors, but since the data is plenty, the colors are now repeating, is there a way to specify the colors for each of the data?

Thanks

Harald Faber

Re: Colors of Bar Graph

Post by Harald Faber » Wed Sep 11, 2002 8:50 am

Hm, wasn't it

public void setSeriesPaint(Paint[] paint)

in the Plot class?

nivedeeta

Re: Colors of Bar Graph

Post by nivedeeta » Wed Sep 11, 2002 9:57 am

use this :

plot.setSeriesPaint(new Paint[] { Color.red, Color.blue, Color.cyan,Color.magenta,Color.green,Color.black });

Mikio Kishi

Re: Colors of Bar Graph

Post by Mikio Kishi » Thu Sep 12, 2002 2:44 pm

Hi all,

I have one question related the above.
Are there any method(algorithm) which can set the bar colors
in a random order according to the number of series ?
I want to set as variety of colors as possible.

Sincerely,

Mikio Kishi.

Locked