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
- Wrong x-axis min max values Highcharts
- Gauge chart with steps of colors
- Is there a function to highlight another stat/point/column while hovering element on Highcharts?
- Can pdfmake generate mixed highcharts(SVG) and other html content?
- Highcharts thousandsSep is blank instead comma
- On click, passing a variable from Javascript into Rails/Ruby
- Highcharts Zones not working with valid JSON
- Shifting Chart without losing points
- Highcharts stacked bar negative / positive total
- Chart area exceeding series length
- How to change UTC timestamp on the Highstock charts?
- mortgage calculator using highchart
- Highcharts line style change
- Highmaps/Highcharts Congressional District Map Using Google Spreadsheets
- xAxis Categories Highcharts
- Highchart Export chart not returning image in IE8 or IE9
- Highcharts tooltip looks weird
- Multiple Gauge Chart
- Highcharts bar chart overlay
- Highcharts (styledMode): filter: url(#drop-shadow not working
- Redirecting to a URL on Highcharts marker click
- Highstock navigator style / font
- Highcharts clickhandler and accessing context
- How to revert/reverse/undo setSize() in Highcharts
- Shared tooltip on multiple charts not formatting correctly
- how to only display the graph with highcharts
- Unable to change Spiderweb in Highchart line color
- Highcharts showing wrong time based on timezone
- Highcharts bar chart force bar to use space
- Highcharts custom error handler