Home Forums Chart Support Error: Cannot read properties of null (reading ‘style’)

Error: Cannot read properties of null (reading ‘style’)

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

    Error: Cannot read properties of null (reading ‘style’)
    Error in /~/src/canvasjs.stock.min.js (1117:38)

    I’ve have been facing the above mentioned error while trying to re-render the chart by destroying it and by creating a new chart with same container id.

    Please find the attached screenshot and sample code (stackblitz) for you ref.
    Error: Cannot read properties of null (reading 'style')

    Please help me to resolve this issue.
    Thanks

    #36860

    @praveen8357,

    From the stackblitz example shared above, it seems like you are trying to update the dataPoints on clicking update button. You can update the datatPoints without recreating the chart as shown in our documentation page. Re-creating the chart on every update may impact the performance.

    If this doesn’t resolve your issue, can you kindly brief us further about your requirement so that we can understand your scenario better and help you out?

    —-
    Manoj Mohan
    Team CanvasJS

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

You must be logged in to reply to this topic.