Replacing axis labels with arbitrary text

Although you can format value axis labels like duration, add unit to the left or right of the value, you might need something more - for example, to replace numeric values of value axis with some strings or add some text to category axis labels.

ValueAxis has labelFunction property for that. If you set some function for this property, axis, before displaying label, will call this function, pass value, formatted value and a reference to value axis as parameters. Your function should return string which will be displayed instead of default value.

This sample illustrates how values of ValueAxis can be replaced.

CategoryAxis has categoryFunction property, which acts the same. When axis calls this categoryFunction, it passes category, dataItem and reference to  categoryAxis as attributes.

P.S. in case you also need to change the text in category balloon of chart cursor, use categoryBalloonFunction property of ChartCursor class.