From 2ef7dacc8fe7641c3264d90ddb1200df6c858b75 Mon Sep 17 00:00:00 2001 From: Roman Wanner <60240491+daredloco@users.noreply.github.com> Date: Tue, 6 Dec 2022 13:43:48 -0300 Subject: [PATCH] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index da34628..b2d59ac 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ composer require helvetiapps/lagoon-charts * Pie Charts * Area Charts * Bar Charts +* Gantt Charts (Preview) ## TODO @@ -95,4 +96,21 @@ $data = $areaChartTable->toArray(); Blade ``` @livewire('lagoon-area-chart', ['chartId' => 'uniqueID', 'chartData' => $data, 'height' => 300, 'width' => 400, 'title' => 'Title', 'options' => [], key('uniquekey'.now())) +``` + +### Gantt Chart + +Livewire +```php +$ganttChartTable = new GanttChartTable(); + +$ganttChartTable->addTask("test1", "Test1", Carbon::now(), Carbon::now()->copy()->addMonth(), 30, 100, null); +$ganttChartTable->addTask("test2", "Test2", Carbon::now()->copy()->addMonth(), Carbon::now()->copy()->addMonths(2), 30, 100, "test1"); + +$data = $ganttChartTable->__toString(); //IMPORTANT USE __toString() here! +``` + +Blade +``` +@livewire('lagoon-gantt-chart', ['chartId' => 'uniqueID', 'chartData' => $data, 'height' => 300, 'width' => 400, 'options' => [], key('uniquekey'.now())) ``` \ No newline at end of file