Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

113
Views
Grouping items and expand branches in D3 Org Chart

Good day, I'm relatively new using D3. I have created a Org Chart using D3 and JQuery/Javascript.

  <script src="https://d3js.org/d3.v7.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/d3-org-chart@2"></script>
  <script src="https://cdn.jsdelivr.net/npm/d3-flextree@2.1.2/build/d3-flextree.js"></script>

However, I am trying to figure out how can I open my chart with all the branches expanded by default. Also, because there are so many people in our group, is there a way to group items in a single node based on office and/or division?

Thank you in advance!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As per source code of the d3-org, you will have to use chart.expandAll(); where chart is your created chart. There are other methods like collapseAll, downloadImage, exportSVG etc. You can refer this file https://github.com/bumbeishvili/org-chart/blob/master/src/d3-org-chart.js to find out which method you want to use.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!