By default, everviz will try to display values on the vertical axis without showing decimals less than 1 if there is enough space to do so.
If you open the above chart at the url https://app.everviz.com/embed/pe3gPX1t-/?v=1 you will see what I mean.
Sometimes, this is not desirable. In such cases it is possible to override this behavior with custom code:, which is accessible from the sidebar:
function convertToMega(text) {
const match = text.match(/^(\d+)k$/i);
return match ? (match[1] >= 1000 ? (match[1] / 1000).toFixed(match[1] % 1000 > 0) + 'M' : match[1] + 'k') : text;
}
Highcharts.merge(true, options, {
yAxis: {
labels: {
formatter: function (p) {
var label = [this.axis.defaultLabelFormatter.call](
this.axis.defaultLabelFormatter.call)(this);
return convertToMega(label.replace(' ', ''))
}
}
}
})
Here is a link to a full screen view where this custom code is applied.
If there is enough interest to do so, we might change this behavior in the future. So do let us know what you think!