Search code examples
highchartstooltiplinechart

Append to default highcharts tooltip


I have a line graph with the y-axis set to category and x-axis to values. On hovering over a point , i get the default tooltip information like in http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-point-events-mouseover/ when

 tooltip: {
        enabled: true
    }

My y-axis is set to some label like "Seconds" or "FPS". I want to be able to just add the y-axis label text to the default tooltip without changing any formatting options in the default tootlip, so for example if you hover over the first point it should display 29.9 Seconds along with the other data keeping other contents unaltered.

I know you can use a formatter and override it but I would like to retain the original tooltip display which shows up when you dont override the formatter.


Solution

  • Add valueSuffix, Change your tooltip to this: Read Here

    tooltip: {
        enabled: true,
        valueSuffix: ' Seconds',
    }
    

    DEMO