Home Forums Chart Support Updating Chart Options on Dynamic Chart

Updating Chart Options on Dynamic Chart

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

    Hello, I have a use case where I’d like to have a dynamic line chart chart updating real time from an internal data source. I want to display the dynamic chart with several buttons below it, such that when the user clicks one of the buttons, the line chart will change color starting at the time that the button was clicked. It’s important the the prior data remain the ‘old’ color, and the new color only is shown after the button press. Note that the data source for the line remains the same.

    I don’t see an obvious way that this is supported. Would appreciate any tips. Thanks very much.

    #38295

    @hejenemy,

    You can update lineColor and markerColor based on change in the dropdown(or after button click in your case) to achieve your requirement.

    Please check this JSFiddle for a working example.

    Changing line color in dynamic chart


    Thangaraj Raman
    Team CanvasJS

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

You must be logged in to reply to this topic.