0 Replies Latest reply on Jul 3, 2007 12:14 PM by shish99

    [how to] have barchart create scrollbar

    shish99
      I'm a Flex novice, and am looking for a solution to have a barchart bring up a list of items that becomes scrollable when the items expand past, say 10 items. Results for 30 items, for example, will squish the bars together, making the text associated with them unreadable.

      Here is the sample code I am using:

      <mx:Canvas x="10" y="87" width="415" height="333" verticalScrollPolicy="on" horizontalScrollPolicy="off">
      <mx:BarChart type="stacked" id="bar" height="333"
      paddingLeft="5" paddingRight="5"
      showDataTips="true" dataProvider="{medalsAC}" y="0" width="389" x="8">

      <mx:verticalAxis>
      <mx:CategoryAxis categoryField="User"/>
      </mx:verticalAxis>

      <mx:series>
      <mx:BarSeries yField="User" xField="Green" displayName="Within Parameters" barWidthRatio="2">
      <mx:fill>
      <mx:SolidColor color="#33CC66"/>
      </mx:fill>
      </mx:BarSeries>

      <mx:BarSeries yField="User" xField="Yellow" displayName="Possible Violation" barWidthRatio="2">
      <mx:fill>
      <mx:SolidColor color="#FFFF65"/>
      </mx:fill>
      </mx:BarSeries>

      <mx:BarSeries yField="User" xField="Red" displayName="Confirmed Violation" barWidthRatio="2">
      <mx:fill>
      <mx:SolidColor color="#CC3333"/>
      </mx:fill>
      </mx:BarSeries>

      </mx:series>
      </mx:BarChart>
      </mx:Canvas>