score:7
Accepted answer
you need to set the event
on the plotoptions
property. here's an example taken from the highcharts
api documentation:
$(function () {
var $reporting = $('#reporting');
$('#container').highcharts({
title: {
text: 'mouse events demo'
},
subtitle: {
text: 'on point mouse over or mouse out, the values should be reported in top left'
},
plotoptions: {
series: {
point: {
events: {
mouseover: function () {
var chart = this.series.chart;
if (!chart.lbl) {
chart.lbl = chart.renderer.label('')
.attr({
padding: 10,
r: 10,
fill: highcharts.getoptions().colors[1]
})
.css({
color: '#ffffff'
})
.add();
}
chart.lbl
.show()
.attr({
text: 'x: ' + this.x + ', y: ' + this.y
});
}
}
},
events: {
mouseout: function () {
if (this.chart.lbl) {
this.chart.lbl.hide();
}
}
}
}
},
tooltip: {
enabled: false
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
});
score:1
you can also use chart.hoverpoint
if trying to find out the currently moused over point from outside the mouseover
event. however this is not on the documentation, which likely means it can change in the future.
Source: stackoverflow.com
Related Query
- How do I get the value of a highcharts graph point on mouseover?
- How to get Highcharts X-Axis Categories starting at the left most point
- How to get the highlighted point from shared tooltip formatter, Highcharts
- Highcharts Bubble Chart - How to get the size of the point
- Highcharts - How can I get the nearest point on click event
- How to get the axis value with respect to the cross hair in highcharts
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- How to Increase minimum point value and the color of series in advanced accessible charts in Highcharts by making it traverse
- How do you get the mouse hovered label value with the highcharts custom event plugin?
- How to get highcharts dates in the x axis?
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- How can I get the max value of a y axis at highcharts?
- Highcharts - How to get a value of a stack in a series?
- how to get chart object inside a point event function in Highcharts
- How do I set highcharts line graph point colors to an array of colors?
- *Highcharts* How to get the min and max value of the zoom box
- Highcharts How to get decimal point values on y-axis with big numbers
- Get name of clicked point in Highcharts when the point has drilldown
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- How to change area graph color above certain value in Highcharts
- How to get next point in Highcharts tooltip
- How to get the Div id of charts in highcharts on click of it in angular 6
- How to add point to the beginning of series, Highcharts
- how to get the axis value when I click on a cursor in highstock(high charts)?
- How to remove the value and number labels from Highcharts angular gauge
- How do I get my highcharts to reduce in size when the window is resized down
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- how to display 2 same highcharts without duplicate the code
- how can i add in highcharts a different dashStyle just for a part of the graph
More Query from same tag
- Loading several large dataset in Highcharts
- Highcharts : using same div to load a chart multiple times with different series data
- HIGHCHARTS: Event on Export can't access x-axis labels
- Highcharts Legend Overlaps with X-Axis
- Add animation to bar in data sorting bar chart Highcharts
- Highcharts using JSON - graph not displaying mysql data
- Toggle alert visibility using highcharts
- How to embed text on the bar of the highchart
- Fixed plot height in scatter chart
- how to show one more array in the tooltip using highchart?
- Highcharts Highstock How to Plot OHLC and Line Charts from One Set of Embedded CSV Data Using Series Map Tools?
- Adding a Dropdown Select menu to select csv files in highcharts
- Changing charts tooltip
- Inconsistencies with the display of metric notations in Highcharts
- Highcharts - Line chart is using wrong TimeZone
- Highcharts animate series on show
- Highcharts: How can I associate a pre-formatted value with a data point?
- HighStock Depthchart is updating the data strangely
- HighCharts - How can i use the period separator in xAxis
- Highchart in js does not work in Vue.js
- Issues in Highchart-treemap with drilldown data label color change
- Highcharts: How to use both axis - bar coming from y axis and spine coming from the x
- Add Interactive Map with Highcharts Maps
- Symfony2: Highchartsbundle data problems
- How do you remove an annotation from Highcharts?
- Highchart - xAxis values are to close
- Why do only 2 of my 3 Highcharts Pie Charts/Graphs are showing
- Why my Highchart javascript always get the old data from DB
- Fixed x-axis in Highcharts Stock (stop auto-scaling)
- Highcharts: how to get the point category clicked on when drilling down?