Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts: click events for heatmaps

Tags:

highcharts

I have a problem with click events on heatmaps: it works only if you click on a tooltip, but not on the chart itself. See the demo http://jsfiddle.net/3UWaA/1/

    chart: {
        type: 'heatmap',
        events: {
            click: function(event) {
                alert("clicked!");
            }
        }
    }

Any suggestions how to fix this?

Thanks

like image 767
user2723490 Avatar asked Jul 15 '14 23:07

user2723490


1 Answers

Add the events into a plotOptions object.

Like this:

plotOptions: {
        series: {
            events: {
                click: function (event) {
                    alert('event!');
                }
            }
        }
    },

Demo: http://jsfiddle.net/robschmuecker/3UWaA/3/

like image 67
Rob Schmuecker Avatar answered Jan 03 '23 15:01

Rob Schmuecker