0๐
I managed to make it, here what the syntaxe look like:
while($i <= $N)
{
$data =
[
'label'=> 'Scatter Dataset',
'data' =>
[['x'=>$point1[$i],'y'=>$point1[$i]],
['x'=>$point2[$i],'y'=>$point2[$i]]],
'backgroundColor' => 'rgb(255, 99, 132)',
'showLine'=> true,
];
$datas[$i] = $data;
$i++;
}
$chart->setData([
'datasets' => $datas
]);
- Chartjs-ChartJS 4.4.0: Is there a way to get some kind of onLeave event at the chart?
- Chartjs-Date-fns: set time format for chart.js
Source:stackexchange.com