| Extending your Charts > Resizing Charts |
There are two ways in which you could resize a chart:
Let’s study them one by one. |
| By changing the size of the HTML container itself |
| You could change the size of the HTML container to change the visual dimensions of the graph. For example, in the code below, we have changed the size to 452x336: |
| <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="452" HEIGHT="336" id="FC2Column" ALIGN=""> <PARAM NAME=movie VALUE="../../Graphs/FC2Column.swf?dataUrl=Data.xml"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="../../Graphs/FC2Column.swf?dataUrl=Data.xml" quality=high bgcolor=#FFFFFF WIDTH="452" HEIGHT="336" NAME="FC2Column" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> |
| If you now see the graph in a browser, you’ll see distorted text as under: |
![]() |
| So, to ensure that the text isn’t distorted when scaled, you need to increase the value of baseFontSize attribute of the graph element. Let’s change it to baseFontSize=’12’ in Data.xml. With this attribute in place, if you now have a look at the graph, it would look as under: |
![]() |
| Thus, you saw how to resize the graph by changing the size of the HTML container. |
| By changing the size of the actual Flash movie |
| You can also change the size of the chart by changing the
size of the actual Flash movie. However, for this you need to be proficient
in Flash and ActionScript. Follow the steps listed below to change the size of the actual Flash movie:
An example looks as under: |
![]() |