chartPainelAgregado.js 1.52 KB
$(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
});