workstream Report post Posted August 24, 2011 (edited) Hey all, I'm pretty new to fusion charts so hopefully this makes sense. Working on some legacy code (uses v3 charts though i think) which works something like this. Chart swf is changed into xml using swf2xml (swfmill). Xml string for chart data is added into this source xml using dom manipulation etc. under strXML at xpath : /swf/Header[1]/tags[1]/DoAction[5]/actions[1]/Dictionary[1]/strings[1]/String[99] Chart xml is then turned back into swf using xml2swf. This works fine for now, but when upgrading to new charts i am not able to find strXML in the xml source, or anything else that seems to work. Do the newest charts have a different name or is this not a valid way of manipulating charts? thanks, Adrian Edited August 24, 2011 by workstream Share this post Link to post Share on other sites
workstream Report post Posted August 25, 2011 Basically i'm trying to do what is here: http://forum.fusioncharts.com/topic/5561-fusion-chart-in-pdf-document/ "you can opt to create a chart (as a Flash movie) in Flash itself (using Flash 8) embedding your data in it and add the Flash movie into a PDF using Adobe Acrobat Professional 8 or above." I need to know how to add the data in the newer charts that don't seem to have strXML Share this post Link to post Share on other sites
Guest Angshu Report post Posted August 26, 2011 Hi, Thanks for your post. Could you please elaborate your query a bit more? Please find the sample zip file attached for your reference. Hope this helps. FusionCharts in PDF.zip Share this post Link to post Share on other sites
workstream Report post Posted August 26, 2011 Angshu, thanks for the reply. Could you point me to documentation for how to create the PDF in your post, especially the part about "Embed the chart data as xml in the movie as string"? We currently have PDFs with charts, but the method for creating them seems to have changed in the latest fusioncharts (unless i am doing something wrong). In the existing older fusion charts we were able to convert the swf to XML , then inject our XML data like so: <DoAction> <actions> <Dictionary> <strings> ..... <String value="setDataXML method invoked from external script."/> <String value="XML"/> <String value="strXML"/> <String value="<chart palette='2' bgColor='FFFFFF,F3DF96' bgRatio='50,50' bgAngle='270' bgAlpha='100,70' shownames='1' showvalues='1' decimals='0' caption='Salary by Country AM bar 3' chartRightMargin='20' slantLabels='0' xAxisName='Country' legendBorderAlpha='0' showLegend='0' yAxisName='Salary' canvasBorderColor='#000000' canvasBorderThickness='1Point' showLabels='1' numberPrefix='$'><categories><category label='CANADA' /><category label='EUROPE' /><category label='INDIA' /><category label='USCENTRAL' /><category label='USEAST' /><category label='USWEST' /></categories><dataset seriesName='' plotBorderColor='1D8BD1'><set counter='3' value='473556.16413561950321309268474578857421875' /><set counter='2' value='505387.8223679999937303364276885986328125' /><set counter='1' value='42002.676964500002213753759860992431640625' /><set counter='5' value='881292' /><set counter='1' value='161880' /><set counter='11' value='1751694' /></dataset><styles><definition><style name='titleFont' type='font' font='Arial' size='11' color='#000000' bold='1' /><style name='xAxisFont' type='font' size='11' color='#00000' /><style name='yAxisFont' type='font' size='11' color='#00000' /><style name='labelFont' type='font' font='Arial' size='9' color='000000' bold='0' /></definition><application><apply toObject='Caption' styles='titleFont' /><apply toObject='xAxisName' styles='xAxisFont' /><apply toObject='yAxisName' styles='yAxisFont' /><apply toObject='DataLabels' styles='labelFont' /></application></styles></chart>"/> <String value="indexW"/> <String value="indexH"/> <String value="indexToken"/> <String value="&chartWidth"/> <String value="&chartHeight"/> <String value="&@"/> <String value="cWidth"/> <String value="_chartWidth"/> <String value="cHeight"/> <String value="_chartHeight"/> <String value="substring"/> <String value="parseInt"/> <String value="isNaN"/> <String value="_scaleMode"/> <String value="_debugMode"/> <String value="this"/> <String value="core"/> <String value="charts"/> <String value="MSBar3DChart"/> <String value="_registerWithJS"/> <String value="flash"/> <String value="external"/> <String value="ExternalInterface"/> <String value="available"/> <String value="Cannot register chart with external script. You need to allow script access for this chart."/> <String value="_DOMId"/> <String value="FC_Loaded"/> <String value="call"/> <String value="Chart registered with external script. However, the DOM Id of chart has not been defined. You need to define it if you want to interact with the chart using external scripting."/> <String value="Chart registered with external script. DOM Id of chart is "/> <String value="exDU"/> <String value="setDataURL"/> <String value="addCallback"/> <String value="exDX"/> <String value="setDataXML"/> <String value="strXMLValue"/> <String value="loadDataString"/> ... This is then turned back into an SWF and then embedded/injected into PDF. Now the new fusion charts don't seem to have loadDataString or strXML/strXMLValue so I am a little confused at what to do. Also, i'm assuming this was non-standard work. Thanks, Adrian Share this post Link to post Share on other sites
Guest Angshu Report post Posted August 26, 2011 Hi, This link might help you: http://www.youtube.com/watch?v=9-_HaRItRH4 Share this post Link to post Share on other sites
workstream Report post Posted August 26, 2011 Hi, This link might help you: http://www.youtube.c...h?v=9-_HaRItRH4 Hey Angshu, As we are creating chart data on the fly as part of a reporting tool I am not sure if this is a possible solution. Do you have any familiarity with the method I posted for pre-populating data in charts? thanks, Adrian Share this post Link to post Share on other sites
workstream Report post Posted August 26, 2011 Hey Angshu, As we are creating chart data on the fly as part of a reporting tool I am not sure if this is a possible solution. Do you have any familiarity with the method I posted for pre-populating data in charts? thanks, Adrian Also, if you could send me a sample SWF that was created in this manner (before being inserted into PDF) that may help. thanks, Adrian Share this post Link to post Share on other sites
workstream Report post Posted September 14, 2011 Sorry to bump this. I also opened a ticket (we have paid subscription) and was told this was not possible... ? Also, if you could send me a sample SWF that was created in this manner (before being inserted into PDF) that may help. thanks, Adrian Share this post Link to post Share on other sites