Friday, June 06, 2008

using FusionCharts

example of using FustionCharts in Symfony project

create folder swf in /web
then copy Column3D.swf to it, /web/swf/Column3D.swf
then create the data file in it, /web/swf/Data.xml

in your application page, ie: dashboard/index insert

      <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="900" height="300" id="Column3D" >
         <param name="movie" value="/swf/Column3D.swf" />
         <param name="FlashVars" value="&dataURL=/swf/Data.xml">
         <param name="quality" value="high" />
         <embed src="/swf/Column3D.swf" flashVars="&dataURL=/swf/Data.xml" quality="high" width="900" height="300" name="Column3D" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object>

it's using relative path, the data and flash file are relative to the index.php in web folder (or frontend_dev.php)