IcCube, How to change legend labels in an AMChart widget?

100 Views Asked by At

How can I change the legend labels in an AMCharts widget ?
I know I can change Category axis labels using their labelFunction(), Is there a way to do the same with legend ?

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

Putting this function in the JS On data received event did the trick!

function(context, data, $box) {

    data.underlying.axes[0].caption[0] = textPreviousYear;
    data.underlying.axes[0].caption[2] = textPeriod;

    return data;
}

Not sure it is the best way to proceed, but it works.