Extend BarRenderer and override drawItem. Set color for each item before calling super.drawItem.
-- pady
Search found 7 matches
- Fri Jun 10, 2005 8:53 pm
- Forum: JFreeChart
- Topic: Change the Category Color of a barchart
- Replies: 2
- Views: 4988
I created only one category, added all the tasks, created a custom bar renderer ( which set a color based on the item label ) and set this renderer to the plot. Here is the sample code for the renderer ( adapt this code to BarRenderer ): import org.jfree.chart.renderer.category.*; import java.awt.*;...
- Fri Jun 10, 2005 8:50 pm
- Forum: JFreeChart
- Topic: How to get chart like this
- Replies: 5
- Views: 8801
- Thu Jun 09, 2005 8:39 pm
- Forum: JFreeChart
- Topic: Bar Chart label issue
- Replies: 3
- Views: 6533
I created only one category, added all the tasks, created a custom bar renderer ( which set a color based on the item label ) and set this renderer to the plot. Here is the sample code for the renderer ( this is for GanttRenderer but the same code should work for BarRenderer also ). import org.jfree...
- Thu Jun 09, 2005 6:40 pm
- Forum: JFreeChart
- Topic: Added support for individual tick label font and paint...
- Replies: 2
- Views: 3983
Posted in SourceForge...
Posted in Sourcefoge.
Thanks
-- pady
Thanks
-- pady
- Thu Jun 09, 2005 1:13 pm
- Forum: JFreeChart
- Topic: Added support for individual tick label font and paint...
- Replies: 2
- Views: 3983
Added support for individual tick label font and paint...
I have extended the CategoryAxis class to add support to setting font and paint to individual tick labels. The new methods are setTickLabelFont(Comparable category, Font font) setTickLabelPaint(Comparable category, Paint paint) If no font or paint is found for the category, the default font/paint is...
- Tue Jun 07, 2005 8:36 pm
- Forum: JFreeChart
- Topic: Annotation for 2 or more tasks in bar chart...
- Replies: 0
- Views: 1929
Annotation for 2 or more tasks in bar chart...
I would like to draw a box around a couple of bars in a bar chart and add a note ( like one can do in a UML tool or even in Word ). I know one can add annotations for a sinle item. Can an annotation be made to point to a group of items ?