Sign in to follow this  
cja

Problem With Js Rendering Of Pie Chart With Single Value

Recommended Posts

Hi,

 

I'm having a problem with displaying a pie chart using js. It works OK if I have more than one field with a value, but with one field at 100 and the other 2 at 0 I get the attached chart generated. This happens in IE, Safari, FF and Chrome. The json code I am using is:

 

{"chart":{"basefont":"Arial","basefontsize":"11","basefontcolor":"707070","bgAlpha":"100","bgcolor":"FFFFFF","borderColor":"ffffff","showpercentagevalues":"1","plotbordercolor":"FFFFFF","enablesmartlabels":"0","showvalues":"1","showlabels":"0","showlegend":"1","legendBgAlpha":"0","legendBorderColor":"ffffff","legendShadow":"0","startingangle":"180","radius3d":"0","tooltipbgcolor":"525355","tooltipbordercolor":"525355","decimals":"0"},"data":[{"value":"0","label":"Detractors","color":"dc3636"},{"value":"0","label":"Neutrals","color":"d8d8d8"},{"value":"100","label":"Promoters","color":"8ecba1"}],"styles":{"definition":[{"name":"tooltipfont","type":"font","font":"Arial","size":"11","color":"ffffff"}],"application":[{"toobject":"ToolTip","styles":"tooltipfont"}]}}

Thanks for your guidance.

Charles.

post-19697-0-32412900-1339241233_thumb.png

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi Charles,

 

Can you please define 'startingangle to 360' instead of 180 and try ?

 

Hope this helps!

 

Hi,

 

I'm having a problem with displaying a pie chart using js. It works OK if I have more than one field with a value, but with one field at 100 and the other 2 at 0 I get the attached chart generated. This happens in IE, Safari, FF and Chrome. The json code I am using is:

 

{"chart":{"basefont":"Arial","basefontsize":"11","basefontcolor" :"707070","bgAlpha":"100","bgcolor":"FFFFFF","borderColor":" ffffff","showpercentagevalues":"1","plotbordercolor":"FFFFFF","enablesmartlabels" :"0","showvalues":"1","showlabels":"0","showlegend":"1" ,"legendBgAlpha":"0","legendBorderColor":"ffffff","legendShadow":"0" ,"startingangle":"180","radius3d":"0","tooltipbgcolor":"525355" ,"tooltipbordercolor":"525355","decimals":"0"},"data":[{"value" :"0","label":"Detractors","color":"dc3636"},{"value":"0" ,"label":"Neutrals","color":"d8d8d8"},{"value":"100","label" :"Promoters","color":"8ecba1"}],"styles":{"definition":[{"name" :"tooltipfont","type":"font","font":"Arial","size":"11" ,"color":"ffffff"}],"application":[{"toobject":"ToolTip","styles" :"tooltipfont"}]}}

Thanks for your guidance.

Charles.

Edited by Bindhu

Share this post


Link to post
Share on other sites

OK - that fixed it. I assume that's a bug?

 

One other change I had to make to get it to display as I wanted:

'radius3d' => '0' was not working in Safari / FF but was in IE. I changed to

'radius3d' => '1' and it displays fine in all (i.e. a flat pie chart)

 

Thanks.

 

Charles.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this