悬停时为气泡图中的气泡设置的白色边框/线条颜色在鼠标离开气泡时未重置

white border/line color set on hover for the bubbles in the bubble chart not being reset on mouse out from bubble

本文关键字:气泡 鼠标 离开 颜色 边框 设置 白色 悬停      更新时间:2023-09-26

我正在为气泡图中的气泡设置悬停时的白色边框/线条颜色。我能够做到这一点,但是,1.鼠标悬停时,白色边框/线条颜色仍然保持不变,不会重置为默认线条颜色。2.如何增加气泡外笔划的宽度?

请帮忙。以下是演示:http://jsfiddle.net/JKLzy/17/

plotOptions:{
            bubble:{
              allowPointSelect:true,
              marker: {
                lineColor:'',
                  states:{
                    hover:{
                      enabled:true,
                      lineWidth:1,
                      lineColor:'white'
                    }
                  }
                }
              },
              states:{
                hover:{
                  marker:{
                       lineWidth:0,
                      lineColor:'white'           
                  }
                }
              }
            },

悬停结束后,它似乎保持为白色的原因是,在代码中,您已将标记线颜色设置为lineColor:''。这不是有效的颜色。移除它,你的悬停线效果应该可以正常工作。

要调整笔划的宽度,只需更改lineWidth

例如,您完成的plotOptions.bubble.marker-选项可能如下所示:

marker: {
    states:{
        hover:{
            lineWidth: 3,
            lineColor: 'white'
        }
    }
}

请参阅此JSFiddle演示。