Home forums Chart Support React – error happen when zoom

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31911

    Hi, sometime when I zoom the line chart or try to toggleDataSeries (hide 1 of the serial data), it will have this error

    “Cannot read property ‘appendChild’ of null” from /canvasjs.min.js
    But sometime it work fine. This things happen randomly… How to solve it?

    Thank You

    #31912

    I know the reason that cause this error. Because I render multiple line chart and sync zoom, so I need to push the ref (onRef) to an array for sync zoom behavior.

    Then I have a refresh button for user to refresh the chart and re-render the chart, but I forget to clear the array before re-render so the array size become larger and mix with previous ref.

    Therefore I try to clear the array before call the API to retrieve the data and re-render the chart, but I found that the onRef is not trigger. It will only trigger when first time render the chart. Why?

    Thank You

    #31916

    @weihengtest1990,

    Can you kindly create a sample StackBlitz reproducing the issue you are facing and share it with us so that we can understand the scenario better and help you out?

    —-
    Manoj Mohan
    Team CanvasJS

    #31922

    Hi, thank for your reply. That issue already solve, it due to my own mistaken. I am very sorry.

    Thank You

    #31929

    @weihengtest1990,

    Glad that you have figured it out :)

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.