lightweight-charts icon indicating copy to clipboard operation
lightweight-charts copied to clipboard

Add a possibility to hide all fractional zeros on a price axis marks

Open kirchet opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Add a possibility to hide all fractional zeros on a price axis marks if all numbers after decimal point are zeros

Describe the solution you'd like

Add an option like tryCutFractionalZeros: boolean that is disabled by default. If this option is enabled the library should try to cut non-valuable fractional parts if possible.

Additional context

image

kirchet avatar Jun 07 '22 16:06 kirchet

https://tradingview.github.io/lightweight-charts/docs/api/interfaces/PriceFormatCustom#formatter

MHHukiewitz avatar Jun 13 '22 10:06 MHHukiewitz

I know about custom formatter, but that's not what we need. We want to hide fractional part in price marks if all marks have zero fractional part, otherwise we want to show it

kirchet avatar Jun 14 '22 10:06 kirchet

@kirchet should we close this issue?

SlicedSilver avatar Feb 08 '23 14:02 SlicedSilver

Yes, we can close this issue

kirchet avatar Feb 08 '23 15:02 kirchet