1. Go to this page and download the library: Download sportlog/google-charts 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/ */
sportlog / google-charts example snippets
php
$chartService = new ChartService();
php
$data = new DataTable();
$data->addColumn(new Column(ColumnType::String, 'Task'));
$data->addColumn(new Column(ColumnType::Number, 'Hours per Day'));
// add the rows: you can also use addRows to add an array of rows
$data->addRow(['Work', 11]);
$data->addRow(['Eat', 2]);
$data->addRow(['Commute', 2]);
$data->addRow(['Watch TV', 2]);
$data->addRow(['Sleep', 7]);