kirjs / react-highcharts

React wrapper for Highcharts library
http://kirjs.github.io/react-highcharts/
MIT License
1.26k stars 233 forks source link

Add a hover event for tooltip text #430

Open itispal opened 5 years ago

itispal commented 5 years ago
tooltip: {
      useHTML: true,
      shadow:false,
      //backgroundColor: 'none',
      borderWidth:0,
      borderRadius:0,
      shared: true,
      formatter: function(chart) {
        //console.log(this.point)
        var p = this.point
        let patients = ''
        p.patient_list.map((patient, index) => {
          patients+= '<div class="Second_Level_Bubble" data-patient="'+patient+'">P-'+patient+'</div>'
          return null
        })
        return ('<div class="Bubble_Container" style="width:200px;text-align:center"><p>LT : '+p.y+'</p>'+patients+'</div>')
      },
events:{
hover: function() {
console.log('------')
}
}
    },

i m trying to add an event(hover) on "Second_Level_Bubble" class elements but it's not fire an event. is there anyway to do this?

kirjs commented 5 years ago

Please help us by reproducing your issue here: https://stackblitz.com/fork/react-highcharts-demo