function Mychart(){
Padrao_de_Cores();
var cht = document.getElementById("myChart");
var ctx1 = cht.getContext("2d");
window.myChart = new Chart(ctx1 , {
type: 'bar',
data: {
labels:MatrizSArea,
datasets: [{label:"AA - 50%",
data: MatriszCor1,
backgroundColor:'rgb(255, 0, 0)',},
{ label:"A - 75%",
data: MatriszCor2,
backgroundColor:'rgb(191, 143, 0)',
},
{ label:"B - 90%",
data: MatriszCor3,
backgroundColor:'rgb(255, 255, 0)',
},
{ label:"C - 100%",
data: MatriszCor4,
backgroundColor:'rgb(0, 176, 80)',
}],
},
options: {
title:{
display:true,
text:$('#Depto').val(),
},
tooltips: {
mode: 'index',
intersect: true,
},
responsive: true,
scales: {
xAxes: [{
stacked: true,
}],
yAxes: [{
stacked: true,
ticks: {
beginAtZero:true,
bounds:false,
}
}]
},
}
});
}