Highcharts:在悬停排行榜上改变颜色

时间:2013-07-13 22:37:14

标签: charts highcharts

现在我正在制作排行榜,因为我试图突出一个系列,所有其他人必须仍然在图表上但是变暗。

所以我试图改变鼠标的颜色以适应灰度系列,这对我有很大帮助Highcharts - change series color on MouseOver但是我不知道如何处理标记颜色,因为mouseOver中的函数{{1} }仅更改线条颜色。在highcharts docs中寻找“悬停”发现了这个

this.graph.attr('stroke', '#0000FF');

我的问题是,是否有办法在鼠标悬停功能中更改悬停系列的孔系列颜色,现在正在此处http://jsfiddle.net/diegomanule/UyF9u/

提前致谢,

1 个答案:

答案 0 :(得分:3)

如果您不需要(并且在这种情况下您不需要),则不应直接操作SVG。借用此文档examaple

   events: {
        mouseOver: function () {
            this.update({
                color: '#0000FF'
            });                
        },
        mouseOut: function () {
            this.update({
                color: '#C0C0C0'
            }); 
        }
    },

更新了小提琴here

相关问题