score:1

Before you go head-desk-head-desk, while trying to format the percentage.

Here are some ways to do it:

  1. (Math.round(this.point.percentage*100)/100) + ' %'
  2. Highcharts.numberFormat(this.percentage, 1) + '%'
  3. this.percentage.toFixed(1)
  4. {point.percentage}% or {point.percentage:.1f}%

I often use #4 in tooltips and labels and when not using a custom formatter function.

score:2

For me the upvoted solution didn't work:

tooltip: {
    formatter: function () {
                   return this.point.name + ': <b>' + Highcharts.numberFormat(this.percentage, 1) + '%</b>';
               }
}

but this did:

this.percentage.toFixed(1)

score:14

A simpler solution is to use

{point.percentage:.1f}%

in the pointFormat string

score:16

Answering this question based on Billy Reverb's comment:

Just replace this attributes:

tooltip: {
    pointFormat: '{series.name}: <b>{point.percentage}%</b>',
    percentageDecimals: 1
}

for this:

tooltip: {
    formatter: function () {
                   return this.point.name + ': <b>' + Highcharts.numberFormat(this.percentage, 1) + '%</b>';
               }
}

Related Query

More Query from same tag