aleazus
Posts: 1
Joined: Mon Mar 30, 2015 10:17 pm

Tooltip on x-axis category label

Mon Mar 30, 2015 10:27 pm

How can I apply the tooltip on the x-axis category labels on mouseover with the following Highcharts options applied?
chart: type: column
xAxis: categories: ['apple','banana','pear','grape','melon','peach']
plotOptions : column: stacking: normal
series: [{
name: 'first',
data: [1,2,3,4,5,6]
}, {
name: 'second',
data[100,200,300,400,500,600]
}, {
name: 'third',
data[1000,2000,3000,4000,5000,6000]
}]

User avatar
KacperMadej
Posts: 4632
Joined: Mon Sep 15, 2014 12:43 pm

Re: Tooltip on x-axis category label

Tue Mar 31, 2015 11:58 am

Tooltip is enabled by default only for series, not for axis labels.

One options is to set labels useHTML to true and set title for html element.
Example: http://jsfiddle.net/W5wag/2/

Other way would be to use Custom-events plugin - add event on labels: https://www.highcharts.com/products/plu ... tom-Events (demo has click, mouse over should work the same to display custom tooltip).

Or you could use other JavaScript plugin to enable custom tooltip.

Similar topic: http://stackoverflow.com/questions/2187 ... highcharts
Kacper Madej
Highcharts Developer


rafalS
Posts: 2660
Joined: Thu Jun 14, 2018 11:40 am

Re: Tooltip on x-axis category label

Mon May 13, 2019 12:25 pm

Hi,

This is a working URL: https://www.highcharts.com/products/plu ... tom-Events

Apologize for the inconvenience and changing to new URL.

Regards.
Rafal Sebestjanski,
Highcharts Team Lead


jakub.j
Posts: 884
Joined: Tue Jan 24, 2023 11:14 am

Re: Tooltip on x-axis category label

Fri Sep 15, 2023 1:15 pm

Welcome to our forum and thanks for contacting us with your question!

You can find all available information about custom events plugin in different places:

NPM: https://www.npmjs.com/package/highcharts-custom-events
GH: https://github.com/blacklabel/custom_events

​If you have further inquiries, you may reach out to me at any time.
Best regards
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”