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 2 years, 4 months ago.
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!
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.
Here’s the example:
it’s the original code from this site
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 :)
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.
I see. Thanks for the answer!
You must be logged in to reply to this topic.