1 回答
TA贡献2037条经验 获得超6个赞
您的数据集括号上有一些错误
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["A1", "B1", "C1"],
datasets: [{
label: '',
datasets:[
<?php
$jumlah_A1 = mysqli_query($koneksi,"select * from mesin where LokasiMesin='A1'");
echo mysqli_num_rows($jumlah_A1);
?>,
<?php
$jumlah_B1 = mysqli_query($koneksi,"select * from mesin where LokasiMesin='B1'");
echo mysqli_num_rows($jumlah_B1);
?>,
<?php
$jumlah_C1 = mysqli_query($koneksi,"select * from mesin where LokasiMesin='C1'");
echo mysqli_num_rows($jumlah_C1);
?>], <!-- Bracket here-->
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)'
],
borderColor: [
'rgba(255,99,132,1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)'
],
borderWidth: 1;
}]
}
- 1 回答
- 0 关注
- 87 浏览
添加回答
举报