There are a number of formatting options in HighCharts.
To format a data label, formatter can be used as demonstrated at http://stackoverflow.com/questions/24708198/how-to-format-highcharts-datalabels-decimal-points.
A tooltip formatter formats tooltip e.g. http://stackoverflow.com/questions/16991335/highcharts-tooltip-formatter
To format axis labels a formatter can be configured as
I have created a fiddle to demonstrate this at http://jsfiddle.net/Lng7w9v0/
To format a data label, formatter can be used as demonstrated at http://stackoverflow.com/questions/24708198/how-to-format-highcharts-datalabels-decimal-points.
A tooltip formatter formats tooltip e.g. http://stackoverflow.com/questions/16991335/highcharts-tooltip-formatter
To format axis labels a formatter can be configured as
formatter: function () {
var ret = '',multi,axis = this.axis,numericSymbols = ['k', 'M', 'G', 'T', 'P', 'E'],
i = numericSymbols.length;
while (i-- && ret === '') {
multi = Math.pow(1000, i + 1);
if (axis.tickInterval >= multi &&
numericSymbols[i] !== null) {
ret = Highcharts.numberFormat(this.value / multi, -1) +
numericSymbols[i];
}
}
if (ret === '') ret = this.value;
return ret;
}
No comments:
Post a Comment