Skip to content

Conversation

@defunctzombie
Copy link
Contributor

When datasets have values approaching Number.MAX_VALUE, the tick calculations might result in infinity and eventually NaN. Passing NaN for minimumFractionDigits or maximumFractionDigits will make the number formatter throw. Instead we check for isNaN and use a fallback value so the formatter does not throw.

When datasets have values approaching Number.MAX_VALUE, the tick calculations might result in infinity and eventually NaN. Passing NaN for minimumFractionDigits or maximumFractionDigits will make the number formatter throw. Instead we check for isNaN and use a fallback value so the formatter does not throw.
@defunctzombie
Copy link
Contributor Author

Originally discovered in our visualization tool which uses chart.js. We had users with datasets containing Number.MAX_VALUE and it was crashing our plot panels.

https://github.com/foxglove/studio/pull/5786

Co-authored-by: Jacco van den Berg <[email protected]>
@LeeLenaleee LeeLenaleee added this to the Version 4.3.0 milestone Apr 19, 2023
@etimberg etimberg merged commit b16f32a into chartjs:master Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants