toorshia/justgage

Support null/Nan

amigian74 opened this issue · 6 comments

Hello,

ther should be the possibility to show null or Nan-values as ---. Now a null is cast to 0 - that is not correct in some situations.

You can use textRenderer for this

It#s not that easy. There are no informations given to this function (like datatype, decimal points, etc.)

This is not working at all.

it has only one argument that is the number value to render, the output expected is a string or a number that you want to display

That's the problem - all information in the config object (humanFriendlyDecimal, decimals) are left out. So I cant't format the value properly if it is not null/undefined.

You can get the config from the justgage instance object, what actually is missing are the human and format functions as them are not a justgage function, would you like to submit a PR where those functions are added in Justgage prototype so you can easily use them in the textrender function?

I'm not sure when to do this - I'll try