public function addAreaSeries(id:String, colour:uint,
+ var areaSeries:AreaSeries = new AreaSeries();+
+ areaSeries.id = id;+
+ areaSeries.name = "close";+
+ areaSeries.dataProvider = mainData;+
+ areaSeries.dataFunction = dfnGeneral;+
+ areaSeries.displayName = id;+
+ areaSeries.setStyle("areaStroke", new Stroke(colour, 1));+
+ areaSeries.setStyle("areaFill", new SolidColor(colour,
+ areaSeries.setStyle("fill", new SolidColor(colour, 1));+
+ areaSeries.setStyle("radius", 3);+
+ areaSeries.setStyle("form", "segment");+
+ areaSeries.setStyle("itemRenderer", new
+ // Back up the current series on the chart.+
var currentSeries:Array = mainChart.series;
// Add the new series to the current Array of series.
// Add the new Array of series to the chart.
mainChart.series = currentSeries;
However, the AS one doesn't seem to update when the slider is
moved? I'm slicing mainData, which is the dataprovider for both,
depending on how much the slider is moved - so the dataset for both
series changes when the slider is moved but only the MXML one
visibly changes - the AS one stays the same?.
Has anyone come across an issue like this before where an AS
component doesn't update whereas it's MXML counterpart does? Any
help would be greatly appreciated as I've been looking at this for
a good while now and can't seem to figure it out!