Sign in to follow this  
Prakash K

Rendercharthtml Issue

Recommended Posts

Hi Prakash,

 

I am afraid, after looking into the generated code, it seems that you missed to use correct code, please check your code with the code given below and change your code accordingly:

 

 

System.Xml.XmlDocument oXML = new System.Xml.XmlDocument();

oXML.Load("Data/XMLFileMSDOpenClosed.xml");

strXmlMSDOpenClosed = oXML.OuterXml;

 

lbltest.Text = FusionCharts.RenderChartHTML( "Fusion Charts/FCF_MSColumn3D.swf", "", strXmlMSDOpenClosed, "MSDOpenClosed", "400", "300", false);

 

Please check the bold part in the code given above.

Share this post


Link to post
Share on other sites

Hi,

 

I have implement given below code :

System.Xml.XmlDocument oXML = new System.Xml.XmlDocument();

oXML.Load(Server.MapPath("~/" + "BasicExample/Data/XMLFileMSDOpenClosed.xml"));

strXmlMSDOpenClosed = oXML.OuterXml.Replace("\"", "\'");

 

System.Xml.XmlDocument oXML = new System.Xml.XmlDocument();

oXML.Load(Server.MapPath("~/" + "BasicExample/Data/XMLFileMSDOpenClosed.xml"));

strXmlMSDOpenClosed = oXML.OuterXml("\"", "\'");

 

But i am getting "Error in loading data"

 

Regards,

 

Prakash.K

 

 

 

Share this post


Link to post
Share on other sites

Hi Prakash,

 

To render the chart, you are passing XML string to the DataURL parameter instead of DataXML parameter, please refer to the code below:

 

Wrong code:

lbltest.Text = FusionCharts.RenderChartHTML( "Fusion Charts/FCF_MSColumn3D.swf", strXmlMSDOpenClosed, strXmlMSDOpenClosed, "MSDOpenClosed", "400", "300", false);

 

Correct code:

 

lbltest.Text = FusionCharts.RenderChartHTML( "Fusion Charts/FCF_MSColumn3D.swf", "", strXmlMSDOpenClosed, "MSDOpenClosed", "400", "300", false);

 

Also, please see the attached image for detailed reference.

post-1758-058524400 1300966885_thumb.jpg

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for reply,

 

I have checked given code ,." no date to display" massage in the chart.

 

my HTML Code

 

<!-- START Code Block for Chart MSDOpenClosed -->

<object id="MSDOpenClosed" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="300" width="400" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" >

 

<param name="movie" value="FusionCharts/FCF_MSColumn3D.swf">

<param name="FlashVars" value="&registerWithJS=1&chartHeight=300&DOMId=MSDOpenClosed&dataXML=<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1'><set label='Jan' value='462' /><set label='Feb' value='857' /><set label='Mar' value='671' /><set label='Apr' value='494' /><set label='May' value='761' /><set label='Jun' value='960' /><set label='Jul' value='629' /><set label='Aug' value='622' /><set label='Sep' value='376' /><set label='Oct' value='494' /><set label='Nov' value='761' /><set label='Dec' value='960' /></chart>〈=EN&scaleMode=noScale&chartWidth=400&debugMode=1">

<param name="wMode" value="opaque">

<param name="allowScriptAccess" value="always">

<param name="quality" value="best">

<param name="scaleMode" value="noScale">

 

<embed src="FusionCharts/FCF_MSColumn3D.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" width="400" type="application/x-shockwave-flash" wMode="opaque" id="MSDOpenClosed" scaleMode="noScale" quality="best" flashvars="&registerWithJS=1&chartHeight=300&DOMId=MSDOpenClosed&dataXML=<chart caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' showValues='0' formatNumberScale='0' showBorder='1'><set label='Jan' value='462' /><set label='Feb' value='857' /><set label='Mar' value='671' /><set label='Apr' value='494' /><set label='May' value='761' /><set label='Jun' value='960' /><set label='Jul' value='629' /><set label='Aug' value='622' /><set label='Sep' value='376' /><set label='Oct' value='494' /><set label='Nov' value='761' /><set label='Dec' value='960' /></chart>〈=EN&scaleMode=noScale&chartWidth=400&debugMode=1" allowScriptAccess="always" height="300" />

 

</object>

<!-- END Code Block for Chart MSDOpenClosed -->

 

Regards,

 

Prakash.K

Edited by Prakash K

Share this post


Link to post
Share on other sites
Guest Angie

Hi,

 

Welcome to FusionCharts Forum!smile.gif

 

Since, you are providing data in single series format, you would need to use single series swf file instead of muliseries swf file.

 

For this reason, you are getting "No Data to Display" error.

 

Please find the modified code below:

 

<param name="movie" value="FusionCharts/FCF_Column3D.swf">

For more details, please refer to the link: http://www.fusioncharts.com/free/docs/Contents/Debug/Basic.html

 

Hope this helps.smile.gif

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