RGraph Pie/Donut chart in IE8 if all or some values are 0

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by James on 17th September 2013
Hi all

I am using donut chart which displays fine in chrome, firefox etc. But I need to sort it out for IE8. If any values in the data is 0, it takes the centre colour. If all values are 0, then the donut displays a funny shape which several colours. Any ideas what's going on there?

Cheers
Posted by RGraph support on 17th September 2013
Hi there,

You may need to update your copy of ExCanvas to that which comes with RGraph:

www.rgraph.net/fiddle/view/a-pie-chart-with-0-values-in-ie


Richard, RGraph Support
Posted by James on 17th September 2013
Thanks for the reply, Richard. I did it but still no luck. here is a screenshot how it looks if all values are 0.
postimg.org/image/wwbll6plr/

Cheers
Posted by James on 17th September 2013
Follow up:

Here is how it looks if some values are empty
postimg.org/image/dzx070jp9/

Here is how it looks if all values are more than 0
postimg.org/image/sdhjwgsif/
Posted by RGraph support on 17th September 2013
Hi there,

Well how does the URL that I gave you look? And if you're using an emulator - my advice would be not to trust it - try using the options in the IE developer tools. With those you can test in IE7, IE8 and IE9.



Richard, RGraph Support
Posted by James on 17th September 2013
Hi Richard

The pie chart on the link looks fine. However, when I change it to a donut this happens. Not sure if it's a bug.
postimg.org/image/43adkc1rl/
Posted by James on 17th September 2013
I am using IE8 browser itself, not emulator. Thanks.
Posted by RGraph support on 17th September 2013
Hi there,

Try this updated version of the Pie chart library:

www.rgraph.net/pie.js

Let me know if it works with 0 values.




Richard, RGraph Support
Posted by James on 18th September 2013
Thanks Richard. Yes, that works perfect now if some values are zero. But still showing the funny shape when all values are zero. Refering the image:

postimg.org/image/wwbll6plr/

Is there any workaround?

Cheers
Posted by RGraph support on 18th September 2013
Hi there,

You will need at least one non-zero value to show a Pie chart.


Richard, RGraph Support
Posted by James on 18th September 2013
Thanks mate. I was wondering as all zero values are working fine on Chrome and Firefox and they don't draw any. Only on IE, this problem seems to appear with funny colours. I might have to remove the chart if empty for IE then. Thanks for your help mate, much appreciated.

Cheers
Posted by RGraph support on 18th September 2013
Hi there,

If the data is all zeros I get a blank Pie chart in Crome, IE and FF:

www.rgraph.net/fiddle/view/a-pie-chart-with-0-values-in-ie




Richard, RGraph Support
Posted by James on 18th September 2013
Are you using IE8? In my browser, I still get the same shape for your fiddle. Please see the screenshot

postimg.org/image/6kg7fp9f3/

Cheers
Posted by RGraph support on 18th September 2013
Hi there,


Yes - in IE8 it shows the odd shape. But in Chrome/FF/IE10 it shows nothing - so you'll need to say something like "No data" for all browsers.



Richard, RGraph Support
Posted by James on 18th September 2013
Yeah, probably that's the way until the era of IE8 is over :)

Cheers for your help.

Add a reply




« Back to message list