Search code examples
jquerycsshtmlhighmaps

highmap Data point click event breaks after zoom on a mobile (touch screen)


Highmap Data point click event breaks after zoom on a mobile (touch screen) Any suggestions? enter image description here


Solution

  • The tooltip.pointFormatter in conjunction with useHTML is still expecting a string as the return value and therefor should be used mainly for CSS/HTML formatting. I suggest the use of your own HTML tooltips for more advanced stuff like buttons:

     Highcharts.wrap(Highcharts.Point.prototype, 'select', function (proceed) {
        proceed.apply(this, Array.prototype.slice.call(arguments, 1));
        var points = mapChart.getSelectedPoints();
        $('tooltip-button-close').click(function () {
            points[0].select(false);
        }
       });
    

    Demo: https://www.highcharts.com/maps/demo/rich-info