-1👍
You can below working example and you can use mysql query data into chartjs data like:
datasets: [
{
label: 'this year',
backgroundColor: '#26B99A',
borderWidth: 1,
data: <?php echo json_encode($Data); ?>
}
]
For more information, you can check this working example link : How to display chart using Chartjs with JSON data in Laravel
Source:stackexchange.com