kidcapital
kidcapital

Reputation: 5174

Multiple click events on multiple axes chart?

I have a multiple axes chart like this: http://www.highcharts.com/demo/combo-multi-axes

In my particular case, I only want the click handler for the bar chart, and not the other ones.

I tried using

          series:
            cursor: 'pointer'
            point:
              events:
                click: ->

But that hooks on to all the lines.

Does anyone know if it is possible to have a different click handler for each line/bar/point?

Upvotes: 0

Views: 1252

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

You need to set click event for column type, not series (which is genereal to all of series type).

http://jsfiddle.net/agnHV/

plotOptions:{
            column:{
                point:{
                    events:{
                        click:function(){
                        alert('aaa');
                        }
                    }
                }
            }
        },

Upvotes: 1

Related Questions