Java Chart Designer API: Setting the color of the bars or lines(Read 4613 times)
Hello NG,
I'm using the Java Chart Designer API for my Java Servlets and it 's important for me to set the color of the different bars and lines in the chart.

Can anybody help me?

Regard

Jasper



Hello Jasper,
I have replied you by email. If you haven't received it please find the quotation of my reply below.
Quote
Any component of the chart has its own attribute (color or gradient).

For example you can change the color of the column using the following code:

SeriesModel m = chart.getSeriesModel(1);  // SeriesModel of the first column

m.getGradientModel().setColor1(Color.BLUE));

Here you can also change the second color of gradient, set the number of cycles and set the direction of gradient.

Thank you.



 

Sitemap 1 2 3 4 5