chartPainelAgregado.js
1.52 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
$(document).ready(function() {
var qntAvaliacoes = $("#qntAvaliacoes").text();
var canvas = document.getElementById('myChart');
var data = {
labels: ["0",$("#erro1").text(), $("#erro2").text(), $("#erro3").text(), $("#erro4").text() ,$("#erro5").text(),
$("#erro6").text(), $("#erro7").text(),$("#erro8").text(),$("#erro9").text(),$("#erro10").text()],
datasets: [
{
label: "Avaliações",
fill: false,
lineTension: 0.1,
backgroundColor: "rgba(75,192,192,0.4)",
borderColor: "rgba(75,192,192,1)",
borderCapStyle: 'butt',
borderDash: [],
borderDashOffset: 0.0,
borderJoinStyle: 'miter',
pointBorderColor: "rgba(75,192,192,1)",
pointBackgroundColor: "#fff",
pointBorderWidth: 1,
pointHoverRadius: 5,
pointHoverBackgroundColor: "rgba(75,192,192,1)",
pointHoverBorderColor: "rgba(220,220,220,1)",
pointHoverBorderWidth: 2,
pointRadius: 5,
pointHitRadius: 10,
data: [0,$("#p_erro1").text(), $("#p_erro2").text(),$("#p_erro3").text(),$("#p_erro4").text(),
$("#p_erro5").text(), $("#p_erro6").text(),$("#p_erro7").text(),$("#p_erro8").text(), $("#p_erro9").text(),$("#p_erro10").text()],
}
]
};
var option = {
showLines: true
};
var myLineChart = Chart.Line(canvas,{
data:data,
options:option
});
//fim 1 avaliações
});