2 Replies Latest reply on May 21, 2009 9:11 PM by aruvasavi

    How to tilt the x-field label vertically in graphs




      Please find the attached pic containing column graph

      Let me know how to tilt the x-field labels vertically( USA CHINA RUSSIA vertically…)

      Please find the below code and let me know...



      <?xml version="1.0"?>
      <!-- Simple example to demonstrate the ColumnChart and BarChart controls. -->
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

              import mx.collections.ArrayCollection;

              private var medalsAC:ArrayCollection = new ArrayCollection( [
                  { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                  { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                  { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);

          <mx:Panel title="ColumnChart and BarChart Controls Example"
              height="100%" width="100%" layout="horizontal">

              <mx:ColumnChart id="column" height="100%" width="45%"
                  paddingLeft="5" paddingRight="5"
                  showDataTips="true" dataProvider="{medalsAC}">
                      <mx:CategoryAxis categoryField="Country"/>
                      <mx:ColumnSeries xField="Country" yField="Gold" displayName="Gold"/>
                      <mx:ColumnSeries xField="Country" yField="Silver" displayName="Silver"/>
                      <mx:ColumnSeries xField="Country" yField="Bronze" displayName="Bronze"/>

              <mx:Legend dataProvider="{column}"/>




      Thanks in Advance