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

flot can not draw pie in ie8 #850

Closed
lynzz opened this issue Oct 26, 2012 · 3 comments
Closed

flot can not draw pie in ie8 #850

lynzz opened this issue Oct 26, 2012 · 3 comments
Assignees
Labels
Milestone

Comments

@lynzz
Copy link

lynzz commented Oct 26, 2012

If two data value differ one hundred thousand times ,that can not display anything.
Code example: https://gist.github.com/3956557

@jamesinc
Copy link

There should deinitely be an option to set a minimum arc size for plot
items, though I can see that creating a bunch of problems of its own.

In the meantime, you can probably work around it by multiplying your tiny
value by some order of magnitude (until it becomes visible), and then
dividing it by that same amount in the label format function.

@dnschnur
Copy link
Member

No, this isn't actually about the smaller value being too tiny to show up; it's a real bug. It doesn't even really relate to the values; it applies to pies in general on IE8 There's an open pull request that addresses this, but unfortunately it includes a bunch of other stuff and I haven't had time to manually merge/apply just this fix yet.

@ghost ghost assigned dnschnur Nov 3, 2012
@dnschnur
Copy link
Member

This issue has the same underlying cause as #444. I spent some time tracing it back through excanvas, and found that it's actually a more fundamental issue. Flot uses arcs to draw pies, and it's apparently a limitation of IE's VML implementation that when an arc's start and end points are equal, nothing is drawn.

In this case the two series differ so much that the size of one slice becomes essentially zero, and it is not drawn. Since the difference between the start and end of the other slice is also zero, it is not drawn either.

Various hacks try to work around this by adding some small value or setting a minimum on the arc size, but these are messy and unreliable. A better solution, which I found indirectly as an answer to a Stack Overflow question, is to simply draw two arcs for every slice, with each arc covering half the size of the slice. This ensures that both arcs are drawn correctly even at an effective 100% total size.

I'm testing this fix, along with various other pie-related fixes, before merging them into master.

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

No branches or pull requests

3 participants