Bluespear
Bluespear

Reputation: 33

Flex 4, rotated horizontal label with embedded font truncated

I am trying to get the horizontal label of a ColumnChart rotated by 45°. I already know the font needs to be embedded for this to work, but now, my label are being truncated. Note that it worked in a basic chart proof-of-concept I made months ago, but now it is integrated in a panel with a verticalLayout, label are truncated.

The code is for the axis renderer is:

 <mx:horizontalAxisRenderers>
            <mx:AxisRenderer id="horAxisRenderer" labelRotation="-45" axis="{horAxis}"
                             styleName="horAxisStyle"
                              canDropLabels="true"
                    />        
 </mx:horizontalAxisRenderers>

And the font is:

@font-face {
src: url("/assets/fonts/Verdana.ttf");
font-family: verdana;
}


.horAxisStyle{
    font-family: verdana;
    font-size:8;
    color:red;
}

The result I obtain (font set to red to be sure the css is being used): http://piczasso.com/i/t1i96.png

Note that if I use the style for the vertical axis, I also get the number truncated to the first digit.

Upvotes: 1

Views: 1076

Answers (1)

Bluespear
Bluespear

Reputation: 33

Found the answer on: http://help.adobe.com/en_US/flex/using/WS0FA8AEDB-C69F-4f19-ADA5-AA5757217624.html

Since the column chart is an mx component, it doesn't support the support CFF.

Fixed by changing the following:

@font-face {
    src: url("/assets/fonts/Verdana.ttf");
    font-family: verdana;
    embedAsCFF:false;
}

Upvotes: 1

Related Questions