I want a stacked bar chart that shows preset values that the user can update.
I have it set up where the first data value updates, but I can’t get the other two and the total to update.
//get input values
function graphMe(){
var static = document.getElementById("inputa").value;
myChart.data.datasets[0].data[0] = static;
document.getElementById("inputb").value;
myChart.data.datasets[0].data[1] = static;
document.getElementById("inputc").value;
myChart.data.datasets[0].data[2] = static;
myChart.update();
}
If codepen below not working, please use link: codepen.io/sherrylking/pen/EXNbPW
https://codepen.io/sherrylking/pen/EXNbPW