}
series.addOrUpdate(time(event.timestamp - startTimestamp), value.value);
lastTimestamp = event.timestamp;
} else if (event instanceof Timeline.IntervalEvent) {
Timeline.IntervalEvent intervalEvent = (Timeline.IntervalEvent) event;
IntervalMarker marker = new IntervalMarker(event.timestamp - startTimestamp, event.timestamp + intervalEvent.duration - startTimestamp, paint, stroke, paint, stroke, 0.3f);
marker.setLabel(intervalEvent.description);
marker.setLabelAnchor(RectangleAnchor.BOTTOM);
marker.setLabelTextAnchor(TextAnchor.BOTTOM_CENTER);
marker.setLabelOffset(new RectangleInsets(0, 0, (slaveIndex + 1) * LABEL_OFFSET, 0));
plot.addDomainMarker(marker);
} else if (event instanceof Timeline.TextEvent) {
ValueMarker marker = new ValueMarker(event.timestamp - startTimestamp, paint, stroke);
marker.setLabel(((Timeline.TextEvent) event).text);
marker.setLabelAnchor(RectangleAnchor.BOTTOM_LEFT);
marker.setLabelTextAnchor(TextAnchor.BOTTOM_LEFT);
marker.setLabelOffset(new RectangleInsets(0, 0, (slaveIndex + 1) * LABEL_OFFSET, 0));
plot.addDomainMarker(marker);
}
}
DateAxis dateAxis = (DateAxis) plot.getDomainAxis();