Home forums Using CanvasJS Update chart from user input

This topic contains 1 reply, has 2 voices, and was last updated by  Bivek Singh 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #15332


    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;
    myChart.data.datasets[0].data[1] = static;
    myChart.data.datasets[0].data[2] = static;

    If codepen below not working, please use link: codepen.io/sherrylking/pen/EXNbPW


    Bivek Singh


    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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.