From: <mu...@us...> - 2009-03-28 04:35:38
|
Revision: 1920 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=1920&view=rev Author: mungady Date: 2009-03-28 04:35:15 +0000 (Sat, 28 Mar 2009) Log Message: ----------- 2009-03-28 David Gilbert <dav...@ob...> * source/org/jfree/renderer/xy/AbstractXYItemRenderer.java (findRangeBounds): Handle case where plot is null. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/ChangeLog branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java Modified: branches/jfreechart-1.0.x-branch/ChangeLog =================================================================== --- branches/jfreechart-1.0.x-branch/ChangeLog 2009-03-27 16:25:18 UTC (rev 1919) +++ branches/jfreechart-1.0.x-branch/ChangeLog 2009-03-28 04:35:15 UTC (rev 1920) @@ -1,3 +1,8 @@ +2009-03-28 David Gilbert <dav...@ob...> + + * source/org/jfree/renderer/xy/AbstractXYItemRenderer.java + (findRangeBounds): Handle case where plot is null. + 2009-03-27 David Gilbert <dav...@ob...> * source/org/jfree/renderer/xy/YIntervalRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java 2009-03-27 16:25:18 UTC (rev 1919) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java 2009-03-28 04:35:15 UTC (rev 1920) @@ -811,16 +811,21 @@ visibleSeriesKeys.add(dataset.getSeriesKey(s)); } } - ValueAxis xAxis = null; - int index = plot.getIndexOf(this); - if (index >= 0) { - xAxis = plot.getDomainAxisForDataset(index); - } + // the bounds should be calculated using just the items within + // the current range of the x-axis...if there is one Range xRange = null; - if (xAxis != null) { - xRange = xAxis.getRange(); + XYPlot p = getPlot(); + if (p != null) { + ValueAxis xAxis = null; + int index = p.getIndexOf(this); + if (index >= 0) { + xAxis = plot.getDomainAxisForDataset(index); + } + if (xAxis != null) { + xRange = xAxis.getRange(); + } } - else { + if (xRange == null) { xRange = new Range(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |