I am writing an app that uses JFreeChart, and the charts update dynamically as the application runs. The JFreeChart is within a ChartPanel, and they are simple XYLineCharts.
Sometimes, the y axis range on the chart can change from positive to negative numbers – in this situation the chart reduces in size to make room for the “-” symbol.
Is there a way to prevent this from happening ?
Thanks
Try this:
plot.getRangeAxis().setLowerBound(0);