how to prohibit zoom events when the user do zoom in more than many times

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
yongjo
Posts: 1
Joined: Tue Jan 14, 2020 1:59 am
antibot: No, of course not.

how to prohibit zoom events when the user do zoom in more than many times

Post by yongjo » Tue Jan 14, 2020 2:13 am

Hi!
i am newbie to jfreechart.
but i really need it to develop my program...

when i zoom indefinitely, the program reports an error like below:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Must be finite.
at org.jfree.chart.axis.NumberTickUnitSource.getCeilingTickUnit(NumberTickUnitSource.java:114)
at org.jfree.chart.axis.NumberAxis.selectHorizontalAutoTickUnit(NumberAxis.java:855)
at org.jfree.chart.axis.NumberAxis.selectAutoTickUnit(NumberAxis.java:824)

i think, it maybe be related to very big data value which is used in numberaxis...

so, what i just want is that the programm dosen't do anything even if a user do zooming when executing over than designated value by me.
for example,
users can zoom only less than 5times. if users try to zoom after 5 times(using drag or wheel doesn't matter), program doesn't do anything.

how can i do above?

thanks.

if you want more information, please let me know.

Locked