0

I'm using Highcharts to create some charts on the page. I'm trying to use the customEvents plugin to add functionality to a bubble click (pop up a modal when bubble clicked). I know Highcharts can do this without a plugin, but I need to add other functionality to other charts on the page, and only the plugin provides that functionality. So here's the issue:

I successfully added an event handler function to bubble click. It looks like this:

            plotOptions: {              
            series: {                           
                dataLabels: {
                    enabled: true,
                    format: '{point.projectId}',
                    events: {
                        click: function (event) {
                            console.log("Evt:",event); // event.point has what I need
                            console.log(event.point); // undefined

                            $('#modalTable2').dataTable().fnClearTable();
                            $('#modalTable2').dataTable().fnAddData([event.point.x,event.point.y,event.point.z]);
                            $('#modal2').modal('show');
                        }
                    }
                },
            },
            bubble: {
                marker: {enabled:true},
                threshold: -10,
            }
        },

As stated in the code comments, I can see event.point in the properties in the Javascript console, but it's not actually accessible/defined in code. How can I access this object?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
JustADude
  • 123
  • 9
  • Have a look at [console.log() async or sync?](http://stackoverflow.com/q/23392111/1048572) - it's weird though that the `.point` property would be created only after calling the handlers. – Bergi Apr 19 '16 at 15:01
  • Could you post a live example, like jsFiddle? – Kacper Madej Apr 20 '16 at 11:30

0 Answers0