1 Reply Latest reply on Jan 18, 2009 7:25 PM by ntsiii

    1 Data Source two charts

      I am working on something that uses an ilog Elixir map. When you click on an object in the map I want to populate a pie chart and a bar chart with xml data. Currently I have the clcik of the map item filling the pie chart with xml data but I am not sure how to also send data to the pie chart at the same time.

      XML sample

      <state id="CA" >
      <data name="data1" value="3" />
      <data name="data2" value="5" />
      <data name="data3" value="10" />
      <funds name="city" value="1"/>
      <funds name="county" value="2"/>
      <funds name="state" value="3"/>

      On my map I use mapItemClick to send the data to the pie: mapItemClick="pie.dataProvider = xml.state.(@id == event.mapFeature.key).data"

      and the pie is set up to pull the name and value from the .data in the xml:

      <mx:PieChart showAllDataTips="true" left="20" bottom="20" width="100" height="100" >
      <mx:PieSeries id="pie" nameField="@name" field="@value" />

      Is it possible for that click to send .data (name and value) to the pie and .funds (name and value) to another chart? Any ideas? Thanks

        • 1. Re: 1 Data Source two charts
          ntsiii Level 3
          Create a [Bindable] instance variable typed as an arrayCollection. eg: private var _acUSStates:ArrayColection
          Bind the dataProvier of whatever you want to that variable. For example:
          <mx:PieSeries id="pie" dataProvider="{_acUSStates}" nameField="@name" field="@value" />
          Bind your other chart the same way.