PHP code example of tigress / charts
1. Go to this page and download the library: Download tigress/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/ */
tigress / charts example snippets
use Tigress\Charts;
$data = [
['label' => 'Jan', 'value' => 120],
['label' => 'Feb', 'value' => 80, 'color' => [255, 0, 0]],
['label' => 'Mar', 'value' => 150],
];
Charts::bar()
->setTitle('Monthly Sales')
->setData($data)
->setSize(800, 400)
->render(__DIR__ . '/chart.png');