About the SimpleTimeline category

SimpleTimeline: SimpleTimeline is a Vaadin component for presenting data points on a horizontal line. It consists of two classes:

  • SimpleTimeline Timeline element itself containing the items.
  • SimpleTimelineItem A single item on the timeline that contains the text, HTML.

Basic usage is as follows:

final SimpleTimeline t = new SimpleTimeline("Release schedule");
t.add(10, "Planning").addClassNames(SimpleTimelineItem.STYLE_SECONDARY,SimpleTimelineItem.VARIANT_DASHED);
t.add(20, -1, "Brainstorming");
t.add(40, "More planning").addClassNames(SimpleTimelineItem.STYLE_PRIMARY);
t.add(70, 2, "Scrum").addClassNames(SimpleTimelineItem.STYLE_PRIMARY, SimpleTimelineItem.VARIANT_FILLED);
t.add(95, 2, "Deadline: 31.12.2022").addClassNames(SimpleTimelineItem.VARIANT_FILLED, SimpleTimelineItem.STYLE_ERROR);
t.setBreaks(25,50,75);
t.addClickListener(e -> Notification.show(e.getItem().getText()));
add(t);

Which creates the following timeline:

This component is based on @parttio/simple-timeline