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

Fixed stutter due to very large tooltip text #519

Closed

Conversation

OmkarPh
Copy link
Collaborator

@OmkarPh OmkarPh commented Apr 20, 2022

Fixes #444

Signed-off-by: Omkar Phansopkar [email protected]

@OmkarPh
Copy link
Collaborator Author

OmkarPh commented Apr 20, 2022

Trimmed the tooltip text, If you want, we can change the trim character count
image

@OmkarPh
Copy link
Collaborator Author

OmkarPh commented Apr 20, 2022

@pombredanne ^^

@AyanSinhaMahapatra
Copy link
Member

LGTM! Thanks @OmkarPh!

Tested and can confirm that the stutter is not present anymore after this fix is applied.

@@ -112,7 +112,7 @@ class BarChart {
tooltip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's another .text() on line 96, is that something (and are there other places like this elsewhere in charts/others) that would also benefit from trimming potentially?

I'm not super familiar with .js or this codebase so I have no idea btw.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That line is used to set the count for the bar which won't be that long character wise

to verify i added console log on that line to check what values are used there i.e.
.text((d) => { console.log('text being set on line 96 to', d.val); return '(' + d.val + ')'; })
It gave output:
image

and, about trimming at other places, I searched through a lot of files but only these 2 needed change

Copy link
Contributor

@steven-esser steven-esser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good.

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

Successfully merging this pull request may close these issues.

Single Click Doesn't work on Long names in Chart Summary View
3 participants