Despite setting the labelRotation property to 90 in this column chart, the axis labels are horizontal. Is there something additional I need to do?
<mx:ColumnChart id="myChart" height="100%" width="100%"
dataProvider="{myData}"
showDataTips="true">
<mx:horizontalAxis>
<mx:CategoryAxis id="h1" categoryField="code"/>
</mx:horizontalAxis>
<mx:horizontalAxisRenderers>
<mx:AxisRenderer axis="{h1}" labelRotation="90" />
</mx:horizontalAxisRenderers>
<mx:series>
<mx:ColumnSet type="stacked"
allowNegativeForStacked="true">
<mx:series>
<mx:ColumnSeries xField="code"
yField="A"
displayName="A"/>
<mx:ColumnSeries xField="code"
yField="B"
displayName="B"/>
<mx:ColumnSeries xField="code"
yField="C"
displayName="C"/>
<mx:ColumnSeries xField="code"
yField="D"
displayName="D"/>
<mx:ColumnSeries xField="code"
yField="F"
displayName="F"/>
</mx:series>
</mx:ColumnSet>
</mx:series>
</mx:ColumnChart>
EDIT: I tried embedding the font, as suggested by Amy and fotomut, but it didn't do anything:
<mx:Style>
@font-face
{
src:url("../assets/fonts/FRABK.ttf");
fontFamily: myFontFamily;
embedAsCFF: false;
}
ColumnChart
{
fontFamily: myFontFamily;
fontSize: 10;
}
</mx:Style>
The key to making the labelRotation work is embedding of fonts. There is a good article on Flex 4.6 here
A simple code example would be to add a style to the mxml file,
EDIT: I confirmed that this works for me using Flex 3.5, by simply changing
fx:Style
tomx:Style
Perhaps you should try embedding Arial like this first to see if that works?
Embed the font used on that label. If for some reason you can't embed the font, sometimes setting the blendMode to "layer" will work.