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

Custom priceFormatter causes line to disappear when no data variance #1650

Open
Fyko opened this issue Jul 23, 2024 · 2 comments
Open

Custom priceFormatter causes line to disappear when no data variance #1650

Fyko opened this issue Jul 23, 2024 · 2 comments
Labels
bug Unexpected problem or unintended behavior.

Comments

@Fyko
Copy link

Fyko commented Jul 23, 2024

Lightweight Charts™ Version: 4.1.7

Issue
When using a custom priceFormatter to create a text display for very large numbers, when all the current data for the chart is the same, no area/line is shown.

Sample code:

Video

Screen.Recording.2024-07-23.at.3.31.10.PM.mov

Live example
https://eidash.fyko.net/users/user_2fNmJ8ExsOPfUa4yqme7p26xtvN. Click the account selector, then click AlsoMajCartef. Observe the Eggs of Prophecy showing a straight line with no change, and Earning Bonus will show nothing, because there is no variance in data.

@SlicedSilver
Copy link
Contributor

I tried to reproduce this with a simple example, and it seems that the issue only occurs with numbers around 1 quadrillion in size.

https://stackblitz.com/edit/lwc-1650?file=src%2Fmain.ts

I would suggest reducing the size of the number before providing it to the library (via setData).

@SlicedSilver SlicedSilver added the bug Unexpected problem or unintended behavior. label Jul 24, 2024
@Fyko
Copy link
Author

Fyko commented Aug 2, 2024

I'm glad to see you've been able to reproduce! Unfortunately, I can't reduce the size of my data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

No branches or pull requests

2 participants