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

Add ability to hide some labels while showing others #71

Closed
tmthyjames opened this issue Jan 30, 2017 · 1 comment
Closed

Add ability to hide some labels while showing others #71

tmthyjames opened this issue Jan 30, 2017 · 1 comment

Comments

@tmthyjames
Copy link

Great library.

I want to be able to hide some labels and show others because if a certain value is dwarfed by other values to the point where their section of the funnel is only a few pixels in height, then their labels don't adjust and it looks cluttered.

Screenshot:

image

Notice the categories in the middle.

If this is already possible, I will be happy to close this ticket. If not, I'd be happy to give it a go.

@jakezatecky
Copy link
Owner

jakezatecky commented Jan 31, 2017

I have been considering adding an option to hide labels globally, specifically in consideration of #10 and #45, but did not plan for anything on a block-level.

I suppose this could be added, but I hesitate to add yet another index to the existing data structure array. I think it might be appropriate to allow for an object to be used in place of an array; that would make it cleaner to allow block-level customizations like hiding labels. I'll consider making that a feature that has backwards compatibility with the existing data structure.

In the interim, you might consider setting a minimum height, such that each block is guaranteed to have a height large enough to support the text:

const options = {
    block: {
        dynamicHeight: true,
        minHeight: 25,
    },
};

@jakezatecky jakezatecky added this to the Release 1.1 milestone Jun 7, 2017
jakezatecky added a commit that referenced this issue Jun 9, 2017
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