0

I have a Jfreechart timeseries line graph running well.

After I add

frame.getChartPanel().setMouseWheelEnabled(true);
frame.getChartPanel().setMouseZoomable(true, false);

to the code, it can zoom in and out by the mouse wheel, but the problem is when I zoom out, it doesn't have a limit and many blank spaces get into the graph and the line gets smaller and smaller.

Is there a way to set a boundary for the graph so when I zoom out it could only get back to the same size as it generates?

Additional information: the solution in this post JFreeChart Maximum Zoom Out doesn't work in my case

[Grahp]The size after it generated

[Graph]The zoom outed graph

Community
  • 1
  • 1
newbimyth
  • 55
  • 10

0 Answers0