如何在悬停时启用阴影并选择highmap?

时间:2016-07-28 16:03:27

标签: highcharts highmaps

当我将鼠标悬停或选择国家

时,我希望产生这样的效果

hover effect

忽略此处提供的工具提示

1 个答案:

答案 0 :(得分:1)

You can add this functionality in your point.mouseOver and point.mouseOut events callback functions.

You can use point.graphic.shadow() for adding shadow to your point and then remove this shadow manually on mouseOut.

Here you can see code that may help you:

   point: {
      events: {
        mouseOver: function() {
          this.graphic.shadow({
            width: 10
          })
        },
        mouseOut: function() {
          Highcharts.each(this.graphic.shadows, function(p) {
            p.remove();
          })
        }
      }
    }

And here you can find live example how it can work: http://jsfiddle.net/x4j0d6dy/1/

Regards,