getTasks() {
+ return tasks;
+ }
+
+ /**
+ * Get a specific task by index.
+ *
+ * @param index Task index
+ * @return The task at the given index
+ */
+ public GanttTask getTask(int index) {
+ return tasks.get(index);
+ }
+
+ /**
+ * Get the number of tasks.
+ *
+ * @return Number of tasks in the chart
+ */
+ public int getTaskCount() {
+ return tasks.size();
+ }
+
+ /**
+ * Get the earliest start time across all tasks.
+ *
+ * @return Minimum start time
+ */
+ public float getMinTime() {
+ if (tasks.isEmpty()) return 0;
+ float min = Float.MAX_VALUE;
+ for (GanttTask task : tasks) {
+ min = Math.min(min, task.getStartTime());
+ }
+ return min;
+ }
+
+ /**
+ * Get the latest end time across all tasks.
+ *
+ * @return Maximum end time
+ */
+ public float getMaxTime() {
+ if (tasks.isEmpty()) return 100;
+ float max = 0;
+ for (GanttTask task : tasks) {
+ max = Math.max(max, task.getEndTime());
+ }
+ return max;
+ }
+
+ /**
+ * Clear all tasks.
+ */
+ public void clearTasks() {
+ tasks.clear();
+ }
+}
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/data/GanttTask.java b/MPChartLib/src/main/java/com/github/mikephil/charting/data/GanttTask.java
new file mode 100644
index 0000000000..e21dc7425d
--- /dev/null
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/data/GanttTask.java
@@ -0,0 +1,47 @@
+package com.github.mikephil.charting.data;
+
+/**
+ * Represents a single task in a Gantt chart.
+ * Each task has a name, start time, duration, and display color.
+ */
+public class GanttTask {
+ private String name;
+ private float startTime;
+ private float duration;
+ private int color;
+
+ /**
+ * Create a new Gantt task.
+ *
+ * @param name Task name/label
+ * @param startTime When the task starts
+ * @param duration How long the task lasts
+ * @param color Display color (Android color int)
+ */
+ public GanttTask(String name, float startTime, float duration, int color) {
+ this.name = name;
+ this.startTime = startTime;
+ this.duration = duration;
+ this.color = color;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public float getStartTime() {
+ return startTime;
+ }
+
+ public float getEndTime() {
+ return startTime + duration;
+ }
+
+ public float getDuration() {
+ return duration;
+ }
+
+ public int getColor() {
+ return color;
+ }
+}
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/utils/GanttUtils.java b/MPChartLib/src/main/java/com/github/mikephil/charting/utils/GanttUtils.java
new file mode 100644
index 0000000000..62d5a91d55
--- /dev/null
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/utils/GanttUtils.java
@@ -0,0 +1,73 @@
+package com.github.mikephil.charting.utils;
+
+import android.graphics.Color;
+
+import com.github.mikephil.charting.data.GanttTask;
+import com.github.mikephil.charting.data.GanttChartData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Utility class for creating Gantt chart data and tasks.
+ *
+ * Usage Example:
+ *
+ * // Create Gantt chart data
+ * GanttChartData ganttData = new GanttChartData();
+ *
+ * // Add tasks
+ * ganttData.addTask(new GanttTask("Design", 0, 50, Color.rgb(255, 107, 107)));
+ * ganttData.addTask(new GanttTask("Development", 40, 100, Color.rgb(66, 165, 245)));
+ * ganttData.addTask(new GanttTask("Testing", 120, 40, Color.rgb(76, 175, 80)));
+ * ganttData.addTask(new GanttTask("Launch", 150, 20, Color.rgb(255, 193, 7)));
+ *
+ * // Or use the helper
+ * GanttChartData data = GanttUtils.createSampleGanttData();
+ *
+ */
+public class GanttUtils {
+
+ private GanttUtils() {
+ // utility class - no instances
+ }
+
+ /**
+ * Create a sample Gantt chart with demo tasks.
+ * Useful for testing and examples.
+ *
+ * @return GanttChartData with 4 sample tasks
+ */
+ public static GanttChartData createSampleGanttData() {
+ GanttChartData data = new GanttChartData();
+
+ data.addTask(new GanttTask("Design", 0, 50, Color.rgb(255, 107, 107)));
+ data.addTask(new GanttTask("Development", 40, 100, Color.rgb(66, 165, 245)));
+ data.addTask(new GanttTask("Testing", 120, 40, Color.rgb(76, 175, 80)));
+ data.addTask(new GanttTask("Launch", 150, 20, Color.rgb(255, 193, 7)));
+
+ return data;
+ }
+
+ /**
+ * Create an empty Gantt chart data container.
+ *
+ * @return Empty GanttChartData
+ */
+ public static GanttChartData createGanttData() {
+ return new GanttChartData();
+ }
+
+ /**
+ * Create a new Gantt task.
+ *
+ * @param name Task name
+ * @param startTime Task start time
+ * @param duration Task duration
+ * @param color Task display color
+ * @return A new GanttTask
+ */
+ public static GanttTask createTask(String name, float startTime, float duration, int color) {
+ return new GanttTask(name, startTime, duration, color);
+ }
+}
diff --git a/jitpack.yml b/jitpack.yml
new file mode 100644
index 0000000000..efde7bf258
--- /dev/null
+++ b/jitpack.yml
@@ -0,0 +1,2 @@
+jdk:
+ - openjdk17