Skip to content

Add fileSize option #98

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

Closed
marcofugaro opened this issue Apr 14, 2021 · 4 comments
Closed

Add fileSize option #98

marcofugaro opened this issue Apr 14, 2021 · 4 comments

Comments

@marcofugaro
Copy link

marcofugaro commented Apr 14, 2021

Related: #96 (comment)

In my case, the library I'm using this plugin on gets tree-shaken, so the displayed filesizes don't match.

I would like an option to remove them completely both from the visualization and from the tooltip, since they may be confusing. Ideally only percentages would be displayed.

The option would be something like:

fileSize (boolean, default true) - Collect file size from source code and display it in the chart.

@btd
Copy link
Owner

btd commented Apr 18, 2021

I just published 5.4.0 where i changed UI of treemap a bit. I added notice to tooltip about what is a size and remove size from text labels of nodes.

@btd btd closed this as completed Apr 18, 2021
@marcofugaro
Copy link
Author

Thanks!

However I see in the new version that the names increase in font-size to fill all the available space.

This may often be confusing, since shorter names will appear bigger, even if the treemap block is smaller.

It also confusingly creates a Word Cloud visualization effect with the names, which influences the perception of the sizes.
Could you do an option to disable this?

image

@btd
Copy link
Owner

btd commented Apr 19, 2021

Yep that seems true. My main idea was to reduce sizes to make sure it tries to fit the box instead of being cut on edge.

I do not want to make and support tons of options, my preference is to have reasonable opinionated defaults.

@btd btd reopened this Apr 19, 2021
@btd
Copy link
Owner

btd commented Apr 19, 2021

Updated to 5.4.1 it will center labels, but without font grow.

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

No branches or pull requests

2 participants