2 Replies Latest reply on Oct 21, 2010 4:55 PM by SiHoop

    Chart controls

    SiHoop

      In the following code, how can I control the width of a column (e.g. column width =10) and set the height of the y-axis instead of allowing Flex to set the max value for me?

      Thank you!

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
          <mx:Script>
              <![CDATA[
      import mx.collections.ArrayCollection;
      [Bindable] private var medalsAC:ArrayCollection = new ArrayCollection( [{ Country: "Russia", Gold: 20 },{ Country: "America", Gold: 10 } ]);
              ]]>
          </mx:Script>
          <mx:ColumnChart id="column" dataProvider="{medalsAC}"   columnWidthRatio=".9">
              <mx:horizontalAxis>
                  <mx:CategoryAxis categoryField="Country"/>
              </mx:horizontalAxis>
              <mx:series>
                  <mx:ColumnSeries xField="Country" yField="Gold" displayName="Gold"/>
              </mx:series>
          </mx:ColumnChart>       
      </mx:Application>