Estou com dificuldades para colocar as informações do valor sobre a barra
de um gráfico de barra.
Alguém pode me auxiliar?
Segue o código.
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,
}
}]
},
}
});
}
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/b9693767-ef63-466b-8d27-09df57f741ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.