Hello!  I've been using Flex for all of about three days now, and have
just hit a problem that I can't seem to find a solution for: I have a
[Bindable] XML variable called "queryResults" that I'm using as the
dataProvider for a dynamically-created LineChart (defined like this:
"chart.dataProvider=queryResults.institution.(attribute('composite')=='true');").
Based on what the user does in the GUI, my code occasionally updates
the "composite" attribute of the corresponding element in
queryResults, which should in turn add or remove the changed element
from the chart.  My problem is that the changes aren't being reflected
in the LineChart.

I began by building the LineChart statically using MXML tags, and it
DID work then:  Changing the "composite" attribute to "false" took
that element out of the chart, and changing it back to "true" put it
back in (this was with the MXML dataProvider attribute defined like
this:
dataProvider="{queryResults.institution.(attribute('composite')=='true')}").
Unfortunately, my requirements don't make static charts a good option;
so I need to find a solution with the dynamically-created chart.

The ActionScript that I'm using to create the LineChart is below. I'm
hoping that I'm just missing something simple, but I'm having a hard
time finding examples that are specifically like this one. Any help is
greatly appreciated!

Thanks,
Mark

-------------------

var chart:LineChart = new LineChart();
chart.id="chart";
chart.percentHeight=100;
chart.percentWidth=100;
chart.dataProvider=queryResults.institution.(attribute('composite')=='true');
chart.showDataTips=true;
chart.dataTipFunction=formatVerticalDataTip;
chart.horizontalAxis=categoryAxis;
chart.series=series;

Reply via email to