Home Forums Chart Support Problem multi charts

Problem multi charts

Viewing 5 posts - 1 through 5 (of 5 total)
  • #45046

    I have created more than one chart that takes data from array.
    I need in some cases to view all of them and in others to view some.
    For example, if I view the first one, there are no problems, but if I want to view only the second one, the result is an empty frame.
    Why?
    Thanks in advance…

    #45047

    @patdepri_new,

    Rendering multiple charts in a page seems to be working fine. Please refer to this documentation page for a step-to-step walkthrough of the same. If you are still facing issue, kindly create a JSFiddle reproducing the issue you are facing and share it with us so that we can look into the code, understand the scenario better and help you out.

    Multiple Charts in a Page


    Ananya Deka,
    Team CanvasJS

    #45052

    I have already consulted the forum several times, but I have never found a request similar to mine.
    I can view multiple charts at the same time.
    I have already seen the indicated page, more than once.

    But now I’ll give an example to make myself understand better: I have:
    chart 1
    chart 2
    chart 3
    chart 4
    chart 5

    If on the page I display in sequence

    chart 1
    chart 2
    chart 3

    no problem, but if I want to view only

    chart 3

    the result is an empty box.
    Why?

    Evidently the script loads the data of each chart in sequence, but when it has to skip one the mechanism jams. Can this be solved with another method?

    Can you try this for me?

    Thank you

    #45054

    No problem, you can do it too by opening the page with the example you gave me and which is illustrated in the figure.

    https://jsfiddle.net/canvasjs/3c290nc1/

    from here you remove only a part of the code, exactly the first chartContainer1

    <div id=”chartContainer1″ style=”width: 45%; height: 300px;display: inline-block;”></div>

    You’ll see that it doesn’t work anymore!
    Why?
    How can it be solved?

    #45069

    @patdepri_new,

    You are attempting to create a chart in the div with id “chartContainer1” which does not exist. So the code stops executing and does not render anything on screen. Please check browser console for the error. Not creating chart with the id that doesn’t exist should render all other charts in this case.


    Ananya Deka
    Team CanvasJS

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

You must be logged in to reply to this topic.