segmentedtimeline: M-F 5am-6pm

Discussion about JFreeChart related to stockmarket charts.
Locked
jfreechart175371
Posts: 8
Joined: Tue Mar 18, 2014 2:00 pm
antibot: No, of course not.

segmentedtimeline: M-F 5am-6pm

Post by jfreechart175371 » Tue Mar 18, 2014 2:47 pm

Hello.

SegmentedTimeLine.newFifteenMinuteTimeLine() is the type of thing I'm looking for, except I need to be able to customize the start and end times of the day. I need something more like 5am to 6pm Monday through Friday instead of Monday through Friday 9am to 4pm.

Would anyone have any clues how to do this?

Thank you for your time.

jfreechart175371
Posts: 8
Joined: Tue Mar 18, 2014 2:00 pm
antibot: No, of course not.

Re: segmentedtimeline: M-F 5am-6pm

Post by jfreechart175371 » Tue Mar 25, 2014 4:23 pm

I think I figured it out. I apologise for my novice question, and the below links helped alot:

// http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=19054
// viewtopic.php?f=10&t=110255&p=173902&hilit=time#p173902


364 public static SegmentedTimeline newFifteenMinuteTimeline() {
365 SegmentedTimeline timeline
366 = new SegmentedTimeline(FIFTEEN_MINUTE_SEGMENT_SIZE, 28, 68);
367 timeline.setStartTime(
368 FIRST_MONDAY_AFTER_1900 + 36 * timeline.getSegmentSize()
369 );
370 timeline.setBaseTimeline(newMondayThroughFridayTimeline());
371 return timeline;
372 }

84 SegmentedTimeline timeline = SegmentedTimeline.newMondayThroughFridayTimeline();
85 ((DateAxis) chart.getXYPlot().getDomainAxis()).setTimeline(timeline);

Locked