0 Replies Latest reply on Aug 8, 2007 3:46 AM by

    Charts, Binding and a hashmap

      I'm trying to bind an array-collection to a column-chart - no problem to access the items "data" and "name" in this example:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      import mx.collections.ArrayCollection;
      public var coll:ArrayCollection = new ArrayCollection
      {data:1, name:"a", hashMap:{value:3}},
      {data:2, name:"b", hashMap:{value:5}}
      <mx:Panel layout="absolute" top="10" bottom="10" right="10" left="10">
      <mx:ColumnChart id="columnchart1" top="10" bottom="10" left="10" right="10" dataProvider="{coll}">
      <mx:ColumnSeries displayName="Array" yField="data"/>
      <!-- Doesn't work this way: -->
      <mx:ColumnSeries displayName="Hashmap in Array" yField="hashMap['value']"/>

      but I've no (working :-)) idea how to access the "value" in "hashMap".

      Can someone give an advice, how to solve this problem or where to look in documentation?

      Thanks in davance.