You must be logged in to post your query.
Home › Forums › Chart Support › Error: Cannot read properties of null (reading ‘style’)
Tagged: chart, error, StockChart
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.
Please help me to resolve this issue. Thanks
@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
You must be logged in to reply to this topic. Login/Register