【问题标题】:How to show horizontal grid lines without the Y-Axis in Flot?如何在 Flot 中显示没有 Y 轴的水平网格线?
【发布时间】:2015-03-09 21:20:46
【问题描述】:

我一直在搜索flot docs 和示例,寻找一种显示水平(y 轴)网格线而不绘制垂直轴值(例如 0 到 100)但没有任何成功的方法。

有没有办法在没有 y 轴值的情况下做到这一点?

而不是这个:

【问题讨论】:

    标签: javascript flot


    【解决方案1】:

    是的,使用tickFormatter

    yaxis: {
      tickFormatter: function(){return ''}
    }
    

    https://github.com/flot/flot/blob/master/API.md#customizing-the-axes

    Fiddle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-03-13
      • 1970-01-01
      • 1970-01-01
      • 2017-09-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多