1. Go to this page and download the library: Download pascini/yii2-gantt-column library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use yii\grid\GridView;
echo GridView::widget([
'dataProvider' => $model->dataProvider,
'columns' => [
[
'attribute' => 'gantChart'
'class' => 'rottriges\ganttcolumn\GanttColumn',
'ganttOptions' => [
// start or endDateRange can either be a static date (Y-m-d)
// or an offset in weeks to the current date (-2, 0, 5, ...)
// 'dateRangeStart' => '2019-10-31',
// 'dateRangeEnd' => '2020-10-01',
'dateRangeStart' => -4,
'dateRangeEnd' => 28,
'startAttribute' => 'START_DATE',
'endAttribute' => 'END_DATE',
// progressBarType [string | closure] possible values
// primary, info, warning or danger.
'progressBarType' => function($model, $key, $index) {
return $model['type'];
}
// progressBarColor [string | closure]
// css color property
// if color is set progressbar type will be overwritten
'progressBarType' => function($model, $key, $index) {
return $model['type'];
}
]
],
],
]);
$ php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.