panel.setWidth("660px");
panel.setHeight("375px");
panel.setCaption("Synthèse du Mois");
Timeline timeline = new Timeline(title);
timeline.setWidth("100%");
// create the data sources
Container.Indexed graphDataSource = createGraphDataSource();
Container.Indexed markerDataSource = createmarkerDataSource();
final Container.Indexed eventDataSource = createEventDateSource();
// add our data sources
timeline.addGraphDataSource(graphDataSource,
Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.VALUE);
timeline.setMarkerDataSource(markerDataSource,
Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.CAPTION,
Timeline.PropertyId.VALUE);
timeline.setEventDataSource(eventDataSource,
Timeline.PropertyId.TIMESTAMP, Timeline.PropertyId.CAPTION);
timeline.setGraphLegend(graphDataSource, "dimension x");
timeline.setGraphOutlineColor(graphDataSource, Color.BLUE);
timeline.setBrowserFillColor(graphDataSource, new Color(255, 0, 0, 128));
timeline.setGraphOutlineThickness(2.0);
timeline.setBrowserOutlineColor(graphDataSource, Color.BLACK);
timeline.setBrowserFillColor(graphDataSource, new Color(0, 0, 0, 128));
// adding a listener
timeline.addListener(new Timeline.EventClickListener() {
@Override
public void eventClick(EventButtonClickEvent event) {
Item item = eventDataSource.getItem(event.getItemIds()
.iterator().next());