lightweight-charts
lightweight-charts copied to clipboard
Set visible range with percent right margin
Type of PR: enhancement
PR checklist:
- [x] Addresses an existing issue: fixes #840
- [x] Includes tests
- [x] Documentation update
Overview of change:
chart.timeScale().setVisibleRange({ from, to }, { percentRightMargin: 10 });
@DTupalov do you really need this API? It seems that for logical ranges it might be done externally from your code so I just curious whether this API is needed for someone.
@DTupalov do you really need this API? It seems that for logical ranges it might be done externally from your code so I just curious whether this API is needed for someone.
@timocov I've realised such ability with logical range, but this need some calculations on my side, so if this would be just a part of library, would be more declarative in my code.
Why then you implement this API? :)
Why then you implement this API? :)
Ha-ha, fair enough 😄
I've realised such ability with logical range, but this need some calculations on my side, so if this would be just a part of library, would be more declarative in my code.
We realised exactly the same, that's why I'm a bit confused with having this in the library (just to avoid having anything what could be done outside in 2-3 lines).
Agreed internally that it is no longer required.