TradingView 修改柱状图宽度其实就是修改默认时间区间,以下就是代码:

在生成bars之后,进行修改。

let fromTime = this.tvBars[ this.tvBars.length - 30].time / 1000;

  let toTime = this.tvBars[ this.tvBars.length - 1].time / 1000;

  this.TView.chart().setVisibleRange({ from: fromTime, to: toTime});