You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to dynamically set the price interval on the scale based on the price range. For example:
If the price is in the thousands, the gap between price labels should be 1000.
If the price is in the tens of thousands, the gap should be 10000.
Currently, I cannot find a way to implement this behavior effectively. Attempts to use tickMarkFormatter or priceFormat seem to be ignored, as the chart dynamically adjusts the scale regardless of my configuration.
The text was updated successfully, but these errors were encountered:
You are correct. The library doesn't have a way for you to specify exactly which tick marks you want visible. The library will decide by itself based on the vertical space available, the price range, and the priceFormat options how many tick marks it will want to display.
One option you could do (but is a bit of work) is to write a plugin to render the price scale exactly how you prefer. Plugins have the ability to render in the price scale canvas so it would be possible to cover up the existing price scale and draw your own on top of it. Or even skip having a price scale and draw one on the main pane of the chart, like this: https://tradingview.github.io/lightweight-charts/plugin-examples/plugins/overlay-price-scale/example/
Lightweight Charts™ Version: 4.2.0
I want to dynamically set the price interval on the scale based on the price range. For example:
If the price is in the thousands, the gap between price labels should be 1000.
If the price is in the tens of thousands, the gap should be 10000.
Currently, I cannot find a way to implement this behavior effectively. Attempts to use tickMarkFormatter or priceFormat seem to be ignored, as the chart dynamically adjusts the scale regardless of my configuration.
The text was updated successfully, but these errors were encountered: