score:2
Accepted answer
The axis labels can be accessed as yAxis.ticks["x"].label.element
. This is the element of the label, and now any event on this element can be handled as follows.
var yAxis = chart.yAxis[0];
var onYaxisRedraw = function() {
for (var tickPos in yAxis.ticks) {
var $element=$(yAxis.ticks[tickPos].label.element);
$element.unbind('click');
$element.click(function() {
alert("hi");
});
}
}
onYaxisRedraw();
yAxis.redraw(onYaxisRedraw);
It's always better to unbind any previously added handler as same labels may be reused by highchart internally.
Source: stackoverflow.com
Related Query
- How to handle mouse events on axis labels in highcharts
- How to handle Highcharts events from an AngularJS directive?
- How to adjust line-height/ellipses in Highcharts axis labels
- How to position labels for plotbands on y axis in Highcharts
- How To Show All Data Labels For Datetime Axis In Highcharts
- How do i add mouse wheel code in Angular2 highcharts in typescript
- How to add text labels to a numerical x axis in Highcharts
- How to display months in x axis labels in highcharts
- Highcharts : How do i align data labels above the axis in column chart?
- HighCharts - Angular, how to get y axis labels on the vertical lines drawn from x axis
- How to get points information when hovering over axis labels in highcharts using custom-events library?
- How to fix formatting of axis labels in Highcharts when surrounding the contents with div?
- highcharts line chart with same x value, how to handle click events
- How to hardcode arbitrary Tick text labels on y axis in highcharts
- how to set the interval of points on Y - Axis highcharts
- How to hide labels in the highcharts in the pie
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- How to prevent highcharts from shortening labels with ellipsis
- Javascript Highcharts v3.0.5 - How to hide Y Axis Title when using multiple Y Axis
- Highcharts how to change x axis options
- Highcharts - How to start x axis from an arbitrary value
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Highcharts - Long multi-line y axis labels causing following label to be removed
- Highcharts - with datetime axis labels overlap
- How to add space between chart and axis in highcharts
- How to change axis label size when exporting in Highcharts / Highstock
- How do I style the series labels on a Highcharts pie chart?
- how to handle mouse over event in legend in highcharts?
- How to show only specific x-axis values on datetime axis in Highcharts
- How to place labels on opposite Y axis in Highchart without a second series
More Query from same tag
- How to change selected point styles in Highcharts?
- Highcharts pass external variable to global options
- high charts starting new line from each point
- Remove DateTime from Highchart's x-axis
- Remove exporting button from HighChart Objective-C
- Highcharts two colors for fill of area chart
- Yii - Highcharts - Cannot get chart to show
- Get the x axis range on selecting a zoom range in Highcharts
- Highlight a range of Y axis in highcharts
- Generate chart from html table : JQuery
- Can we change highcharts legend to work as radio button instead of checkbox style?
- Not able to render the charts in pdf using Wickedpdf and Highcharts in rails 2.3 app
- Remove spaces between axes and columns in Highcharts with only one category
- How to set Highcharts data series in x-axis using crosshairs?
- HighCharts : Adding Hyperlinks to the X-Axis of the chart
- undefined value in Highchart
- R different colours for set of bars in barchart
- Aggregate Total with Highcharts Line Chart
- How to display content $scope in HighCharts?
- Drilldown event in Highcharts column chart
- Highcharts xAxis with datetime not showing any chart
- How to disable the date and time mentioned in the navigator part and not on the x axis in highstock?
- On Export The Updated yAxis Title Is Lost
- reactjs highcharts reference for reload
- adding element with array_push() with looping to create json data
- how to reduce/increase gap between horizontal legends- highcharts
- add chart using highcharts to angular via highcharts-ng directive
- Focus function on highcharts not working in mozilla
- Highcharts arc with arrow
- Codeigniter highcharttable count how many data in a month