1
votes

Sorry for my english.

I have question about highcharts. Please help!

I have chart https://jsfiddle.net/traprap/upmvyjkt/5/

In this chart I have numbers like 0.00000057

But in chart tooltip this numbers converting to 57e-7

tooltip: {
    valueDecimals: 8
}

not helping

I tried point format, formatter.. but nothing helped What em I doing wrong?

Thank You!

1

1 Answers

2
votes

To format it for a single series you can use the series.tooltip.pointFormatter (API) in combination with toFixed (API) to show the number with your chosen number of decimals. If you want to format all series you can use plotOptions.series.tooltip.pointFormatter (API) with the same function.

For example (JSFiddle):

series: [{
    data: price,
    tooltip: {
        pointFormatter: function() {
            return '<span style="color:{point.color}">\u25CF</span> '+this.series.name+': <b>'+this.y.toFixed(8)+'</b><br/>'
        }
    },
    // ...
}]

This is essentially the default point format of:

<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>

With variables for series name and the y-value with toFixed(8) to show 8 decimals, as an example. This converts the number to a string before it is shown, preventing the scientific notation.