I'm having a bit of difficulty making a NumericAxis show labels where I want it to. There is the 'ticks' property of the NumericAxis, but this is read only, so I have no idea how to set where I want labels to appear.
Specifically, this screen shot shows the problem I am seeing: http://sprymedia.co.uk/media/misc/flex/chart_axis.png . I'd really like to have a label at the bottom of the y-axis, rather than somewhere off it. I've set the 'minimum' value for the NumericAxis, the maximum and the interval, but I just don't seem to be able to control the position that the ticks (and therefore the labels) show. Is this possible?
Been diging throught he charts source to figure out if there is a way of doing what I wanted, and appartntly there is (well - for the most part). For anyone else interested there is a property called alignLabelsToInterval for the LinearAxis class. This is not documented but it is a public variable - in the code ( http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/frameworks/projects/charts/src/m x/charts/LinearAxis.as ):
public function get alignLabelsToInterval():Boolean
public function set alignLabelsToInterval(value:Boolean):void
if (value != _alignLabelsToInterval)
_alignLabelsToInterval = value;
Setting this parameter to false allows the base label to stay on the origin of the chart. Then you need to compute a suitable interval for the axis to get the labels you want.