Sign in to follow this  
Guest Rajroop

RenderChartHTML returns 'Invalid XML' when including link attribute

Recommended Posts

My chart works perfectly until I add a link attribute eg.

<set label='May' value='20.25'  link='sales.aspx?viewid=1&mnth=11' borderColor='36648B'/>

On initial page load when rendering using FusionCharts.RenderChart it works fine but on post back using FusionCharts.RenderChartHTML I get 'Invalid XML'.

I've tried encoding and adding the full url

http://

 

Any Ideas?

Share this post


Link to post
Share on other sites

Thanks. Heres the HTML

<div id='moneyinDiv' >
<!-- START Code Block for Chart moneyin --> 
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="580" height="132" name="moneyin" id="moneyin" > 
<param name="allowScriptAccess" value="always" /> 
<param name="movie" value="FusionCharts/Column2D.swf"/> 
<param name="FlashVars" value="&chartWidth=580&chartHeight=132&debugMode=0&registerWithJS=0&DOMId=moneyin&dataXML=
<chart caption='' numberPrefix='' showvalues='0' bgColor='FFFFFF' chartTopMargin='10' chartBottomMargin='5' chartRightMargin='30' chartLeftMargin='10' showAlternateHGridColor='0'  formatNumberScale='0' paletteColors='018DC3' divLineIsDashed='1' divLineDashLen='1' divLineDashGap='2' plotFillAlpha='70' borderColor='FFFFFF' >
<set label='Jul' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=1'/>
<set label='Aug' value='622.2' borderColor='36648B' link='sales.aspx?viewid=1&mnth=2'/>
<set label='Sep' value='2516.14' borderColor='36648B' link='sales.aspx?viewid=1&mnth=3'/>
<set label='Oct' value='806.75' borderColor='36648B' link='sales.aspx?viewid=1&mnth=4'/>
<set label='Nov' value='3049.42' borderColor='36648B' link='sales.aspx?viewid=1&mnth=5'/>
<set label='Dec' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=6'/>
<set label='Jan' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=7'/>
<set label='Feb' value='11873.25' borderColor='36648B' link='sales.aspx?viewid=1&mnth=8'/>
<set label='Mar' value='5559.22' borderColor='36648B' link='sales.aspx?viewid=1&mnth=9'/>
<set label='Apr' value='1874.76' borderColor='36648B' link='sales.aspx?viewid=1&mnth=10'/>
<set label='May' value='20.25' borderColor='36648B' link='sales.aspx?viewid=1&mnth=11'/>
<set label='Jun' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=12'/>
<styles>
<definition>
<style name='myLabelFont' type='font' color='000000' bgColor='E8E8E8' bordercolor='666666'/>
</definition>
<application>
<apply toObject='DataLabels' styles='myLabelFont'/>
</application>
</styles>
</chart>&scaleMode=noScale〈=EN" /> 
<param name="quality" value="high" /> 
</object> 
<!-- END Code Block for Chart moneyin --> 
</div>

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello,

 

 

 

Please accept our apologies for the delay in the reply. :Whistling:

 

 

 

Could you set the registerWithJS option to 1 and try again?

 

 

 

I hope this helps. :)

Share this post


Link to post
Share on other sites

Thanks for the help. No that did not work.

I though I'd post both the code from RenderChart and RenderChartHTML for you to compare.

