Home forums Using CanvasJS Something wrong about the stackedArea and the div display

This topic contains 4 replies, has 3 voices, and was last updated by  Ernest 3 months, 3 weeks ago.

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

    Ernest
    Member

    Hi, new to here,
    Firstly, thx a lot for develop CanvasJs.
    And I want to use “StackArea” to show two different parts of data and compare then separately, but when I use stackArea, it adds the two parts automatically, and that’s not what I want obviously, and how can I fix it?
    Another question is, when I change the div “chartContainer” to another place of the same page, it can’t display anymore no matter how I set the parameter or make other efforts, it just can’t display and leave a whole white area in its div size. So, why this happens? And how can I fix it?
    I’ll appreciate it so much if you answer them, and have a nice day!

    #11712

    Sanjoy
    Moderator

    Ernest,

    We are unable to understand your requirement properly. It would be helpful if you can provide a pictorial representation so that we can help you out.
    For the second question, we will recommend you to use different div container for different chart, if you are looking for something else creating an JSFiddle will help us to solve your problem.

    #11716

    Ernest
    Member

    Hi, Sanjoy,
    Here’s the example:
    exp1
    it’s the original code from this site
    exp2
    And it’s the result, it shows that the blue line display the “First Quarter” data, but the red line display “Second Quarter” + “First Quarter” data, and I just want them to display their own data, so what can I do?

    Thanks again 🙂

    #11718

    Vishwas R
    Keymaster

    Ernest.

    In stacked charts, dataPoints for each series are stacked one on top of the other. You can use area chart to show “Second Quarter” data independent of “First Quarter” data.

    CanvasJS Area Chart

    #11721

    Ernest
    Member

    I see. Thanks for the answer!

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

You must be logged in to reply to this topic.