1. Go to this page and download the library: Download sjaakp/yii2-timeline 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/ */
sjaakp / yii2-timeline example snippets
// define Timeline
$t = Timeline::begin([
'dataProvider' => $provider,
'attributes' => [
'start' => 'startDate',
... more attributes ...
]
... more Timeline options ...
]);
// define main Band
$t->band([
'width' => '60%',
'intervalUnit' => Timeline::MONTH,
'intervalPixels' => 100
// layout not set, use default
]);
// define secundary Band
$t->band([
'width' => '40%',
'intervalUnit' => Timeline::YEAR,
'intervalPixels' => 120,
'layout' => 'overview'
]);
// complete definition
Timeline::end();