USING RENDERCHART - WORKS
"<!-- START Script Block for Chart moneyin --> 
<div id='moneyinDiv' > 
Chart. </div> 
<script type="text/javascript"> 
var chart_moneyin = new FusionCharts("FusionCharts/Column2D.swf", "moneyin", "580", "132", "1", "0", "", "noScale", "EN" ); chart_moneyin.setDataXML("<chart caption='' numberPrefix='' showvalues='0' bgColor='FFFFFF' chartTopMargin='10' chartBottomMargin='5' chartRightMargin='30' chartLeftMargin='10' showAlternateHGridColor='0'  formatNumberScale='0' paletteColors='018DC3' divLineIsDashed='1' divLineDashLen='1' divLineDashGap='2' plotFillAlpha='70' borderColor='FFFFFF' >
<set label='Jul' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=1'/>
<set label='Aug' value='622.2' borderColor='36648B' link='sales.aspx?viewid=1&mnth=2'/>
<set label='Sep' value='2516.14' borderColor='36648B' link='sales.aspx?viewid=1&mnth=3'/>
<set label='Oct' value='806.75' borderColor='36648B' link='sales.aspx?viewid=1&mnth=4'/>
<set label='Nov' value='3049.42' borderColor='36648B' link='sales.aspx?viewid=1&mnth=5'/>
<set label='Dec' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=6'/>
<set label='Jan' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=7'/>
<set label='Feb' value='11873.25' borderColor='36648B' link='sales.aspx?viewid=1&mnth=8'/>
<set label='Mar' value='5559.22' borderColor='36648B' link='sales.aspx?viewid=1&mnth=9'/>
<set label='Apr' value='1874.76' borderColor='36648B' link='sales.aspx?viewid=1&mnth=10'/>
<set label='May' value='20.25' borderColor='36648B' link='sales.aspx?viewid=1&mnth=11'/>
<set label='Jun' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=12'/>
<styles>
<definition>
<style name='myLabelFont' type='font' color='000000' bgColor='E8E8E8' bordercolor='666666'/>
</definition>
<application>
<apply toObject='DataLabels' styles='myLabelFont'/>
</application>
</styles>
</chart>"); chart_moneyin.render("moneyinDiv"); </script> 
<!-- END Script Block for Chart moneyin --> "
USING RENDERCHARTHTML - FAILS
"<div id='moneyinDiv' >
<!-- START Code Block for Chart moneyin -->
 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="580" height="132" name="moneyin" id="moneyin" > 
<param name="allowScriptAccess" value="always" /> 
<param name="movie" value="FusionCharts/Column2D.swf"/> 
<param name="FlashVars" value="&chartWidth=580&chartHeight=132&debugMode=1&registerWithJS=1&DOMId=moneyin&dataXML=<chart caption='' numberPrefix='' showvalues='0' bgColor='FFFFFF' chartTopMargin='10' chartBottomMargin='5' chartRightMargin='30' chartLeftMargin='10' showAlternateHGridColor='0'  formatNumberScale='0' paletteColors='018DC3' divLineIsDashed='1' divLineDashLen='1' divLineDashGap='2' plotFillAlpha='70' borderColor='FFFFFF' >
<set label='Jul' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=1'/>
<set label='Aug' value='622.2' borderColor='36648B' link='sales.aspx?viewid=1&mnth=2'/>
<set label='Sep' value='2516.14' borderColor='36648B' link='sales.aspx?viewid=1&mnth=3'/>
<set label='Oct' value='806.75' borderColor='36648B' link='sales.aspx?viewid=1&mnth=4'/>
<set label='Nov' value='3049.42' borderColor='36648B' link='sales.aspx?viewid=1&mnth=5'/>
<set label='Dec' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=6'/>
<set label='Jan' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=7'/>
<set label='Feb' value='11873.25' borderColor='36648B' link='sales.aspx?viewid=1&mnth=8'/>
<set label='Mar' value='5559.22' borderColor='36648B' link='sales.aspx?viewid=1&mnth=9'/>
<set label='Apr' value='1874.76' borderColor='36648B' link='sales.aspx?viewid=1&mnth=10'/>
<set label='May' value='20.25' borderColor='36648B' link='sales.aspx?viewid=1&mnth=11'/>
<set label='Jun' value='0' borderColor='36648B' link='sales.aspx?viewid=1&mnth=12'/>
<styles>
<definition>
<style name='myLabelFont' type='font' color='000000' bgColor='E8E8E8' bordercolor='666666'/>
</definition>
<application>
<apply toObject='DataLabels' styles='myLabelF
ont'/>
</application>
</styles>
</chart>&scaleMode=noScale〈=EN" /> 
<param name="quality" value="high" /> 
</object>
 <!-- END Code Block for Chart moneyin --> </div>"

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

 

 

 

link='sales.aspx?viewid=1&mnth=11'

 

link='sales.aspx?viewid=1%26mnth=11'

 

 

 

Could you please use url encoded link?

 

 

 

& = &

 

or

 

& = %26

 

 

 

:)

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
Sign in to follow this