blacklabel / custom_events

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

Event to bar category #163

Closed theking2 closed 1 year ago

theking2 commented 1 year ago

Is there a way to attach an event to the category area (mouse over lightblue) and get the name of the category for further processing? image

mfilipiec commented 1 year ago

Yes, you can use the mouseover event on plotBands and refer to some information from the chart via this:

xAxis: {
  plotBands: [{
    from: 1.5,
    to: 3.5,
    events: {
      mouseover: function () {
        console.log('mouseover on plotband', this);
      }
    }
  }]
}

Demo: https://jsfiddle.net/BlackLabel/d1oynfaq/