KLineChart icon indicating copy to clipboard operation
KLineChart copied to clipboard

[Feature] Expose visibleDataList through getVisibleDataList, or getVisibleRange

Open voladelta opened this issue 3 years ago • 0 comments

Feature Description

Currently, i want to get visibleDataList to run computation outside of the chart.

The only hacky solution is to make a dummy indicator and set from and to in render to global variables.

So exposing getVisibleDataList will be nice, or have a getVisibleRange like Lightweight Charts would be nice.

To Do

Add getVisibleDataList in Chart.js to return visibleDataList in ChartStore.js.

Or add getVisibleRange in ChartStore.js and expose to Chart.js.

getVisibleRange() {
  const from = this._timeScaleStore.from()
  const to = this._timeScaleStore.to()
  return {
    from,
    to
  }
}

voladelta avatar Aug 18 '22 09:08 voladelta