segmentedTimeLine.addException #299
-
|
I think I don't understand SegmentedTimeLine.addException. I'm using it to draw bar charts on intraday stock data. Let's assume the bars have size 15 minutes. Data typically comes in between 09:00 and 17:30 but this may vary per day and per stock. I want a continuous display of the bars, without gaps when there is no data. It seems the way to deal with this is by applying a segmentedTimeLine on the domain axis. My idea is to whenever a new bar needs to be added, check if there is a gap between the previous bar and the current (new to be added) bar. Like this: Here 't' is the RegularTimePeriod of the new bar and getTimeFrame().barLengthMS() returns the number of milliseconds in bar. The detection of gaps seems to work. Then I add an exception to the TimeLine already present (called _mondayFridayTimeline), but this doesn't seem to have any effect; I see gaps everywhere. Am I understanding the purpose of addException incorrectly? Or is there a better way to handle this. 'Guessing' beforehand what the gaps will be and building repeating segments beforehand doesn't seem like a solution I could use. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
As outlined here, "the |
Beta Was this translation helpful? Give feedback.
As outlined here, "the
SegmentedTimelineclass has been removed…" As suggested here, you can implementTimelineas needed, but I'm not familiar with howaddException()worked.