-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with multple charts #382
Comments
I was also facing the same issue! I tried the following method. function areaChart(div, data){
var chart1 = c3.generate({
bindto: div,
data: {
columns:[data],
colors: {
weight: "#6ab153"
},
types: {
weight: "area"
}
}
});
} Passing Data: var obj=["weight", 10, 4, 5, 3, 2, 5];
areaChart('#myDiv',obj); |
So by doing this made it work on consistently? |
Hi, Thank you for looking into this. I'd like to confirm which version you're using. Is it the latest version and did you try the latest code on the repository? |
@masayuki0812 - It works perfectly fine in all desktop browser even PC except the mobile safari browser. I am using version 0.2.1 Are you at version 0.2.4? |
I used latest version from the github repo and I am still getting the same issues. Any other suggestions I could try? |
Thank you for the detail, but I can't reproduce that situation now.. I used your JavaScript code above and simple html like this:
Is it possible to show your html? I experienced similar case before ( #336 some of charts are not drawn when multiple charts in a page), and that could be avoided by initializing without
This solution might work well in this case also. |
Wow apparently by doing var chart = c3.generate({ ... // without bindto option }); $(#id).append(chart.element); That seems to work perfectly fine now :) Thank you soo much! |
The append method works, but not that much. In my case, the chart is bigger than the container (vertically), and the data does not load in the second chart. Any reason why I cannot load two charts on one page? They are both different charts. |
I am trying to display multiple charts on one page and for some reason on IOS mobile devices Safari browser (iphone and ipad) the charts randomly doesn't load all of them. It follows a weird pattern where the first time they all show up then when you refresh browser one of the charts won't show up. Then refresh again maybe two of the charts won't show. It isn't consistence everytime you refresh the page. Has anyone experience this issue before? If so what is the best way to fix this?
Here is my js code:
Thanks
The text was updated successfully, but these errors were encountered: