Search tutorials
Actionscript for functions frame
The functions frame should contain the following code:
function LoadChartData() {
var BaseNode = thisXML.childNodes[0];
//set up arrays
var ArrLabel = new Array();
var ArrValue = new Array();
var ThisNode;
//create datasource
var ChartData = new DataProviderClass();
//get Chart Data
for (var i=0; i < BaseNode.childNodes.length; i++) {
ThisNode = BaseNode.childNodes[i];
ArrLabel[i] = ThisNode.attributes["ChartLabel"];
ArrValue[i] = ThisNode.attributes["ChartValue"];
ChartData.addItem({DataLabel:ArrLabel[i], DataValue:ArrValue[i]});
}
MyChart.setDataProvider(ChartData);
MyChart.setLabelSource("DataLabel");
MyChart.setValueSource("DataValue");
}
| » Level Intermediate |
|
Added: 2002-08-07 Rating: 7.79 Votes: 33 |
| » Author |
| Applications Developer Marconi Australia |
| » Download |
| Download the files used in this tutorial. |
| Download (120 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!