Page 1 of 1

Segmented timeline plots unexpected Saturday-Sunday

Posted: Wed May 22, 2013 5:05 pm
by amarnath578
All,

I am using the following combined Segmented Timeline to plot historical commodity prices. The requirement is to show data from Monday to Friday between 8 PM to 4 PM. The implementation involved a combination of Segmented Timelines.

SegmentedTimeline timeline = new SegmentedTimeline(SegmentedTimeline.FIFTEEN_MINUTE_SEGMENT_SIZE, 80, 16); // 15 min timeline from 8 PM to 4 PM that excludes 16 segments

timeline.setStartTime(SegmentedTimeline.firstMondayAfter1900() + 80 * timeline.getSegmentSize() - TimeZone.getDefault().getDSTSavings()); // 8 PM is the start time

timeline.setBaseTimeline(SegmentedTimeline.newMondayThroughFridayTimeline()); // Mon - Fri Segmented Time line is the base time line

dateAxis.setTimeline(timeline); // Sets the time line on the axis.


Working: I am not seeing the gaps between 4 PM - 8 PM on the charts as expected.

Not Working: Seeing the gap from 4PM on Fri to 6 PM on Sunday. I was hoping that Sat-Sun will not be shown on the chart.

As a side note, we currently have data from 6PM to Mid night for Sunday. Does it have anything to do with not hiding Sat-Sun from the charts?

Please advice.

Thanks,
Amar

Re: Segmented timeline plots unexpected Saturday-Sunday

Posted: Wed Jun 19, 2013 4:33 pm
by amarnath578
Can someone from jfree support please respond to this question?

Thanks,
Amar

Re: Segmented timeline plots unexpected Saturday-Sunday

Posted: Thu Sep 19, 2013 1:57 pm
by ravencz
The problem is still not solved. New release 1.0.15 doesn't include the correction. Can you provide some solution for the problem?
Thanks.

Re: Segmented timeline plots unexpected Saturday-Sunday

Posted: Tue Sep 24, 2013 9:13 pm
by david.gilbert
There's nobody working on this code at present. I intend to remove it from version 2 of JFreeChart because it causes too many issues and has no-one maintaining it.

Re: Segmented timeline plots unexpected Saturday-Sunday

Posted: Mon Oct 14, 2013 6:23 pm
by amarnath578
Does it mean that SegmentedTimeline implementation will not be part of jfreechart 2.x?

Re: Segmented timeline plots unexpected Saturday-Sunday

Posted: Fri Oct 18, 2013 9:32 am
by david.gilbert
Yes. Either we'll find a better approach to plotting time series data while excluding non-business days, or do without this feature. I've tried in the past to resolve some of the issues with the SegmentedTimeline code, but I wasn't very successful. It's made more complicated by the fact that I didn't write the original code, and I can only work on this stuff part-time. No-one else has come up with a good fix/solution either.