0

So the timeScale in lightweight-chart has a way to detect when visible time range is being updated (through subscribeVisibleTimeRangeChange).

My question, is there a similar way to detect/listen when visible price range changed? Gone through the documentation for a bit but couldn't find anything close.

We have a use case where we wanna adjust the price line in area chart when min/max price range changes.

Feedback would be much appreciated!

Harsha Murupudi
  • 579
  • 1
  • 6
  • 19

1 Answers1

0

No, lightweight-charts doesn't have such feature yet. You can create a feature request for that (but please look at https://github.com/tradingview/lightweight-charts/issues/621 first, there you can find a discussion why there is still no getters/setters for price range, I think it might be related to events too).

We have a use case where we wanna adjust the price line in area chart when min/max price range changes.

You can try to do some hacks with overriding autoscaleInfoProvider of the series, but I can't tell you for sure whether it will work for you or not.

timocov
  • 1,088
  • 6
  • 16