Codice HTML:
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Punteggi</title>
<script src="../../js/Chart.min.js"></script>
<script src="../../js/utils.js"></script>
<style type="text/css">
.a {
border-bottom: 1px #000000 solid;
border-right: #000000 0px solid;
border-top: 0px #000000 solid;
border-left: 0px #000000 solid;
font-size: 18px;
font-family: Comic Sans MS, bold ;
text-transform: capitalize ;
}
</style>
<style>
canvas {
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
</head>
<body>
<div align="center">
<table border="0" width="950" cellspacing="0" cellpadding="0" height="400" id="table1">
<tr>
<td height="300" width="950" align="center" colspan="3">
<div style="width:80%;">
<canvas id="canvas"></canvas>
</div>
<script>
var config = {
type: 'line',
data: {
labels: ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36'],
datasets: [{
label: '<? echo $sq ?>',
borderColor: window.chartColors.red,
backgroundColor: window.chartColors.red,
data: [
'55','65','58','ecc ecc',
],
fill: false,
},
]},
options: {
responsive: true,
title: {
display: true,
text: 'Punteggi'
},
tooltips: {
position: 'nearest',
mode: 'index',
intersect: false,
yPadding: 10,
xPadding: 10,
caretSize: 8,
backgroundColor: '#fff',
titleFontColor: window.chartColors.black,
bodyFontColor: window.chartColors.black,
borderColor: 'rgba(0,0,0,1)',
borderWidth: 4
},
hover: {
mode: 'index',
intersect: true
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
show: true,
labelString: 'Month'
}
}],
yAxes: [{
display: true,
scaleLabel: {
show: true,
labelString: 'Value'
}
}]
}
}
};
window.onload = function() {
var ctx = document.getElementById('canvas').getContext('2d');
window.myLine = new Chart(ctx, config);
};
</script>
</td>
</tr>
</table>
</div>
</body>
</html>
grazie a tutti