Help with ticklabel formatting

SO, I have provided 5 digit space (excluding sign) for the y axis ticklabel and I want the ticklabel within that 5 digits so using this ref https://github.com/d3/d3-format/blob/master/README.md#locale_format I did like this : `" .5g". But the problem is that if the number is like 0.15 it shows 0.15000 thats more than 5 digits in total, so the front 0 and sign gets hidden. Show how do I show it like 0.1500 and keep everything from not getting hidden?

We might want to check out:

which can help with the d3 format syntax.

I think the f (or the ‘r’?) suffix might be the one you’re looking for.