question on SegmentedTimeline

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
invest275
Posts: 1
Joined: Sat Mar 17, 2012 12:45 am
antibot: No, of course not.

question on SegmentedTimeline

Post by invest275 » Sat Mar 17, 2012 12:59 am

I need to draw a discontinuous time series data. For example I need to exclude 2 time periods, 10:00am-10:30am and 13:00pm-14:00pm. I found some sample code on this forum,

SegmentedTimeline timeline = new SegmentedTimeline(SegmentedTimeline.MINUTE_SEGMENT_SIZE, 1351, 89);
timeline.setStartTime(SegmentedTimeline.FIRST_MONDAY_AFTER_1900 + 780*SegmentedTimeline.MINUTE_SEGMENT_SIZE);
SegmentedTimeline basetimeline = timeline;

timeline.setBaseTimeline(basetimeline);
try {
Date d1 = ...;
Date d2 = ...;
timeline.addBaseTimelineExclusions(d1.getTime(), d2.getTime());


I don't quite understand the above. Does 1351 mean 24*60 - 89? 89 means 90minutes -1?
also I am puzzled with the meaning of SegmentedTimeline.FIRST_MONDAY_AFTER_1900 + 780*SegmentedTimeline.MINUTE_SEGMENT_SIZE?

If I have 2 or more exclusions, what should I do? Thanks a lot!

J. Monroe

Locked