maks

How to display chat at the center of the page

Recommended Posts

Hi:

I'm creating chart in ASP.net(C#). Everything is working fine and my chart is appearing,

but it's on left side of the page.

How could I display chart at the center of the page?

I tried.......

xmlData.Append("<div align='center'>");
xmlData.Append("<chart labelDisplay='Rota.........................
.......
xmlData.Append("</chart> ");
xmlData.Append("</div>");

chart is not appearing in that case.........

any help is highly appreciated.

Regard

Share this post


Link to post
Share on other sites

Hi,

It is a wrong code. You can not use <div> tag mixing with xml. You have to specify <div ..... align= 'center' > when you are rendering the chart. See this

String mVar="<div align='center' >"

mVar += FusionCharts.RenderChart( . .  . . . . . . );

mVar += "</div>";

Share this post


Link to post
Share on other sites

Tahnks for your reply Arindam.

But I can't use the code in my C# page.

String mVar="<div align='center' >" ;
mVar += FusionCharts.RenderChart("FusionCharts/StackedColumn3D.swf", "", xmlData.ToString(), "FactorySum", "450", "600", false, false); 
mVar += "</div>"; 

gives me error..........

Error 1 'Quarterly_Report.GetQuarterlyEventSummaryChartHtml()': not all code paths return a value 

thanks again for the help.

Regards,

Share this post


Link to post
Share on other sites

I rendered the chart using the following code:

return FusionCharts.RenderChart("FusionCharts/StackedColumn3D.swf", "", xmlData.ToString(), "FactorySum", "450", "600", false, false);

regards,

Share this post


Link to post
Share on other sites

Hi,

Please use this.

String mVar="<div align='center' >" ;

mVar

+= FusionCharts.RenderChart("FusionCharts/StackedColumn3D.swf", "", xmlData.ToString(), "FactorySum", "450", "600", false, false);

mVar += "</div>";

return mVar;

Edited by Guest

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