It seems as if there might be a bug with the new interval markers. When the marker is configured for a range that goes beyond the range of the axis it draws itself beyond the plot.
For example say you have a marker configured for 0-100 but the axis is only showing 0-50. In this case there marker will continue to draw past the end of the axis and plot.
I've noticed this with a category plots but I'm assuming the same thing might happen with xy plots.
I guess I can think of 2 possible solutions -
1) Have the marker affect the autorange of the axis so that it is always completly visible
2) Only draw the portion of the marker that is visible based on the current axis range.
It seems that 2) should be of higher priority because you can always control the axis range manually and therefore take steps to achieve 1) within your own code.
RCS file: /cvsroot/jfreechart/jfreechart/source/org/jfree/chart/plot/CategoryPlot.java,v
retrieving revision 188.8.131.52
diff -u -r184.108.40.206 CategoryPlot.java
--- source/org/jfree/chart/plot/CategoryPlot.java 22 Nov 2006 11:36:12 -0000 220.127.116.11
+++ source/org/jfree/chart/plot/CategoryPlot.java 29 Nov 2006 12:30:58 -0000
@@ -140,6 +140,8 @@
* getCategoriesForAxis() methods (DG);
* 22-Nov-2006 : Fire PlotChangeEvent from setColumnRenderingOrder() and
* setRowRenderingOrder() (DG);
+ * 29-Nov-2006 : Fix for bug 1605207 (IntervalMarker exceeds bounds of data
+ * area) (DG);
@@ -2364,6 +2366,10 @@
Map axisStateMap = drawAxes(g2, area, dataArea, state);
+ // don't let anyone draw outside the data area
+ Shape savedClip = g2.getClip();
AxisState rangeAxisState = (AxisState) axisStateMap.get(getRangeAxis());
@@ -2387,8 +2393,7 @@
// now render data items...
boolean foundData = false;
- Shape savedClip = g2.getClip();
// set up the alpha-transparency...
Composite originalComposite = g2.getComposite();
david.gilbert wrote:Thanks for the report - I can reproduce the problem, so finding a fix shouldn't be too hard. I only see the problem with the CategoryPlot, not the XYPlot.
// don't let anyone draw outside the data area
david.gilbert wrote:I'm pretty sure this is fixed in CVS (on the STABLE_1-0-0 branch), just in the last day or two. I'm out of time for today, but I'll try to double check tomorrow that this really is fixed.
Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 8 guests