There is a purpose to it. At least, that’s my understanding. 2.000e+4
means that there are 0s in those spaces. 2e+4
means that the number might have been rounded/truncated.
You cannot have conditional formatters on Python side. If you want to have some additional logic, you will have to use FuncTickFormatter
or create your own formatter. With that being said, it’s nothing complicated. Likely, you will end up with just two lines of JavaScript.