The following is a piechart that uses series data.
Example 60. Simple piechart
<canvas height="400" width="400"> <dataset name="baseball" src="../data/pie-data.xml"/> <piechart id="chart1" width="500" height="500" dataPointsEnabled="true" datalabelEnabled="true" datalabelColumn="y" style="defaultchartstyle"> <dataseries datapath="baseball:/records"> <datacolumn name="x" columndatapath="record/@year" datatype="number"/> <dataseries label="wins"> <datacolumn name="y" columndatapath="record/@wins" datatype="number"/> </dataseries> <datacolumn name="tooltip" columndatapath="record"> <method name="processData" args="v"> return "year: " + v.attributes.year + " wins: " + v.attributes.wins; </method> </datacolumn> </dataseries> <strokestyle name="pieslicestyle" strokeColor="0x000000" strokeWidth="2" strokeType="dotted" /> <legend name="legendbox" legendFontsize="14" initstage="late" legendborder="false"> <handler name="onitemmouseover" args="item"> var piepiece = parent.plotarea.arrPiePieces[item.identifier]; piepiece.renderInnerWedge(); </handler> <handler name="onitemmouseout" args="item"> var piepiece = parent.plotarea.arrPiePieces[item.identifier]; piepiece.renderWedge(); </handler> </legend> </piechart> </canvas>
Copyright © 2002-2007 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.