hey
the solution for your problem can be found in my blog at
http://flexphpworld.wordpress.com/2010/02/08/column-chart-with-rotated-axis-labels/
Note:
To use this example we need to copy Arial.ttf file from Control Panel-
>Fonts and put it in a folder ‘assets’ inside ’src’ folder of flex
project
On Feb 4, 4:43 pm, Akshar <[email protected]> wrote:
> I want to rotate the chart axis label. i have used the sample code
> provided by adobe
> @http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_...
> but i am not able to achieve the rotation.
> I have removed following lines in the sample code because i do not
> have the font ttf:-
>
> ------------------------------------------------------------------------------------------------------------
> <mx:Style>
> �...@font-face{
> src: url("../assets/MyriadWebPro.ttf");
> fontFamily: myMyriad;
> }
>
> ColumnChart {
> fontFamily: myMyriad;
> fontSize: 20;
> }
> </mx:Style>
>
> ------------------------------------------------------------------------------------------------------------
>
> any help in this direction will be helpful.
>
> my file is :-
>
> <?xml version="1.0"?>
> <!-- charts/RotateAxisLabels.mxml -->
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
> <mx:Script><![CDATA[
> import mx.collections.ArrayCollection;
> [Bindable]
> public var expenses:ArrayCollection = new ArrayCollection([
> {Month: "Jan", Profit: 2000, Expenses: 1500},
> {Month: "Feb", Profit: 1000, Expenses: 200},
> {Month: "Mar", Profit: 1500, Expenses: 500}
> ]);
> ]]></mx:Script>
>
> <mx:Panel title="Rotated Axis Labels">
> <mx:ColumnChart id="column" dataProvider="{expenses}"
> showDataTips="true">
> <mx:horizontalAxis>
> <mx:CategoryAxis
> dataProvider="{expenses}"
> categoryField="Month"
> title="FY 2006"
> id="a1"
> />
> </mx:horizontalAxis>
>
> <mx:horizontalAxisRenderers>
> <mx:AxisRenderer labelRotation="45" axis="{a1}"/>
> </mx:horizontalAxisRenderers>
> <mx:verticalAxisRenderers>
> <mx:AxisRenderer labelRotation="45" axis="{a1}"/>
> </mx:verticalAxisRenderers>
>
> <mx:series>
> <mx:ColumnSeries
> xField="Month"
> yField="Profit"
> displayName="Profit"
> />
> <mx:ColumnSeries
> xField="Month"
> yField="Expenses"
> displayName="Expenses"
> />
> </mx:series>
> </mx:ColumnChart>
> <mx:Legend dataProvider="{column}"/>
> </mx:Panel>
> </mx:Application>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.