vmb
vmb

Reputation: 3028

How to set Precision-ToolTip in Highchart

I am crearting one pie chart using Highchart.I stuck on one issue that i cant format value that appearing in tooltip.I want to show only two digits after decimal point.How can i configre this.Attaching one sample along with this.enter image description here

Upvotes: 1

Views: 937

Answers (2)

Lorenzo
Lorenzo

Reputation: 797

For percentage use:

this.percentage.toFixed(2)

Example: http://jsfiddle.net/jugal/dTMWP/

For other:

Highcharts.numberFormat(this.y,0)

Example: http://jsfiddle.net/CAKQH/24238/

Upvotes: 2

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

You can use numberFormat() http://api.highcharts.com/highcharts#Highcharts.numberFormat() or solution introduced https://github.com/highslide-software/highcharts.com/issues/897

Please take look at example which used numberFormat()

http://jsfiddle.net/2D5nT/44/

Upvotes: 0

Related Questions