【问题标题】:Highcharts: changing color on hover ranking chartHighcharts:在悬停排名图表上改变颜色
【发布时间】:2013-07-12 04:06:20
【问题描述】:

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

所以我试图在鼠标悬停时更改暗色系列的颜色,这对我很有帮助 Highcharts - change series color on MouseOver 但我不知道如何处理标记颜色,因为 mouseOver this.graph.attr('stroke', '#0000FF'); 中的函数仅更改线条颜色。在 highcharts 文档中寻找“悬停”发现了这个

    marker: {
        fillColor: '#C0C0C0',
        states: {
            hover: {
                fillColor: '#0000FF'
            }
        }
    }

我的问题是是否有办法改变鼠标悬停功能中悬停系列的孔系列颜色,现在在这里工作http://jsfiddle.net/diegomanule/UyF9u/

提前致谢,

【问题讨论】:

    标签: charts highcharts


    【解决方案1】:

    如果没有必要,您不应该直接操作 SVG(在这种情况下您也不必这样做)。借用本文档examaple

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

    更新了小提琴here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多