You must be logged in to post your query.
Home › Forums › Chart Support › Update chart from user input
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
@sherrylking,
You might have posted it here by mistake. However, you can achieve same using canvasJS. Please take a look at this jsFiddle.
—- Bivek Singh, Team CanvasJS
You must be logged in to reply to this topic. Login/Register