1. Go to this page and download the library: Download vemcogroup/nova-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/ */
vemcogroup / nova-charts example snippets
use Vemcogroup\Charts\Traits\HasChartData;
class Product extends Model
{
use HasChartData;
...
}
public function chartResourceData($selection)
{
return [
'labels' => [],
'datasets' => [],
];
}
public function chartDashboardData($selection)
{
return $this->chartResourceData($selection);
}
return [
(new \Vemcogroup\Charts\Chart)->onlyOnDetail()
];
(new \Vemcogroup\Charts\Chart())->title('Title of card');
(new \Vemcogroup\Charts\Chart())->description('Description of card');