Sign in to follow this  
DASU

How to add fusion charts to dynamic div element in asp.net

Recommended Posts

Hi,

  We are trying to add fusionion charts dynamically to dynamic div controls. But when we try to add them it was giving error loading chart.

Following is the code we have used in page_load:

string divName = "divJurisdictionBetsChart" + Host.ID.ToString();

string FileName = "JurisdictionBetsData" + Host.ID.ToString() + ".xml";

//string divName = "divJurisdictionBetsChart" + Host.ID.ToString();

HtmlGenericControl mynewDiv = new HtmlGenericControl("div");

mynewDiv.Attributes.Add(

"id", divName);

mynewDiv.Attributes.Add(

"class", "ChartRender");

mynewDiv.InnerText =

"Jurisdiction Bets Chart. ";

this.Controls.Add(mynewDiv);

string output = FusionCharts.RenderChart("Charts/ScrollStackedColumn2D.swf", FileName, "", divName, "350", "440", false, false);

mynewDiv.Controls.Clear();

mynewDiv.Controls.Add(

new LiteralControl(output));

 

Thanks

Dasu.G

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