ubunatic/ohlc

Very small cryptocurrency rates (<0.01) get truncated to 0.00

grepsuzette opened this issue · 5 comments

While showing cryptocurrency prices with very low rate shows accurate candles, the axis on the right shows a mere 0.00 for every input.

For instance, there is an asset called HOT and the HOTBTC symbol is currently worth around 20 satoshis, in other words the rate is around 0.00000020. But the right axis will show 0.00. Same thing for max: 0.00 and last: 0.00.

On the other hand it works very well for huge prices, e.g. 1438572952. Which means it's just truncated to 2 decimals. I'm not sure yet what would be the best here, but I'm gonna publish this first.

If any price in the sequence is <0.10 maybe it would be best to switch to a truncation to the 8th decimal instead of the 2nd decimal? In general in cryptocurrency it can not go below 0.00000001 (ok, unless it goes to 0 :P).

I think you should prepare the data and maybe show satoshis instead of 0.0000... values..
I will flag that issue as an enhancement, not sure when I am able to pick it up

Yes there is no urgency.

Note the case of HOTBTC is the most extreme one. But there are plenty other cryptocurrencies though (most of them if expressed against BTC) which have rates in the 0.00000xxx to 0.00xxxxxx.

I think eventually since the chart works so well already even with such low rates it will be a logical enhancement to have.

(Sorry, I pressed close and comment button by mistake)

project will be archived