Segmented timeline plots unexpected Saturday-Sunday

Discussion about JFreeChart related to stockmarket charts.
Locked
amarnath578
Posts: 22
Joined: Tue Aug 25, 2009 8:02 pm
antibot: No, of course not.

Segmented timeline plots unexpected Saturday-Sunday

Post by amarnath578 » Wed May 22, 2013 5:05 pm

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

amarnath578
Posts: 22
Joined: Tue Aug 25, 2009 8:02 pm
antibot: No, of course not.

Re: Segmented timeline plots unexpected Saturday-Sunday

Post by amarnath578 » Wed Jun 19, 2013 4:33 pm

Can someone from jfree support please respond to this question?

Thanks,
Amar

ravencz
Posts: 1
Joined: Thu Sep 19, 2013 1:55 pm
antibot: No, of course not.

Re: Segmented timeline plots unexpected Saturday-Sunday

Post by ravencz » Thu Sep 19, 2013 1:57 pm

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.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Segmented timeline plots unexpected Saturday-Sunday

Post by david.gilbert » Tue Sep 24, 2013 9:13 pm

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.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

amarnath578
Posts: 22
Joined: Tue Aug 25, 2009 8:02 pm
antibot: No, of course not.

Re: Segmented timeline plots unexpected Saturday-Sunday

Post by amarnath578 » Mon Oct 14, 2013 6:23 pm

Does it mean that SegmentedTimeline implementation will not be part of jfreechart 2.x?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: Segmented timeline plots unexpected Saturday-Sunday

Post by david.gilbert » Fri Oct 18, 2013 9:32 am

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.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked