3dbarchart with different colors

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

3dbarchart with different colors

Post by torsten » Fri Oct 11, 2002 4:39 pm

hi,
i try to draw a vertical 3d bar chart where the color of the first bar is e.g green and all other bars have e.g. the color blue.
So I tried this:
VerticalBarRenderer3D renderer = null;
renderer = new VerticalBarRenderer3D();
renderer.setCategoriesPaint(new Paint[] { Color.green, Color.blue, Color.blue, Color.blue,Color.blue, Color.blue, Color.blue, Color.blue });
....
VerticalCategoryPlot plot = null;
plot = new VerticalCategoryPlot(data, xAxis, yAxis, renderer);
....
JFreeChart chart = new JFreeChart(title, titleFont, plot, true);
...
I tried this on a chart with 2d-bars and there it works.

Can anybody help?
Thanks a lot!
Torsten

Rich Unger

Re: 3dbarchart with different colors

Post by Rich Unger » Fri Oct 11, 2002 10:54 pm

It's only implemented on the 2d vertical renderer in 0.9.3. When 0.9.4 is released, the others will work. If you want to patch the 0.9.3 sources yourself in the meantime, it's a pretty simple patch:

http://www.object-refinery.com/phorum-3 ... 442&t=4442

torsten

Re: 3dbarchart with different colors

Post by torsten » Mon Oct 14, 2002 1:57 pm

Thanks, Thanks, Thanks!
It works fine! Great!
Next time I'll try the forum search function before posting a question. ;)

Torsten.

Locked