Replacing value axis value labels with arbitrary text

Martynas Majeris -

While it's not possible to directly establish value overrides with some text, it can be achieved using Guides.

First of all you need to disable regular value axis value labels:

valueAxis.labelsEnabled = false;

Then you just need to add Guide objects for each value you need.

// GUIDE for 100
var guide = new AmCharts.Guide();
guide.value = 100;
guide.lineColor = "#CC0000";
guide.label = "hello";
guide.inside = false; // this puts labels outside plot area
guide.lineAlpha = 0; // this makes the actual guide line not to show

Here's a full working demo.

Have more questions? Submit a request


Powered by Zendesk