Link to home
Start Free TrialLog in
Avatar of dshrenik
dshrenikFlag for United States of America

asked on

JFreeChart: Time Series Chart

For a TImeSeriesChart, is it possible to generate a chart and then extract only a part of the chart.

For example, the first chart in the attached image is the original chart. The second chart is the extracted portion from the original between t=12:00PM and t = 4:00AM.

If possible, please provide some sample code. Thanks!
Avatar of dshrenik
dshrenik
Flag of United States of America image

ASKER

User generated image
I think this can be possible if there is a way to auto zoom onto a portion of the chart.
You can generate another chart with shorter interval - ?
I'm keeping that for the last option, because in my chart, things can get a little complicated.
I don't think you can zoom, but it is equivalent to geenrating the chart on a smaller range
After creating the chart, if I fix the domain range, will that automatically display only the required portion?
Can you tell me how I can set the range for the domain axis (which is a DateAxis)?

final DateAxis domainAxis = (DateAxis) plot.getDomainAxis();

not sure how I must pass arguments to:
rangeAxis.setRange()
(I want to pass the 2 Date arguments)
ASKER CERTIFIED SOLUTION
Avatar of for_yan
for_yan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial