The following pie chart is specified as an XML Island in the header of the html document:
<XML ID="MYCHART">
<chart type="pie" style="width:200; height:100" interactive="on">
<titles>REVENUE,AQUISITIONS,PROFIT,OUTPUT</titles>
<data>1,2,3,4</data>
</chart>
</XML>
Now simply insert an instance of this chart anywhere into your HTML document by
<script> MakeChart("MYCHART"); </script>
Alternatively, the data can be specified in a separate XML Island as an HTML Table:
<XML ID="MYTABLE">
<table border="1">
<tr><th>Revenue</th><th>Aquisitions</th><th>Profit</th><th>Output</th></tr>
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
</table>
</XML>
<XML ID="MYCHART">
<chart type="pie" style="width:200; height:100" interactive="on">
<table src="MYTABLE"/>
</chart>
</XML>
You can then easily insert this HTML-Table into your document using a single line of JavaScript code:
<script> document.writeln(MYTABLE.XMLDocument.xml); </script>