|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/20/2008 5:48:10 PM
Posts: 4,
Visits: 10
|
|
Okay so what I am doing is creating the XML data from a php script, in this XML for Fusion Charts you are suppose to be able to set link='javascript:<functionName>(<parameter> '
I have done some testing with this and cant figure out why I can't pass an alpha string to it. numeric strings work fine. non-working: link='javascript:drillArea(\"SomePlace\")' --- This becomes "Invalid XML Data in fusion Charts.link='JavaScript:drillArea(SomePlace)' ---- This becomes a javascript error of "SomePlace is not defined" link=\"JavaScript:drillArea('SomePlace')\" ---- this becomes "Invalid XML Data in Fusion Charts.
Working: link='javascript:drillArea(11350)'
the full string looks like this for the XML that is being passed to the FusionCharts <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 (TB)' 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(\'SomePlace\')'/><set value='313606' /><set value='1057704' /><set value='53799' /></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>
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 5:38:52 AM
Posts: 884,
Visits: 1,420
|
|
| hi, If you are using dataXML method to provide the XML then pleaseuse %26apos; instead of " in link='javascript:drillArea(\"SomePlace\")' so that it looks like link='javascript:drillArea(%26apos;SomePlace%26apos '. For dataURL method you need to use '
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 2/20/2008 5:48:10 PM
Posts: 4,
Visits: 10
|
|
| the %26apos; solved my problems thanks for your help on this. Now onto figuring a way to pass php variables that was passed by javascript. Thanks
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 5:38:52 AM
Posts: 884,
Visits: 1,420
|
|
| hi, Do you want to pass the values of the PHP variables to the javaScript function?
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|