You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a scenario where clicking outside the data plot area (in the legend area, axis labels area, etc) while using a LogAxis can result in an IllegalArgumentException. After this occurs the chart is then essentially non-interactive and does not respond to user input such as drag to zoom.
Stack Trace:
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: A positive range length is required: Range[0.05449587578346141,0.05449587578346141]
at org.jfree.chart.axis.ValueAxis.setRange(ValueAxis.java:1278)
at org.jfree.chart.axis.ValueAxis.setRange(ValueAxis.java:1256)
at org.jfree.chart.axis.LogAxis.zoomRange(LogAxis.java:953)
at org.jfree.chart.plot.XYPlot.zoomDomainAxes(XYPlot.java:5119)
at org.jfree.chart.fx.interaction.ZoomHandlerFX.handleMouseReleased(ZoomHandlerFX.java:234)
at org.jfree.chart.fx.ChartCanvas.handleMouseReleased(ChartCanvas.java:648)
at org.jfree.chart.fx.ChartCanvas.lambda$new$6(ChartCanvas.java:196)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:381)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$353(GlassViewEventHandler.java:417)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:416)
at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
at com.sun.glass.ui.View.notifyMouse(View.java:937)
Complete self contained example:
/** * Click in the axis label area to see IllegalArgumentException followed by erratic behavior */publicclassIllegalArgumentBugextendsApplication
{
publicstaticvoidmain(String[] args)
{
launch(args);
}
@Overridepublicvoidstart(StageprimaryStage)
{
XYSeriesCollectionprimarySeriesCollection = newXYSeriesCollection();
JFreeChartchart = ChartFactory.createXYLineChart(
"",
"",
"",
primarySeriesCollection,
PlotOrientation.VERTICAL,
true,
false,
false);
XYPlotplot = chart.getXYPlot();
plot.setDomainAxis(newLogAxis("X"));
plot.setRangeAxis(newLogAxis("Y"));
ChartViewerchartViewer = newChartViewer(chart);
primaryStage.setScene(newScene(chartViewer));
primaryStage.show();
}
}
The text was updated successfully, but these errors were encountered:
I ran into a scenario where clicking outside the data plot area (in the legend area, axis labels area, etc) while using a LogAxis can result in an IllegalArgumentException. After this occurs the chart is then essentially non-interactive and does not respond to user input such as drag to zoom.
Stack Trace:
Complete self contained example:
The text was updated successfully, but these errors were encountered: