PHP code example of rickselby / svglapchart
1. Go to this page and download the library: Download rickselby/svglapchart 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/ */
rickselby / svglapchart example snippets
// Create the chart
$chart = new chart();
// Set information for each driver
foreach($drivers AS $driver) {
$chart->setDriver($driver['name'], $driver['colour'], $driver['positions']);
}
// Set how many drivers were lapped on each lap
$chart->setLapped($lapped);
// Get the SVG
echo $chart->generate();