Labeling the bars

The above example shows you how to create Timeline using built-in Google Charts. The example shows presidential period of most recent U.S.A presidents.

For example:

...
"options" => array(
    "timeline" => [
        "showRowLabels" => false
    ]
)
<?php

require_once "../../../../load.koolreport.php";
require_once "MyReport.php";

$report = new MyReport;
$report->run()->render();
<?php
require_once "../../../../load.koolreport.php";


class MyReport extends \koolreport\KoolReport
{

}
<?php

use \koolreport\widgets\google\Timeline;

$data = [
    ['Term', 'President', 'Start', 'End'],
    ['1', 'Washington', "1789-03-30", "1797-02-04"],
    ['2', 'Adams',      "1797-02-4",  "1801-02-04"],
    ['3', 'Jefferson',  "1801-02-4",  "1809-02-04"]
];

?>
<div class="report-content">
    <div class="text-center">
        <h1>Labeling the bars</h1>
    </div>
    <div style="height:200px;margin-bottom: 50px">
        <?php
        Timeline::create(array(
            "dataSource" => $data,
            "columns" => array(
                "Term",
                "President",
                "Start" => array(
                    "type" => "date",
                ),
                "End" => array(
                    "type" => "date",
                )
            )
        ));
        ?>
    </div>
    <div style="height:200px;margin-bottom: 50px">
        <?php
        Timeline::create(array(
            "dataSource" => $data,
            "columns" => array(
                "Term",
                "President",
                "Start" => array(
                    "type" => "date",
                ),
                "End" => array(
                    "type" => "date",
                )
            ),
            "options" => array(
                "timeline" => [
                    "showRowLabels" => false
                ]
            )
        ));
        ?>
    </div>
</div>

What People Are Saying

"KoolReport helps me very much in creating data report for my corporate! Keep up your good work!"
-- Alain Melsens

"The first use of your product. I was impressed by its easiness and powerfulness. This product is a great and amazing."
-- Dr. Lew Choy Onn

"Fantastic framework for reporting!"
-- Greg Schneider

Download KoolReport Get KoolReport Pro