ColdFusionKing
Programmer
Hello Everybody,
I'm new to flash. I'm using the flash barchart component, which gets the values from a cfc via remoting. See the below code. It magically works.
var theData = new DataProviderClass();
var items = new Array();
for (var i = 0; i < list_temp.length; i++) {
items = {bytes: "", value: list_temp};
}
for (var i = 0; i < items.length; i++) {
theData.addItem(items);
}
myChart.setDataProvider(theData);
In the code above I'm looping through the list (list_temp - ex: 100,200,300,400,500) and pushing its contents in a array (items). Looping through the array and pushing the values to the top of the chart's data provider and finally setting the instance of the chart component with the data.
So all this works fine. I want to now pass another list of data to the same chart. So I want the chart to display the data from two lists. I don't know how to do this and need your help.
Basically I want my graph to represent the sales figures in the current month and sales figures in the last month. If possible display the sales figures in two different colors. I hope this is making sense. Please help
Allan
I'm new to flash. I'm using the flash barchart component, which gets the values from a cfc via remoting. See the below code. It magically works.
var theData = new DataProviderClass();
var items = new Array();
for (var i = 0; i < list_temp.length; i++) {
items = {bytes: "", value: list_temp};
}
for (var i = 0; i < items.length; i++) {
theData.addItem(items);
}
myChart.setDataProvider(theData);
In the code above I'm looping through the list (list_temp - ex: 100,200,300,400,500) and pushing its contents in a array (items). Looping through the array and pushing the values to the top of the chart's data provider and finally setting the instance of the chart component with the data.
So all this works fine. I want to now pass another list of data to the same chart. So I want the chart to display the data from two lists. I don't know how to do this and need your help.
Basically I want my graph to represent the sales figures in the current month and sales figures in the last month. If possible display the sales figures in two different colors. I hope this is making sense. Please help
Allan