|
|
Chart resizing
To change the size of chart in your html document you need :
1. Change the size of swf embedded file in html document and turn scale off
thats an example of the part of html file, that shows the chart:
For small chart:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="180" height="150" id="anychart" align="middle">
<param name="movie" value="2DColumn?XMLFile=2DColumnSmall.xml"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" /> <param name="scale" value="noscale" /> <param name="salign" value="lt" /> <embed src="2DColumn.swf?XMLFile=2DColumnSmall.xml" quality="high" bgcolor="#ffffff"
width="180" height="150" scale="noscale" salign="lt" name="anychart" align="middle"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object> |
For big chart:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="650" height="650" id="anychart" align="middle">
<param name="movie" value="2DColumn?XMLFile=2DColumnBig.xml"/>
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" /> <param name="scale" value="noscale" /> <param name="salign" value="lt" /> <embed src="2DColumn.swf?XMLFile=2DColumnBig.xml" quality="high" bgcolor="#ffffff"
width="1200" height="400" scale="noscale" salign="lt" name="anychart" align="middle"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object> |
2. Change the size of displaying area in XML file
Example: 2DColumnSmall.xml:
<?xml version="1.0"?> <root> <type> <chart type='2DColumn'> <column_chart /> <values decimal_places='0'/> <hints enabled='no'/> <names rotation="-90" x_offset = '-10'> <font type="verdana_embed_tf" color="Black"/> </names> </chart> <workspace> <chart_area enabled='no' height='100' width='100' x='10' y='20'/> <base_area enabled='no'/> </workspace> </type> <data> <block> <set value='20' name="Jan" color="0xFAB442"/> <set value='22' name="Feb" color="0xFAB442"/> <set value='42' name="May" color="0xFAB442"/> <set value='30' name="Apr" color="0xFAB442"/> </block> </data> </root>
|
Example: 2DColumnBig.xml :
<?xml version="1.0"?> <root> <type> <chart type='2DColumn'> <column_chart> <background auto_color="no" color="Gray"/> <border color = "Black" enabled="yes"/> </column_chart> </chart> <workspace> <chart_area width='500' height='600' enabled='no'/> <base_area enabled="no"/> <name text='Annual Revenue'/> <subname text='in mil. $'/> <background enabled="no"/> </workspace> </type> <data> <block> <set value='8' name='1996'/> <set value='11' name='1997'/> <set value='20' name='1998'/> <set value='18' name='1999'/> <set value='22' name='2000'/> <set value='25' name='2001'/> <set value='27' name='2002'/> <set value='28' name='2003'/> <set value='27' name='2004'/> <set value='30' name='2005'/> </block> </data> </root>
|
Thats it - we get the result:
Small chart:
Big chart:
|