score:9
This is explained fairly well in the documentation.
What you can do is something similar to THIS.
So you have to add something like this to your code:
chart: {
events: {
click: function(event) {
alert (
'x: '+ Highcharts.dateFormat('%Y-%m-%d', event.xAxis[0].value) +', ' +
'y: '+ event.yAxis[0].value
);
}
}
}
Here is an example of that implementation.
Update
To ensure clicking on the graph itself is also enabled, add the following:
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function() {
alert ('Category: '+ this.category +', value: '+ this.y);
}
}
}
}
},
You can see a working example HERE
score:1
if you want to do a single click to a line, you can do so by setting plotOptions > line as in http://api.highcharts.com/highcharts#plotOptions.line.events.click.
Now if you want a double click you may have a global variable, which keep track of number of clicks within the same click event.
hope helps
Source: stackoverflow.com
Related Query
- Click event on clicking on the graph
- Highcharts chart click event fired on click of the reset zoom button (bug?)
- How to pass custom data into Highcharts graph click event
- Fire click event on a highchart column drilldown chart on clicking x axis for drill down reports
- HiChart click event 1st time it's working but when I update the data then click event is not working
- HighCharts: How to Determine on Click Event what Data Grouping the Chart is Currently In?
- How to catch the click event from the axis ticks jqplot, highcharts,flot
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- Dynamically set click event on bar from highcharts graph
- html button not firing event to the required graph container firing to different graph in Highchart JS
- How do I attach a click event handler to the whole HighCharts Gauge control?
- Highcharts - How can I get the nearest point on click event
- Click a point on a highcharts graph from outside of the chart
- How do I catch a click event on a polygon in HighCharts without having the tooltip popping up
- Strange character in the Highstock source code
- I am using click event to trigger a new page to generate the drill down data from highcharts however the entire chart is being generated
- I want to update my series dynamically on highcharts with a click & also bring it to the original way by clicking on an other button (#previous)
- AngularJS $apply sometimes doesn't trigger to update $scope values in the html tag within {{}}, when using the click event in hightchart.
- HighCharts - Selection Event keep the selection marked in graph
- Highcharts | Network Graph - Is there a way to expand leaf nodes on click of the Parent node?
- Unable to do any other action than "alert" when triggering the click event on Highcharts (React Native)
- How can I unclick an event in highcharts on the second click
- How to modify the code so that Highcharts graph does not cover fixed navigation bar at the top of the page?
- Highchart plotOption click event only fired once with mouse stay in the block
- Highstock - click drag on the portion of the graph to zoom?
- How to Control the highchart, based on external click event
- How to get the X axis value from HighChart on android on click event
- How do I attach a click event to the hcmap function within Highcharter library within R shiny?
- How to manually trigger the afterSetExtremes event from a series click event in HighCharts
- Javascript Highcharts cannot get the name of the click column in the onclick event
More Query from same tag
- highcharts - chart names for multiple pie chart series in one chart
- Column chart in Highcharts - select series with a click
- Highcharts 3.0, area chart with stacked and unstacked series - how to fix?
- Highcharts-vue options as variable
- Highchart export filename with special characters
- Highcharts with values from multiple JSON file
- Highcharts Y axis horizontal title
- how do you set the yaxis values in highcharts
- Highcharts Polar Chart customization
- Showing all values on one point on x axis and changing range for rCharts highcharts
- Highchart - Activity guage display lable and lagends
- Gradient scale size is not calculated correctly in Highcharts map
- mySQL with PHP to JSON for clientside chart
- How can I use special input format in Highcharts?
- How to hide empty column in column hightcharts with multiple series
- Highcharts json data date in zulu time not working
- Highstocks - how to detect when zoom button is pressed
- Need assistance adding an additional series to a Highcharts graph using a SharePoint list and PSServices
- How can I optimize Highcharts.js zones?
- How can I remove the number in the tooltip
- generate valid JSON for highcharts on click
- how to increase Y-Axis height in Highcharts
- highcharts sum up tooltip {point.y} with a specific number
- Highchart multiple column range in same series on bar chart
- Is it possible to plot more than 35000 points in Highcharts
- Pass JSON-encoded PHP Variable to HighCharts
- Pie chart controller by slider
- HighChart : plot line click event for multiple chart
- HighCharts - How can I turn off the points?
- Highstock - flag text appears on top of the tooltip