Highmaps向下钻取地图选择事件

时间:2017-01-19 09:11:49

标签: javascript highcharts javascript-events highmaps

我设法使用' Highmaps'创建了一张挪威地图。 (http://www.highcharts.com/maps/demo)与县,当它选择一个县时,它将深入到市政当局。我需要在向下钻取中捕获select事件并根据市政当局显示一些数据。但无法找到任何钻取事件。

任何想法?

1 个答案:

答案 0 :(得分:0)

我在Highcharts帮助台支持的帮助下想出来了。 这是小提琴http://jsfiddle.net/bydfsxe2/

// Set drilldown pointers
$.each(data, function (i) {
    this.drilldown = this.properties['hc-key'];
    this.value = i; // Non-random bogus data
});

// Instanciate the map
Highcharts.mapChart('container', {
    chart: {
        events: {
            drilldown: function (e) {
//call external function
                                    alert(e.point.drilldown);
//rest of the code