1
votes

I want to rotate the data label to 90 degrees in column chart. I used the code written below but its not working.

    <fx:Style>
     @font-face{
        src: url("/assets/MyriadWebPro.ttf");
        fontFamily: myMyriad;
         embedAsCFF: false; 
    } 

    @namespace mx "library://ns.adobe.com/flex/mx";

    mx|ColumnSeries {
        labelPosition:outside;
        labelRotation:90;
    }     

     mx|ColumnChart {
        fontFamily: myMyriad;    
    } 
</fx:Style> 
1

1 Answers

0
votes

Try setting the labelRotation for the axis renderers.

<mx:horizontalAxisRenderers>
            <mx:AxisRenderer labelRotation="45"
                             styleName="myStyleNoCFF" axis="hAxis"/>
</mx:horizontalAxisRenderers>

Edit :

Set the showLabelVertically to true in the column chart.

 <mx:ColumnChart id="columnChart"
        width="100%"
        height="100%"
        showLabelVertically="true">