Home Forums Chart Support Problem rendering multiple charts

Problem rendering multiple charts

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

    I’m not sure what my problem is but I’ll try and describe it.
    JSFiddle : https://jsfiddle.net/ltdonova/pu18n3km/2/

    I’m trying to render the contaiers, chartContainerL and chartContainerH. In the JSfiddle, they both render, but when I host this webserver on my ESP32, the only one chart renders.

    Errors I get when I inspect the webpage are:

    CanvasJS Error: Chart Container with id “chartContainerL” was not found
    canvasjs.min.js:167 Uncaught TypeError: Cannot read property ‘style’ of undefined
    at m._updateOptions (canvasjs.min.js:167)
    at m._initialize (canvasjs.min.js:169)
    at m.render (canvasjs.min.js:202)
    at addDataL (script.js:121)
    at XMLHttpRequest.xhttpL.onreadystatechange (script.js:141)

    I’ve also tried just copy/pasting this websites multiple chart code into a script tag and see if both show up and again, only one of the graphs show up.



    From the error shown above, it seems the HTML DOM container with id chartContainerL is not loaded when the chart is created. Can you kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with the JSON/sample data so that we can run it locally to understand the scenario better and help you out?

    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.