-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
const dataLabels = Array.from( | ||
chart.series[0].dataLabelsGroup.element.children | ||
); | ||
|
||
dataLabels.forEach( | ||
(el, i) => | ||
(el.style.visibility = i != 1 ? 'hidden' : 'visible') |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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! 😎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
No description provided.