0 Replies Latest reply on Jun 11, 2007 7:51 AM by BaileyBurger

    SolidColor from data provider

    BaileyBurger
      Greetings!

      Building a bar chart to reflect employee hours logged to a given project. I need to be able to set the colors of the bars to represent departments so that employees in client services dept have red bars, employees in project services have blue bars, etc. I also need these colors to come from my data provider.

      I think the code below is close, but its not working. Any insight is appreciated!

      <mx:BarChart id="MyChart" dataProvider="{chartClient3b.lastResult.ITEM}">
      <mx:verticalAxis>
      <mx:CategoryAxis dataProvider="{chartClient3b.lastResult.ITEM}" categoryField="EMPLOYEE"/>
      </mx:verticalAxis>
      <mx:series>
      <mx:BarSeries yField="EMPLOYEE" xField="HOURS" displayName="Hours">
      <mx:fill>
      <mx:SolidColor color="{ClientChart3b.lastResult.ITEM.COLOR}"/>
      </mx:fill>
      </mx:BarSeries>
      </mx:series>
      </mx:BarChart>