1 Reply Latest reply on Mar 5, 2009 6:15 AM by matthew horn

    Using Repeater with BarChart

    taneojala Level 1
      I'm trying to use a Repeater to enable dynamic number of series in my BarChart (see the code below). I receive an error message like:

      TypeError: Error #1034: Type Coercion failed: cannot convert mx.core::Repeater@470810b1 to mx.charts.chartClasses.Series.
      at mx.charts.chartClasses::CartesianChart/commitProperties()[C:\work\flex\dmv_automation\pro jects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1078]
      at mx.core::UIComponent/validateProperties()[C:\autobuild\3.2.0\frameworks\projects\framewor k\src\mx\core\UIComponent.as:5807]
      at mx.managers::LayoutManager/validateProperties()[C:\autobuild\3.2.0\frameworks\projects\fr amework\src\mx\managers\LayoutManager.as:539]

      What's wrong? The documentation says I can use Repeater anywhere, and I think I try to use it in pretty much the same way as I see in examples (not BarCharts though).

      <mx:series>
      <mx:Repeater id="barsRepeater" dataProvider="{graphData}">
      <mx:BarSeries xField="c1" yField="plant" displayName="{barsRepeater.currentItem.name}"/>
      </mx:Repeater>
      </mx:series>