Sign in to follow this  
sutare

render graph in sharepoint webpart

Recommended Posts

I have tried following code ( and other code ) in a local server sharepoint installation with moss. But the graph does not render. What's wrong? I have set breakpoints in FusionCharts.js but the code does not run

Kind Regards Marcus

 protected override void CreateChildControls()

  {

  base.CreateChildControls();

  StringBuilder xmlData = new StringBuilder();

  string test = "<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue'  numberPrefix='$' showValues='0'>";

  xmlData.Append(test);

  xmlData.Append("<set label='Jan' value='420000' />");

  xmlData.Append("</chart>");

  StringBuilder sb = new StringBuilder();

  sb.Append("<div id="chartdiv"  style="height: 300px; width: 300px"");

  //------Testing 1------

  sb.Append("</div>");

  sb.Append("<script language="JavaScript" src="FusionCharts.js" type="text/javascript"> var myChart = new FusionCharts("Column2D.swf","Data.xml" ,"","productSaleshist2", "80", "29", "false", "false");");

  sb.Append("myChart.render("chartdiv");</script>");

  //-----Slut Testing 1------

  HtmlGenericControl graph = new HtmlGenericControl();

  graph.InnerHtml = sb.ToString();

  this.Controls.Add(graph);

  }

Share this post


Link to post
Share on other sites

Comment: I'm not using xmldata. Because I'm loading "Data.xml" with follwing code

<chart caption='Monthly Revenue' xAxisName='Month' yAxisName='Revenue' numberPrefix='$' showValues='0'>

  <set label='Jan' value='420000' />

</chart>

Share this post


Link to post
Share on other sites

I am experiencing the same problem.

For many months I was using fusioncharts embedded in a SharePoint page web part.  Everything worked fine.  We updated both SharePoint and Adobe Flash was upgraded around about the same time and the charts stopped displaying.  If I open the chart in a page of its own (i.e. not embedded in a SharePoint page web part) everything displays properly.

I am speculating that the newer version of Adobe Flash is causing the problem as I have viewed the page on older systems that have not been updated and everything seems to be working correctly with the chart displaying as part of the SharePoint page.

Any ideas on how to make this work would be very much appreciated.

Thanks!

Share this post


Link to post
Share on other sites
Guest Rajroop

Hi all,

 

We proudly announce the release of FusionCharts for SharePoint in beta. FusionCharts for SharePoint helps you create interactive & data-driven charts in SharePoint, without having to write a line of code. The charts are created using a wizard and can connect to various data sources such as SharePoint Lists, CSV, MS SQL, Oracle, Excel & BDC. You can add drill-down and export capabilities to each chart and configure both cosmetic and functional aspects.

 

 

You can download the fully-functional version from www.fusioncharts.com/sharepoint - we would love to have your feedback on this.

 

Please post your suggestions and any bugs as replies to the forum thread at:

FusionCharts for SharePoint beta impression

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