【问题标题】:Flot charting library: show points on line chart only on hover?Flot图表库:仅在悬停时在折线图上显示点?
【发布时间】:2011-12-15 12:14:32
【问题描述】:

使用 flot 库,如何仅在将鼠标悬停在线上该点时才显示该点?我不希望所有的点都一直可见..

类似于 google 的做法:参见第一个示例:http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html

无法使用 google,因为我需要组合多种图表类型。我也喜欢谷歌,你不必将鼠标悬停在确切的点上,足够近,工具提示也会被触发。

flot 能做到这一点吗?还是其他图书馆?

编辑:这些家伙似乎在使用 flot,但我不确定他们是如何做到的? https://www.portfolionumbers.com/tools/risk/report

【问题讨论】:

    标签: javascript jquery graph charts flot


    【解决方案1】:

    在选项对象中,您可以指定如下内容:

    {
        series: { lines: { show: true }, points: { show: false } },
        grid: { hoverable: true, clickable: false }
    }
    

    【讨论】:

      猜你喜欢
      • 2017-11-16
      • 2014-02-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-02
      • 1970-01-01
      • 2015-06-08
      相关资源
      最近更新 更多