I was used following jars to develop jfreecharts in my application.
1) jcommon-1.0.17.jar
2) jfreechart-1.0.14.jar
But the only problem with the same bar color, when the multiple bars having the same values.
Example:
Bar1-10, Bar2-10 , Bar3-10
In the above case three bars having the value 10 .Then those 3 bars showing same color even though setting different color individually for the each bar. But working fine if the bar values differ.
Code: Select all
LayeredBarRenderer renderer = new LayeredBarRenderer();
renderer.setSeriesPaint(0, new Color(16, 78, 139));
renderer.setSeriesPaint(1, new Color(192, 192, 192));
renderer.setSeriesPaint(2, new Color(108, 166, 205));
renderer.setSeriesPaint(3, new Color(67, 205, 128));