I am trying to draw a time series plot. The plot consists of data measured every four minutes. Hence it contains 360 points every day. I typically have data for a week.
I want to show 1-day of data at a time using scrollbar in the plot.
Hence my question is that:
1. How do you show only part of x-axis and let the user scroll towards the end. I tried using JFreechartFrame with scroll option. But it creates the whole axis and then creates scroll bar if the display is smaller.
Thanks a lot in Advance
How to Show Subset of Data in Time-Series Plot
Re: How to Show Subset of Data in Time-Series Plot
Hi Aloke,
There is no feature to support that at present. You'll need to code something yourself.
In the future I plan to add additional menu items to the popup menu in JFreeChartPanel to provide support for panning left and right - similar to the zoom function introduced with 0.7.1. That might meet your requirement...
Regards,
Dave Gilbert
There is no feature to support that at present. You'll need to code something yourself.
In the future I plan to add additional menu items to the popup menu in JFreeChartPanel to provide support for panning left and right - similar to the zoom function introduced with 0.7.1. That might meet your requirement...
Regards,
Dave Gilbert
Re: How to Show Subset of Data in Time-Series Plot
Hi Dave,
Thanks for answering my question. You said code yourself can you tell me a starting point to do this using your classes. Like where to change things like that.
Thanks
Thanks for answering my question. You said code yourself can you tell me a starting point to do this using your classes. Like where to change things like that.
Thanks
Re: How to Show Subset of Data in Time-Series Plot
It is easy enough to display a subset of data - just set the minimum and maximum values on the axis.
It is a little more difficult to give the user direct control of this, because of the way JFreeChart draws itself on a Graphics2D object. You can't just put a scroll bar in the chart somewhere.
If you want to use a scrollbar it will have to be outside a JFreeChartPanel, and to be honest I think it will be quite difficult to deal with the resulting alignment issues. That's why my own plan is to add menu items to the popup menu on the JFreeChartPanel. There are probably other ways to do it, but that seems the simplest to me...
Regards,
DG.
It is a little more difficult to give the user direct control of this, because of the way JFreeChart draws itself on a Graphics2D object. You can't just put a scroll bar in the chart somewhere.
If you want to use a scrollbar it will have to be outside a JFreeChartPanel, and to be honest I think it will be quite difficult to deal with the resulting alignment issues. That's why my own plan is to add menu items to the popup menu on the JFreeChartPanel. There are probably other ways to do it, but that seems the simplest to me...
Regards,
DG.