Skip to content

JanBrin/interactive_gantt_chart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Gantt Chart

A Flutter package to create interactive Gantt charts. This package allows you to visualize and interact with Gantt charts, including features like scroll, drag, resize and dynamically update the data.

Gantt Chart Example

Features

  • Display Data with start and end dates
  • Support SubData acts as task inside a project
  • Scrollable, draggable and resizable Data
  • Dynamic sticky date labels
  • Customizable task labels and styles
  • Provided with some custom builders

Usage

To use this package, follow these steps:

  1. Add the package to your pubspec.yaml file:

    dependencies:
      interactive_gantt_chart: ^0.1.1
  2. Import the package in your Dart file:

    import 'package:interactive_gantt_chart/interactive_gantt_chart.dart';
  3. Create data model and convert it to GanttData or GanttSubData and initialize the Gantt chart:

    List<GanttData<Task, String>> ganttData = [
      GanttData<Task, String>(
        dateStart: DateTime(2023, 1, 1),
        dateEnd: DateTime(2023, 1, 10),
        data: Task(name: 'Task 1'),
        label: 'Task 1',
        subData: [
          GanttSubData(
            dateStart: DateTime(2023, 1, 2),
            dateEnd: DateTime(2023, 1, 5),
            data: 'Sub Task 1',
            label: 'Sub Task 1',
          ),
        ],
      ),
    ];
    
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: SafeArea(
          child: GanttChart<Task, String>(
            data: ganttData,
            onDragEnd: (data, index, details) {
              ganttData[index] = data;
            },
          ),
        ),
      );
    }
  4. Customize the Gantt chart as needed using the available properties and builders.

Releases

No releases published

Packages

No packages published

Languages

  • Dart 63.4%
  • C++ 18.3%
  • CMake 14.9%
  • Swift 1.3%
  • C 1.1%
  • HTML 0.9%
  • Other 0.1%