|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/20/2008 5:48:10 PM
Posts: 4,
Visits: 10
|
|
| I am having some difficulties, I am creating the XML string and passing some parameters through the link='' after setting data: exampl: <script type="text/javascript"> Ext.onReady(function() { var chart_HDS = new FusionCharts("flash/MSColumn3D.swf", "HDS", "800", "300", "0", "1"); chart_HDS.setDataXML("<chart caption='Datacenter total hds Storage vs. Free Storage' xAxisName='Datacenters' yAxisName='Storage (GB)' showValues='0' labelDisplay='ROTATE' slantLabels='1'><categories><category name='Bothell' /><category name='Dallas-ITO' /><category name='Windward' /><category name='WWDC-Lab' /></categories><dataset seriesName='phys'><set value='1149104' link='javascript:displayArea(Bothell,HDS)' /><set value='313606' link='javascript:displayArea(Dallas-ITO,HDS)' /><set value='1057704' link='javascript:displayArea(Windward,HDS)' /><set value='53799' link='javascript:displayArea(WWDC-Lab,HDS)' /></dataset><dataset seriesName='free'><set value='273591' /><set value='14305' /><set value='38439' /><set value='11276' /></dataset></chart>") chart_HDS.addParam("wmode", "transparent"); chart_HDS.render("HDSDiv"); }); </script>
As you can see from the red Highlight I have a function called displayArea(local,stor) {} , this is expecting to have 2 parameters passed to it, which I belive I am doing by passing (Bothell, HDS) after calling the function in the XML string. What am I doing incorrect here. The error I get is "Bothell is not defined"
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: 2 days ago @ 9:41:33 AM
Posts: 809,
Visits: 1,285
|
|
| hi, You need to put the string values passed to javascript functions within quotes. quotes need to be encoded. try like this :
link='displayArea(%26apos;Bothell%26apos;,%26apos;HDS%26apos '
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/8/2008 7:34:13 AM
Posts: 4,
Visits: 12
|
|
| Hi, I'm having a similar problem - here is my XML: <chart caption='Sales Points' showPercentageValues='1' animation='true' pieSliceDepth='30' showBorder='1' formatNumberScale='0' ><set label='NoArea' value='14' link='JavaScript:SetNextLevel(%26apos;5%26apos;,%26apos;%26apos;,%26apos;1|DIV%26apos;,%26apos;0%26apos '></chart> Does anyone know why this isn't working? Thanks
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117,
Visits: 498
|
|
One way to check this would be to switch the debug mode of chart to on. That'll show the link that chart has received.
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|