PHP code example of booosta / graph2
1. Go to this page and download the library: Download booosta/graph2 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/ */
booosta / graph2 example snippets
# [...]
$line = $this->makeInstance("\\booosta\\graph2\\Line", $name, $data, $title, $height, $width);
$html = $line->get_html();
\booosta\graph2\Line;
$line = new Line($name, $data, $title, $height, $width);
print $line->loadHTML();
$data = ['First' => 4, 'Second' => 1, 'Third' => 3];
$bar = $this->makeInstance("\\booosta\\graph2\\Bar", $name, $data, $title, $height, $width);
$html = $bar->get_html();
\booosta\graph2\Bar;
$bar = new Bar($name, $data, $title, $height, $width);
print $bar->loadHTML();
$bar = $this->makeInstance("\\booosta\\graph2\\Bar2", $name, $data, $title, $height, $width);
$html = $bar->get_html();
\booosta\graph2\Bar2;
$bar = new Bar2($name, $data, $title, $height, $width);
print $bar->loadHTML();
$donut = $this->makeInstance("\\booosta\\graph2\\Donut", $name, $data, $title, $height, $width);
$html = $donut->get_html();
\booosta\graph2\Donut;
$donut = new Donut($name, $data, $title, $height, $width);
print $donut->loadHTML();