JFreeChart disable zooming
Asked Answered
C

1

5

Is there an easy way to disable zoom in/out feature for XYPlot which is drawn in ChartComposite ? Overriding the zoom methods for XYPlot will be a solution but I wonder if there is an easy way..

Chiao answered 30/10, 2009 at 12:50 Comment(0)
R
11

Try

getYourChartPanel().setDomainZoomable(false);
getYourChartPanel().setRangeZoomable(false);

See setDomainZoomable() and setRangeZoomable()

Rhiannonrhianon answered 30/10, 2009 at 12:57 Comment(3)
I'm not using ChartPanel, I'm using ChartComposite for SWT. ChartConposite does not have setDomainZoomable() and setRangeZoomable() methods..Chiao
That would have been helpful to note in original question.Knavery
I found that ChartComposite has setDomainZoomable() and setRangeZoomable() methods too..Chiao

© 2022 - 2024 — McMap. All rights reserved.