Sign in to follow this  
shahid00704

Fusion Charts not working with Master Pages.

Recommended Posts

Hello i am trying to work on Fusion Charts. When i worked on fusion charts on Normal aspx pages i can generate Fusion Chart. But when i am trying this on Master pages i am not getting Chart.

 

 

 

here is the code which i am trying.

 

 

 

LitRegionVendorwise.Text = GetProductSalesChartHtml();

 

 

 

 

 

public string GetProductSalesChartHtml()

 

{

 

//In this example, we plot a single series chart from data contained

 

//in an array. The array will have two columns - first one for data label

 

//and the next one for data values.

 

 

 

//Let's store the sales data for 6 products in our array). We also store

 

//the name of products.

 

object[,] arrData = new object[6, 2];

 

//Store Name of Products

 

arrData[0, 0] = "Product A";

 

arrData[1, 0] = "Product B";

 

arrData[2, 0] = "Product C";

 

arrData[3, 0] = "Product D";

 

arrData[4, 0] = "Product E";

 

arrData[5, 0] = "Product F";

 

//Store sales data

 

arrData[0, 1] = 567500;

 

arrData[1, 1] = 815300;

 

arrData[2, 1] = 556800;

 

arrData[3, 1] = 734500;

 

arrData[4, 1] = 676800;

 

arrData[5, 1] = 648500;

 

 

 

//Now, we need to convert this data into XML. We convert using string concatenation.

 

string xmlData;

 

//Initialize element

 

xmlData = "";

 

//Convert data to XML and append

 

for (int i = 0; i < arrData.GetLength(0); i++)

 

{

 

xmlData += "";

 

}

 

//Close element

 

xmlData += "";

 

 

 

//Create the chart - Column 3D Chart with data contained in xmlData

 

return FusionCharts.RenderChart("../../FusionCharts/Column2D.swf", "", xmlData, "productSales", "600", "300", false, false);

 

}

 

 

 

 

 

I have given reference to fusionCharts dll file.

 

 

 

here I have FusionCharts Folder in my application root folder. and all swf files i have in that.

 

 

 

i have tried changing the path in all ways

 

 

 

i tried in these ways...

 

return FusionCharts.RenderChart("FusionCharts/Column2D.swf", "", xmlData, "productSales", "600", "300", false, false);

 

return FusionCharts.RenderChart("<%= Page.ResolveUrl('~')%>FusionCharts/Column2D.swf", "", xmlData, "productSales", "600", "300", false, false);

 

 

 

return FusionCharts.RenderChart("../../FusionCharts/Column2D.swf", "", xmlData, "productSales", "600", "300", false, false);

 

 

 

i am getting just Text "Chart" on the literal control

 

 

 

seems that it is not rendering.

 

can somebody tell me where i am going wrong.

 

 

 

Thanks in advance.

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Rajroop

Hey Shahid,

 

 

 

Could you please make sure that your path reference for FusionCharts.js is correct/using correct path to include FusionCharts.js into your page? Please also make sure that the paths are not absolute but relative.

 

 

 

I hope this helps. :) Looking forward to your feedback on this.

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