DuPreez 1 Posted October 3, 2011 Report Share Posted October 3, 2011 Cannot rotate columnChart labels. I'm embedding a font & using a horizontal axisrenderer, yet still I cannot rotate the labels! Please help! Here's my code: <fx:Style> @namespace mx "library://ns.adobe.com/flex/mx"; @font-face { src: url("assets/fonts/DiavloM.otf"); font-family: Dia; fontStyle: normal; fontWeight: normal; embedAsCFF: false; } mx|ColumnChart { fontFamily: Dia; fontSize: 12; } </fx:Style> <mx:ColumnChart id="testChart2" dataProvider="{testInfo}" showDataTips="true" width="80%" height="30%"> <mx:horizontalAxis> <mx:CategoryAxis id="haxis" categoryField="Type" dataProvider="{testInfo}"/> </mx:horizontalAxis> <mx:verticalAxis> <mx:LinearAxis minimum="0" maximum="{maxNum}" interval="1"/> </mx:verticalAxis> <mx:series> <mx:ColumnSeries yField="num" fontSize="10" showDataEffect="{changeEffect1}" xField="Type" displayName="Type"/> </mx:series> <mx:horizontalAxisRenderer> <mx:AxisRenderer labelRotation="-45" axis="{haxis}" /> </mx:horizontalAxisRenderer> </mx:ColumnChart> Quote Link to post Share on other sites
Larry 428 Posted October 6, 2011 Report Share Posted October 6, 2011 Could you confirm what version of Flex you're using? Quote Link to post Share on other sites
DuPreez 1 Posted October 7, 2011 Author Report Share Posted October 7, 2011 Flex 4. And in the meantime I got it working like so: <fx:Style> @namespace mx "library://ns.adobe.com/flex/mx"; @namespace s "library://ns.adobe.com/flex/spark"; @font-face { src: local("Verdana"); fontFamily: VerdanaEmbedded; fontWeight: bold; color: #000000; embedAsCFF: false; } mx|ColumnChart { fontFamily: VerdanaEmbedded; fontSize: 10; } For some reason the fontWeight must be 'bold'. If I change it to 'normal' it doesn't work anymore. A great mystery... 1 Quote Link to post Share on other sites
Larry 428 Posted October 7, 2011 Report Share Posted October 7, 2011 Boy that is strange. Kudos for figuring that out and thanks for sharing your solution. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.