Formatter Function (Assume not supported but is there a workaround)?

Hi all,

I have two Apliqo charts on the same page. Both charts are configured to read EXACTLY the same data. One chart is a standard Waterfall chart. The second is a Column chart that I’ve slightly JSON-modified to turn into a Stacked Column chart.

The numbers above each column in the Waterfall chart are auto-formatting to the nearest K or M. The CFO likes this!

The numbers above each column in the Stacked Column chart are returning exactly the same values as the first chart, but displaying these values in full dollars and cents.

The CFO wants the number formatting of the Stacked Column chart changed to match that of the Waterfall chart.

Repeating… I have not done any JSON changes to the Waterfall chart. I have JSON-modified the second chart to convert it from Column to Stacked Column. But in neither chart have I JSON-modifed any data formats.

When researching this issue, I keep seeing reference the “formatter” JavaScript function everywhere (as reproduced below). I would have no issue writing this function in JS for Canvas, but from what I can tell both in my own trials and from reading here on the forums, there’s no way to add this function into the “Advanced Options” of an Apliqo chart.

Any suggestions on how to meet the CFO’s request? (Remembering again that both charts are reading from exactly the same cube definitions).

Highcharts.chart(‘container’, {

series: [{
dataLabels: {
enabled: true,
formatter: function() {
if (this.y > 1000000) {
return Highcharts.numberFormat(this.y / 1000, 3) + “M”
} else if (this.y > 1000) {
return Highcharts.numberFormat(this.y / 1000, 3) + “K”;
} else {
return this.y
}
}
}
}]

});

Thanks in advance for any help!

Has anyone come up against this before? Is there a solution?

One chart scales as units. Other scales as millions. Both reading from same cube data.