Skip to content
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

Pie Chart disappears in Chrome when one value is 0 and the other is 100 #187

Closed
ethornburg opened this issue Jul 20, 2013 · 5 comments
Closed

Comments

@ethornburg
Copy link

I had a pie chart with only two values [v, 100-v] and when v is 0, the chart fills up in the animation but then disappears when done.
This only seems to happen to me in Chrome, since it worked fine in Firefox.

@rizqyhi
Copy link

rizqyhi commented Sep 8, 2013

I've got the same problem, but with doughnut chart. using Chrome too.
any ideas on this?

@node200ok
Copy link

any ideas on this?

@node200ok
Copy link

i solved it!!!

// fix chromium(linux) bug
if (.isEqual(.compact(values), [1])) {
var index = values.indexOf(1),
ix = index === 0 ? 1 : index - 1,
diff = 0.000001;
values[index] -= diff;
values[ix] += diff;
}

funny!!

@fulldecent
Copy link
Contributor

I am not able to reproduce this problem using the new version release candidate.

Could you please check if this has been fixed and close or create a JSBin showing the issue.

Thank you

@willianby
Copy link

I was Able to reproduce this issue on Android 4.3 Samsumg galaxy s3 and Chart.js version 1.0.2.
With only one data item when draw finishes the chart dissapear and the fix was:
on Chart.js 1.0.2
calculateCircumference : function(value){ var perc = (Math.abs(value) / this.total); if (perc == 1) { return Math.PI*2.0 - 0.000001; else { return (Math.PI*2.0)*perc; } },

because the end angle was greater than the start Angle, its is not drawing canvas in this specific version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants