【问题标题】:How to remove the price line in light-weight-chart?如何删除轻量级图表中的价格线?
【发布时间】:2023-01-03 00:13:21
【问题描述】:

我在我的应用程序中实现了 tradingview 的轻量级图表,图表看起来是like this。最后价格有一条水平虚线。

是否可以隐藏水平线?

【问题讨论】:

    标签: lightweight-charts


    【解决方案1】:

    创建系列时,您可以将 priceLineVisible 选项设置为 false 以禁用该行。

    const mainSeries = chart.addLineSeries({
        priceLineVisible: false,
    });
    

    文档:https://tradingview.github.io/lightweight-charts/docs/api/interfaces/SeriesOptionsCommon#pricelinevisible

    【讨论】:

      【解决方案2】:

      要删除图表中的 ltp 虚线,您应该在 addAreaSeries 中将 priceLineVisible 设置为 false。

       var areaSeries = chart.addAreaSeries({
        priceLineVisible: false,
        topColor: this.config.topColor,
        bottomColor: this.config.bottomColor,
        lineColor: this.config.lineColor,
        lineWidth: this.config.lineWidth,
      });
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-01-20
        • 2014-02-21
        • 2017-05-06
        • 1970-01-01
        • 1970-01-01
        • 2022-06-10
        • 1970-01-01
        • 2018-02-16
        相关资源
        最近更新 更多