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

Force z index on labels #2

Open
AidanDaniel97 opened this issue Jun 8, 2020 · 3 comments
Open

Force z index on labels #2

AidanDaniel97 opened this issue Jun 8, 2020 · 3 comments

Comments

@AidanDaniel97
Copy link

When the chart is rendered the parent labels show underneath all the child circles - is there a way to have the label show on top?

@vasturiano
Copy link
Owner

@AidanDaniel97 I'm afraid that because of the way the SVG is structured (circle layers are stacked on top of each other, including their labels), it's not possible to pop one of the labels to the front.
Since the graph is rendered in SVG, z-index css is also not a possibility.

But, you can manipulate the color opacity of the circles to allow some degree of see-through, so that the nested labels are still visible.

@dz0l038
Copy link

dz0l038 commented Dec 15, 2020

Hi @vasturiano, first of all thanks for your nice job here!

I am facing the same issue, but instead of changing the stack order, another solution would be to display only labels at a certain level. Basically exactly like here: https://observablehq.com/@d3/zoomable-circle-packing.

Do you think it would be doable with your project?

@vasturiano
Copy link
Owner

@dz0l038 you can chose to set labels only on certain nodes. Just leave the label attribute out for those levels which you do not wish to have labels.

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

No branches or pull requests

3 participants