A frequent question that is asked to our support team is how to rotate labels and keep them aligned correctly for charts. For cartesian charts, there are 2 axes (vertical and horizontal). Each axis is really an extended gauge control, with full control over tick marks, length of ticks, offset of ticks, color, label rotation, how far the labels move from the axis, etc. The following set of properties are useful in label rotation and positioning:

myChart.horizontalAxis.labelXOffset = -20;      //this gives it enough space to rotate (pushes the labels left)

myChart.horizontalAxis.labelYOffset = 70;       //this gives it enough space to rotate (pushes the labels down)

myChart.horizontalAxis.labelRotation = -45; //the angle by which you want to rotate the labels

myChart.horizontalAxis.tickMajorLabelStyleName = "rightAlign"; //this style makes the labels align right

myChart.horizontalAxis.autosizeLabels = false//this tells the chart not to size the labels on basis of the content of the label

myChart.horizontalAxis.tickLabelFactory = UIUtils.createRenderer(Label,{'width':100})     //this gives a fixed width to the labels so they dont appear jagged

 

Below is what the chart will look like:

 

 

Below is the code used to make this happen:

 

LineChartLabelRotationIssue.mxml (4.54 kb)