I figured out how to use SegmentedTimeline with intraday...

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
clam61
Posts: 66
Joined: Tue Jul 03, 2007 9:59 pm

I figured out how to use SegmentedTimeline with intraday...

Post by clam61 » Fri Jul 27, 2007 7:43 pm

almost...

well there was a big problem with excluding weekends. it seemed that setting the basetimeline was useless.

from the docs it seems like this is all you need to do:

SegmentedTimeline timeline = SegmentedTimeline.newMondayThroughFridayTimeline();

but thats not true. you need to call addBaseTimelineExclusions(start long, end long) to add these exclusions to the base timeline!!! this isn't in the docs.

another thing is that you can't pick an arbitrary date for your start and end dates. both start and end dates have be segment dates. if they are not, no exception is thrown but the program wont work

now the only thing ... is that i cant get it to exclude holidays by using addException()!

clam61
Posts: 66
Joined: Tue Jul 03, 2007 9:59 pm

Post by clam61 » Fri Jul 27, 2007 8:06 pm

instead of messing around with this segmented timeline, how easy/difficult would it be to have an OHLCSeries that does not take into consideration the date of each item, but simply appends each item to the series giving it a uniformly increasing X value?

Locked