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
Segmented timeline plots unexpected Saturday-Sunday
-
- Posts: 22
- Joined: Tue Aug 25, 2009 8:02 pm
- antibot: No, of course not.
-
- Posts: 22
- Joined: Tue Aug 25, 2009 8:02 pm
- antibot: No, of course not.
Re: Segmented timeline plots unexpected Saturday-Sunday
Can someone from jfree support please respond to this question?
Thanks,
Amar
Thanks,
Amar
Re: Segmented timeline plots unexpected Saturday-Sunday
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.
Thanks.
-
- 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
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
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
![Idea :idea:](./images/smilies/icon_idea.gif)
![Idea :idea:](./images/smilies/icon_idea.gif)
-
- Posts: 22
- Joined: Tue Aug 25, 2009 8:02 pm
- antibot: No, of course not.
Re: Segmented timeline plots unexpected Saturday-Sunday
Does it mean that SegmentedTimeline implementation will not be part of jfreechart 2.x?
-
- 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
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
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
![Idea :idea:](./images/smilies/icon_idea.gif)
![Idea :idea:](./images/smilies/icon_idea.gif)