In the program, take the current sysdate. Now chart should start with one hour back date form current sysdate,
And it must be of ten minutes of interval.
How to achieve this?
The way to alter the display of axis values is: JFreeChart.getPlot --> Plot --> cast to XYPlot --> getDomainAxis --> valueAxis --> cast to DateAxis --> setDateFormatOverride(DateFormat). Check the javadocs of those classes for details.
Thank you Ulf.
I added this to above piece of code
Now the formatting is under control. But still the core problem is not fulfilled, i.e. how to start the x-axis value with one hour back time from the current time. For example if current time is 11:30 PM, the xaxis should start with 10:30 PM.