PHP code example of goat1000 / svggraph
1. Go to this page and download the library: Download goat1000/svggraph 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/ */
goat1000 / svggraph example snippets
// if you are using composer you can skip this
'A simple graph',
'bar_space' => 20,
];
// set up an array of values
$values = [ 100, 200, 140, 130, 160, 150 ];
// use full namespace to get SVGGraph instance
$graph = new Goat1000\SVGGraph\SVGGraph(600, 400, $options);
// assign the values
$graph->values($values);
// render a bar graph
$graph->render('BarGraph');