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

created network graph with collapsing child nodes. #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LB0ge
Copy link
Contributor

@LB0ge LB0ge commented Aug 3, 2023

No description provided.

@LB0ge LB0ge requested a review from pawellysy August 3, 2023 12:53
Copy link
Collaborator

@pawellysy pawellysy left a comment

Choose a reason for hiding this comment

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

Looks good! Just minor comment

PS: Extra style points for dataset :D

Comment on lines 31 to 37
const dataLabels = Array.from(
chart.series[0].dataLabelsGroup.element.children
);

dataLabels.forEach(
(el, i) =>
(el.style.visibility = i != 1 ? 'hidden' : 'visible')
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need for creating the new array. You can just loop through the chart.series and there set for each datalabelsGroup the correct property

Copy link
Contributor Author

@LB0ge LB0ge Aug 4, 2023

Choose a reason for hiding this comment

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

Thanks! Not sure if my updated solution is exactly what you had in mind, but I figured out that I could just update the showHideChildren function as per my new commit.

Thanks for the extra style points! 😎

Copy link
Collaborator

@pawellysy pawellysy left a comment

Choose a reason for hiding this comment

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

Good job!

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.

2 participants