Segmented timeline plots unexpected Saturday-Sunday
Posted: 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
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