jfreechart
jfreechart copied to clipboard
Unable to disable zoom by mouse drag in xyplot
Hello, I was trying to disable zoom on mouse drag like in swing and removing auxiliary MouseHandlers, but there was no luck, Any suggestions?
Have you tried setMouseZoomable(false)
?
Have you tried
setMouseZoomable(false)
?
this method for swing panel, but there is no equivalent method for chartviewer (JavaFX)
The ChartViewer
API mentions that "Many behaviors…are provided directly by the canvas." You might try the corresponding ChartCanvas
methods.
maybe I was not clear on my intent or exact turn. if I drag with mouse on a chart, after the drag axes got zoom. that is unwanted zoom effect for me to disable. I zero all onMouseDrag.. and onDrag.. handlers, but still can't avoid zooming
The ChartViewer
constructor adds an instance of ZoomHandlerFX
named "zoom"
to its ChartCanvas
. You can remove it like this:
ChartCanvas canvas = viewer.getCanvas();
canvas.removeMouseHandler(canvas.getMouseHandler("zoom"));