Hi,
I know that the Plot clips the dataArea to ensure that the renderers stay within the bounds.
I want to display my item labels next to the bars of a bar chart, that is outside the bars.
How/Where can I specify the required insets such that the renderer draws the item labels within the required bounds, but outside the bars?
Thanks a lot!
Plot Area Clip
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Plot Area Clip
The position of the item labels can be defined by using a suitable instance of org.jfree.chart.labels.ItemLabelPosition. In order to allow a rendering of the item labels outside the data area, you will have to override the drawItemLabel-Method, which is defined in both AbstractXYItemRenderer and AbstractCategoryItemRenderer, and manipulate the Clip of the Graphics2D instance.
Re: Plot Area Clip
I feared as much. Many of the required attributes in the draw methods are private, which make a simple override to the clip a little bit more difficult.
Thanks for the reply, I'll try how I can override the method.
Thanks for the reply, I'll try how I can override the method.