As i understand, to set a different color for different series is using this :
Code: Select all
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.blue);
Please advise ..

Code: Select all
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setSeriesPaint(0, Color.blue);
Code: Select all
/* ---------------
* GanttDemo2.java
* ---------------
* (C) Copyright 2003-2005, by Object Refinery Limited.
*
*/
REMOVED
The demo source code is available to download when you purchase the JFreeChart Developer Guide. You are not permitted to redistribute the demo code, so please don't post it in the forum or anywhere else.moonblade wrote:I'm pasting the source code, it's already available in the demo GanttDemo2.java.
Yes, you'll need to modify the renderer. Start by looking in the drawTasks() method. All renderers inherit the ability to set the paint "per item", but in this case the sub-tasks are "sub items"...so you'll need your own data structures to specify the different colors per sub item.moonblade wrote:Do i have to provide my own implementation of the renderer class, and if it is so, which method should i play with ? Please help