Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support null/Nan #362

Open
amigian74 opened this issue Jun 3, 2021 · 6 comments
Open

Support null/Nan #362

amigian74 opened this issue Jun 3, 2021 · 6 comments

Comments

@amigian74
Copy link
Contributor

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.

@robertsLando
Copy link
Collaborator

You can use textRenderer for this

@amigian74
Copy link
Contributor Author

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

This is not working at all.

@robertsLando
Copy link
Collaborator

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

@amigian74
Copy link
Contributor Author

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.

@robertsLando
Copy link
Collaborator

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?

@robertsLando robertsLando reopened this Jun 3, 2021
@amigian74
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants