score:1
Accepted answer
You need the click event from the chart object. https://api.highcharts.com/highcharts/chart.events.click
Highcharts.chart('container', {
chart: {
events: {
click: function (event) {
var label = this.renderer.label(
'x: ' + Highcharts.numberFormat(event.xAxis[0].value, 2) + ', y: ' + Highcharts.numberFormat(event.yAxis[0].value, 2),
event.xAxis[0].axis.toPixels(event.xAxis[0].value),
event.yAxis[0].axis.toPixels(event.yAxis[0].value)
)
.attr({
fill: Highcharts.getOptions().colors[0],
padding: 10,
r: 5,
zIndex: 8
})
.css({
color: '#FFFFFF'
})
.add();
setTimeout(function () {
label.fadeOut();
}, 1000);
}
}
},
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]
}]
});
Source: stackoverflow.com
Related Query
- Highcharts.js - Event when any point is clicked
- Get name of clicked point in Highcharts when the point has drilldown
- onclick event when part of highcharts funnel is clicked
- Unable to do any other action than "alert" when triggering the click event on Highcharts (React Native)
- How to highlight a point without using any event or action in highcharts
- Highcharts - manually trigger hover event on a point
- Highcharts => Getting the id of a point when clicking on a line chart
- Highcharts - only show tooltip when hovering directly on point
- how to get chart object inside a point event function in Highcharts
- Highcharts - Rotate pie chart aligning the clicked section to a fixed point (180°)
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Fetch data from firebase firestore and plot histogram using highcharts when cardview clicked - android
- Highcharts + Angularjs : Graph doesn't redraw when adding series from an external event
- Highcharts - How can I get the nearest point on click event
- Highcharts: how to get the point category clicked on when drilling down?
- Get Parent When Clicked Child Highcharts
- Highcharts point click event returns "hover" state instead of "select" state
- HighCharts : Update a point when grouping data
- Missing points in HighCharts when applying event to exported button
- Highcharts checkboxes multiply when window resize event fires
- highcharts not displaying line when last point is before current x Axis minimum and next point is after current X Axis maximum
- change data point value inside load event in HighCharts
- Highcharts - detect when render (or redraw) event is caused by a resize/reflow?
- Is there any way to highlight the node on search in network chart when using highcharts in angular application
- HighCharts - Disable Mouse Over when a Point is selected
- Highcharts cloud issue with data source when duplicating chart
- get bot xAxis values when doing click event on highcharts
- How to use highcharts to display data of only five point when the page is initialized?
- How to set point in highcharts when x axis and y axis has data as text values?
- How to make a rendered label in Highcharts always visible and still relative to the point clicked or hovered over
More Query from same tag
- angular onChanges highcharts
- Angular Highcharts Custom Legend Label In Area Chart
- Highcharts With Drilldown In IE10+ Does Not Show Underlined Label Style
- highstock attaching panning feature to mousedown
- Javascript variable not working inside of highcharts
- Is there any replacement of "zones" in highcharts?
- Specify xAxis values with columnRange chart in Highchart
- Updating angular2-highcharts data
- Highcharts: Uncommon x axis value set at the end of the graph.
- Rendering chart in the background
- Updating spline chart two lines on top of eachother
- HighChart Avoiding points on the plotbackground
- Highcharts - Change color of hover points
- Trigger HighCharts Animation on View in Owl Carousel
- xAxis values groups as slices + labels in Highcharts
- highcharts - windrose stackLabel doesn't work properly
- Highcharts bubble chart datalabels color contrast issue
- Highchart line chart with category do not occupy full width
- Highcharts scatter external data
- How to format data labels with Jquery Highcharttable column charts
- event.ctrlKey works in IE and Chrome but not Firefox on legendItemClick
- highstock: space between opposite x-axis and range-selector/datepicker
- Data labels are repeated in IE
- dataClasses name in tooltip through formatter function [Highcharts]
- disable legend resizing of chart
- 24-Hour Time Event Chart using HighCharts
- Highcharts appends two types of charts in one div
- Highcharts 'Cannot read property tooltipOptions of null'
- How to assign chart title as exporting filename?
- Adding data to highstocks by pushing array