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
Apply format to trading charts axis Y values #4761
Conversation
Format currency tick values as integers for a more compact form, without the 4-zeroesfractional part.
The y-axis tick mark labels for crypto (non-fiat) currencies have a large number of trailing zeroes. This commit removes the last 3 zeroes from the display.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure the first three zeros being replaced will always be the three trailing zeros?
@ghubstan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. A RegEx is used that anchors at the trailing end of the string, so only the last zeroes are matched. It can no have multiple mathches.
The use of either function replaceFirst or replaceAll does not matter.
Missed that... thanks.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
This PR completes the improvements to trading charts introduced in PRs #4715 and #4740, by formatting the Y-axis values of the Price chart as:
Here is the result for the EUR chart, similar for other fiat:
Below are before and after for various cryptos:
XMR before:
XMR after:
BSQ before:
BSQ after
ETH before:
ETH after:
What do you think ?