【问题标题】:Restrict mouseover area for a column to its own shape vs. surrounding area将列的鼠标悬停区域限制为其自身形状与周围区域
【发布时间】:2015-11-18 18:58:11
【问题描述】:

如何限制 highcharts 列的 mouseover 和 mouseout 事件,以便在鼠标进入/离开实际列而不是周围区域时触发事件?

js fiddle 中可以看到鼠标悬停/鼠标移出行为。

这就是我在 highcharts 选项中声明鼠标事件的方式:

   plotOptions:{
        column:{
            point: {
              events:  {
                mouseOut: onItemMouseOut,
                mouseOver: onItemMouseOver
                },
            },
            states:{hover:{enabled:false}},
        },
    },

【问题讨论】:

    标签: javascript jquery css highcharts


    【解决方案1】:

    您只需从工具提示选项中删除 shared: true 即可。

    // shared: true
    

    your updated fiddle here

    【讨论】:

    • 酷。 plotOptions.columns.stickyTracking 也应该是假的,对吧?我认为默认情况下它们是列。
    • 是的,没错。在 2 天前的回答中,我使用stickyTracking:false 作为折线图,因为它不是默认为 false。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-06-23
    • 1970-01-01
    • 2018-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多