Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dariol83/timeline
OpenJFX Timeline/Gantt Chart Widget
https://github.com/dariol83/timeline
chart gantt-chart gantt-diagram java javafx openjfx widget-library
Last synced: 4 months ago
JSON representation
OpenJFX Timeline/Gantt Chart Widget
- Host: GitHub
- URL: https://github.com/dariol83/timeline
- Owner: dariol83
- Created: 2024-03-31T07:39:20.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T17:50:31.000Z (6 months ago)
- Last Synced: 2024-09-30T03:41:11.136Z (4 months ago)
- Topics: chart, gantt-chart, gantt-diagram, java, javafx, openjfx, widget-library
- Language: Java
- Homepage:
- Size: 403 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Timeline Chart
[](https://search.maven.org/search?q=eu.dariolucia.jfx.timeline)
eu.dariolucia.jfx
eu.dariolucia.jfx.timeline
${timeline.version}
## Introduction
This module contains an implementation of a timeline/Gantt chart for JavaFX. The widget supports the following features:
- Definition of several task item per task line, each with its own colour, start time, expected and actual durations;
- Grouping of task lines in flat groups and hierarchical groups;
- Projection of aggregated task item durations when groups are collapsed or always on;
- Handling of time overlaps among task items belowing to the same task line, dynamically rendered on separate lines;
- Time cursors and time intervals (in foreground and background);
- Scrolling and zooming via mouse scroll;
- Single selection model for task items;
- Dynamic column sizing;
- Appearance fully customisable per task item, task lines and group of lines via inheritance;
- Usable programmatically and via FXML.![Screenshot](img/timeline.png "Timeline Chart Widget")
## Usage (basic)
// Create timeline
Timeline tl = new Timeline();
// Add data defaults for testing
Instant currentTime = Instant.now();
tl.setMinTime(currentTime.minusSeconds(3600));
tl.setMaxTime(currentTime.plusSeconds(12800));
tl.setViewPortStart(currentTime);
tl.setViewPortDuration(1200);
// Add task lines
TaskLine theLine = new TaskLine("Task Line 1", "First task line");
// Add items to the task line
theLine.getItems().add(new TaskItem("Task 1", currentTime.plusSeconds(30), 98, 0));
theLine.getItems().add(new TaskItem("Task 2", currentTime.plusSeconds(130), 28, 0));
// Add the task line to the timeline
tl.getItems().add(theLine);
// Add to application and render## Limitations
For optimisation reasons, the widget works with a time resolution in seconds. Sub-second resolution is not supported, i.e.
times are truncated to seconds.