blacklabel / custom_events

Custom events plugin for Highcharts by Black Label
http://blacklabel.github.io/custom_events/
Other
62 stars 50 forks source link

Context menu with polygon series not working #152

Closed govinda18 closed 4 years ago

govinda18 commented 4 years ago

Custom events (tested for contextmenu) does not work for polygon series.

Reproducer: http://jsfiddle.net/m42bxuaf/1/

sebastianbochan commented 4 years ago

Hi @govinda18, Points in polygon declare an area, so the event should be defined for series not a particular point.

plotOptions: {
      series: {
          events: {
            click: function() {
              console.log('a');
            },
            contextmenu: () => console.log("Asd")
          }
      }
    },

Demo: http://jsfiddle.net/BlackLabel/3y1jetqk/

ps. I advise to use the newest Highcharts 8.2 instead of 5.x ps2. Im closing the case as a not a bug.