i need to plot a dynamic set of lines for comparison purposes. the data is
being
returned from cf as an array of VO something along the lines of:
sampleID (string)
transmittance (array)
waveNumber (array)
this bit works fine. i'm having problems getting the graph to plot using the
following function (smallFTIRComparisonChart is the mx:LineChart i'm drawing to
add the dynamic line series to):
private function ftirComparisonDataHandler(event:ResultEvent):void {
import mx.charts.series.LineSeries;
var thisSeries:LineSeries;
var series:Array=new Array();
ftirComparisonData=event.result as Array;
for (var i:int=0; i < ftirComparisonData.length; i++) {
thisSeries=new LineSeries();
thisSeries.dataProvider=ftirComparisonData[i];
thisSeries.displayName=ftirComparisonData[i].sampleID;
thisSeries.yField="transmittance";
thisSeries.xField="waveNumber"
series.push(thisSeries);
}
smallFTIRComparisonChart.series=series;
}
this all seems to work ok, no compile errors, debug shows all the going to the
right bits, the axis changes but no graph lines are produced. what am i
missing?
is there a better way to handle this?
thanks.