score:1
I used the capture of the variable as a double click parameter. And when true I cleaned the doubleclick.
series: {
cursor: 'pointer',
point: {
events: {
click: function () {
if (clickdouble == ('Category: ' + this.category + ', value: ' + this.y)) {
alert('Category: ' + this.category + ', value: ' + this.y);
clickdouble = '';
}else{
clickdouble = 'Category: ' + this.category + ', value: ' + this.y;
}
}
}
}
}
It works for me.
score:1
You can add an ondblclick event listener at the container's dom element in which you have the chart. Currently highcharts doesn't seem to handle the event so the event will simply propagate to the container.
score:5
You can use an extension, which allows do this.
http://www.highcharts.com/plugin-registry/single/15/Custom-Events
score:6
I tried using the extension, but it did not work, so I decided to write a small double click event (based on click event).
The downside is that it's encapsulated inside the 'click' event, but that's not a big issue since it calls a separate function.
First, define settings:
var doubleClicker = {
clickedOnce : false,
timer : null,
timeBetweenClicks : 400
};
Then define a 'double click reset' function in case the double click is not fast enough and a double click callback:
// call to reset double click timer
var resetDoubleClick = function() {
clearTimeout(doubleClicker.timer);
doubleClicker.timer = null;
doubleClicker.clickedOnce = false;
};
// the actual callback for a double-click event
var ondbclick = function(e, point) {
if (point && point.x) {
// Do something with point data
}
};
and in the highcharts settings of the chart:
series: [{
point: {
events: {
click: function(e) {
if (doubleClicker.clickedOnce === true && doubleClicker.timer) {
resetDoubleClick();
ondbclick(e, this);
} else {
doubleClicker.clickedOnce = true;
doubleClicker.timer = setTimeout(function(){
resetDoubleClick();
}, doubleClicker.timeBetweenClicks);
}
}
}
}
}]
Source: stackoverflow.com
Related Query
- Highcharts - Double click event
- Highcharts chart click event fired on click of the reset zoom button (bug?)
- Highcharts : Chart with drilldown how to obtain click event of drill up button
- highcharts how to catch and insert logic in click reset zoom button event
- How to pass custom data into Highcharts graph click event
- Click event not fire in highcharts tooltip
- HighStock HighCharts Setting Flag on Click Event
- How to attach click event function in Highcharts
- highcharts change rendered image source on click
- Highcharts : How do I keep the marker formatting and make the click event fire with a 5K+ point scatter plot?
- How to add series after click event in HighCharts
- Click event and two way data binding in HighCharts using AngularJS
- Click event in treemap in highcharts
- Dynamically set click event on bar from highcharts graph
- Highcharts custom events plugin right click event not firing
- Accessing functions in a highcharts click event in an ionic project
- Highcharts + set event click from options in jquery
- How do I attach a click event handler to the whole HighCharts Gauge control?
- HIghchart Treemap - Add double click event on legend click
- HighCharts Keep Vertical Line on Click Event
- How can I make React Native in Android aware of a click event in a tooltip in a Highcharts chart?
- Highcharts access drilldown data from event click
- Highcharts Image click event
- Click event for bar-chart using Highcharts not working?
- Highcharts - How can I get the nearest point on click event
- Highcharts : click event not detected after a redraw
- Highcharts - Getting chart on click event
- Toggling legend text click event in highcharts
- Highcharts - PieChart refreshes on click event that calls this.setState
- highcharts group series click event to get all data in catagory
More Query from same tag
- Append the data values in Highcharts
- How to hide series via the legend in highstock ?
- HighStock 2 panes with different php queries
- highchart - pointstart with given x values
- Highcharts React: Menu button doesn´t change from "view full screen" to "exit full screen" when fullscreen mode is on
- Reserve space for text in exported Highchart
- Not interpolate missing dates in Highcharts
- Highcharts x-range datetime not shwoing with "Date.UTC(2023, 6, 20)"
- Add dynamic data to line chart from mysql database with highcharts
- Highcharts Gantt avoid overlapping tasks
- How to set Highcharts object configuration globaly with vue-highcharts?
- Show tooltip on hovering anywhere in Y axis insted of column
- minPointLength is not working for horizontal Trellis bar charts in Highcharts
- Spline line is very curved, how to smooth it?
- Highcharts load pointStart from JSON. Milliseconds to UTC time?
- How to use scrollbar on highcharts heatmap?
- Highcharts Crosshairs not working
- How to shift data using Series.addPoint without shifting x axis values in highcharts
- Highcharts shared tooltip positioning if single value only
- Highcharts: Can I export to the user an Excel or CSV of the raw data driving the chart?
- How to combine two bunch of data, into one chart in Highcharts?
- Need to put border on variablepie highchart?
- Multiple charts with same data not loading in same page: Highcharts
- Highcharts with AJAX graph generating
- Highcharts: Y axis label formatter
- Highcharts.js - Dynamically disable given category
- Load Highchart animation on scroll
- add point to new series of some specific category
- child_process.execFile is not working with phantomjs and highcharts-convert.js
- Highcharts format legend names