Resizing a Chart |
||||
|
||||
|
||||
<html> ... <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="250" id="Column3D" > <param name="movie" value="../FusionCharts/FCF_Column3D.swf" /> <param name="FlashVars" value="&dataURL=Data.xml&chartWidth=400&chartHeight=250"> <param name="quality" value="high" /> <embed src="../FusionCharts/FCF_Column3D.swf" quality="high" name="Column3D" flashVars="&dataURL=Data.xml&chartWidth=400&chartHeight=250" width="400" height="250"type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> ... </html> |
||||
All in all, we need to change the width and height at 4 places:
In HTML Embedding method it is mandatory to provide the new parameters chartWidth and chartHeight else the chart will not be resized - only the container will. Here we change the size to 400x250 pixels and get the chart (shown below) with smaller dimension : |
||||
Using JavaScript Embedding method | ||||
Resizing a chart using JavaScript Embedding Method is easier. We just need to specify the width and height parameters of the chart while defining. Let us modify our previous JavaScript Embedded sample : |
||||
<html> |
||||
In the code above we have modified the required width and the height of the chart and we get the desired result. This code will produce the same chart shown above. |
||||
|
||||
Note that FusionCharts can accept size only in pixels and not in percentage or any other units. |