Home forums Chart Support Chart update on button click in Angular

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #32133


    I have a problem with updating a chart on button click in Angular. Here is an example.

    Firstly, the dataPoints array is empty and on button click I would like to populate it and to update the chart, but it doesn’t work.

    Could you please help me with this issue?

    Thank you,



    In order to update chart, you need to either change chart-options and call render or use set method. In your case, updating dataPoints through chart-options seems to be working fine. Please take a look at this updated stackblitz code.

    Vishwas R
    Team CanvasJS


    Your solution works fine for me. Thanks for your response Vishwas! :)

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

You must be logged in to reply to this topic.