Sign in to follow this  
asifchouhan

Doughnut Chart Not Positioning

Recommended Posts

Hello Support

 

Please find the attached image, which will give the actual error which we are facing. The doughnut chart is not able to position that is x,y positions or Left,Top I want the chart to be in center of the screen.

post-9670-0-22125500-1315824085_thumb.png

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

Please try setting align="center" inside the <div> tag on your HTML page where you are defining the rendering of the chart.

Please find the sample code below:

 <div id="chartdiv" align="center"> 
FusionCharts. </div>
<script type="text/javascript">
var chart = new FusionCharts("../FusionCharts/Doughnut2D.swf", "ChartId", "500", "300", "0", "1");
 chart.setXMLUrl("data.xml");	
 chart.render("chartdiv"); </script> 

Hope this helps.

Share this post


Link to post
Share on other sites

Thanks Angshu

 

In my case, I have only space of 300 by 300, so I need to place the Doughnut chart appropriate to the width and height hence the diameter of the chart should be small. Please give me the solution how to make the diameter small of the doughnut chart?

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Please try the same by setting pieRadius and doughnutRadius attribute inside the <chart> element which lets you explicitly specify the outer radius and inner radius of the chart respectively.

 

Please find the sample code below:

 

<chart caption='Company Revenue' showPercentageValues='1' pieRadius='50' doughnutRadius='50'>
  <set label='Services' value='26' />
  <set label='Hardware' value='32' />
  <set label='Software' value='42' />
</chart>

 

Hope this helps.

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