Giter Club home page Giter Club logo

org-chart's Introduction

SWUbanner

Highly customizable d3 based organization chart

NPM version

Medium article about this project

Highly customizable org chart built with d3 v7.

Features

Simple Data
Custom Content
Nested Data
Online JSON Data
CSV Data
Styled Tree
Expand Node Collapse Node
Add Node Remove Node Fit Screen Change Layout
Center Node Highlight Node Fullscreen Zoom in and out
Export Expand & Collapse All Multi Node Connections Paging
Horizontal View Active node centering Interactive Node Searching org chart
Scrollable content Data driven size

Community Samples

Drag & Drop Nodes

How to use

Just copy this code and paste at - https://realtimehtml.com/

<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-org-chart@3"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/d3-flextree.js"></script>
<div class="chart-container"></div>

<script>
 var chart;
 d3
  .csv(
   "https://raw.githubusercontent.com/bumbeishvili/sample-data/main/org.csv"
  )
  .then((data) => {
   chart = new d3.OrgChart().container(".chart-container").data(data).render();
  });
</script>

Installing

npm i d3-org-chart
import { OrgChart } from 'd3-org-chart';

 new OrgChart()
     .container(<DomElementOrCssSelector>)
     .data(<Data>) // https://github.com/bumbeishvili/sample-data/blob/main/data-oracle.csv
     .render();

In general, we encourage to look into the source code to understand how it works. The chart code is basically a single class. At the top of the class, we have a state object called attrs which stores the state of the org chart and each single property is overridable by the user.

For example, one of the property name inside attrs object is duration, which controls animation duration for chart, when expanding or collapsing nodes.

If we want to get the value, we can either do

chart.getChartState().duration

or directly

chart.duration()

chart in the above case is an instance of OrgChart class. We can get it using new OrgChart()

If we want to set property, we can pass argument to the same function and it will automatically set the value

chart.duration(3000)  // This will become very slow moving chart

You can see list of all properties , their description of what each property does in the actual source code.

/* INTENDED FOR PUBLIC OVERRIDE */

Be aware that they are chainable, so if we wanted to set multiple properties, we would do this

const chart = new OrgChart()
                    .data(ourData)
                    .container(ourDomElementOrCssSelector)
                    .duration(ourDuration)
                    .render()


// We can keep chaining values in runtime
chart.data(updatedData).render()

Have you impressively customized an organizational chart and want to be featured on this page? Just email me at [email protected] and include screenshot of your org chart and it will be featured on this page (dimensions of image should be 500 X 500).

Jump To Examples

Default
Sky
Circles
Oval
Clean (Design by Anton)
Futuristic - Full Functionality
Prev version design

Featured customizations:

Check out several libraries and frameworks integrations

Custom components & algorithms I used

Quick Docs

Check the sample data here - https://github.com/bumbeishvili/sample-data/blob/main/data-oracle.csv

For the full functionality of exposed methods check Futuristic Example and button bound functions

For the high level overview of margins and content setting check the image bellow

Notes & appreciations

I created this org-chart when I was hired by TeamApps.

Although this Org chart was specifically created for teamapps java web application framework , it's very flexible and can be used in any environment, where d3 and DOM is accessible.

Big thanks to Matthias and Yann, who assembled requirements for org-chart and had valuable pieces of advice afterwads.

Also, thanks all people who made generous donations, it gives me motivation to further improve this org chart component.

Thanks contractzen for the significant contribution, which made implementation of some of the most important features (optimal layout, exporting ) possible.

Author

David B (twitter)
David B (linkedin)

I am available for freelance data visualization work. Please contact me in case you'd like me to help you with my experience and expertise

You can also book data viz related consultation session with me.

You might not need a consultation, but you want to appreciate the time and effort I am putting into this library, and if you correspond with an organization, you might also want to enjoy private QA about org chart over emails. In that case, you can support the org chart via polar.sh/bumbeishvili

org-chart's People

Contributors

aizaiz avatar bumbeishvili avatar danfelipe avatar michael-lumley avatar robert-fink avatar tildewill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org-chart's Issues

(Feature Request) Expand node when addNode

Current behavior:

When addNode triggered, it only expands root node and the target parent node is not expanded.

Request behaviour:

Expands target parentNode when added a node

Unable to zoom or translate when using in angular project

I followed the steps as per your sample angular stackblitz example. I get the following error

core.js:4197 ERROR TypeError: Cannot read property 'transform' of undefined
    at TreeChart.zoomed (d3-org-chart.js:1185)
    at SVGSVGElement.<anonymous> (d3-org-chart.js:167)
    at Dispatch.call (dispatch.js:57)
    at Gesture.emit (zoom.js:219)
    at Gesture.zoom (zoom.js:207)
    at SVGSVGElement.wheeled (zoom.js:262)
    at SVGSVGElement.<anonymous> (on.js:3)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:27424)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)

I am using this particular version

Angular CLI: 10.0.7
Node: 10.22.0
OS: win32 x64

Angular: 10.0.11
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.7
@angular-devkit/build-angular     0.1000.7
@angular-devkit/build-optimizer   0.1000.7
@angular-devkit/build-webpack     0.1000.7
@angular-devkit/core              10.0.7
@angular-devkit/schematics        10.0.7
@angular/cli                      10.0.7
@ngtools/webpack                  10.0.7
@schematics/angular               10.0.7
@schematics/update                0.1000.7
rxjs                              6.5.5
typescript                        3.9.7
webpack                           4.43.0

I tried to import index.js into my project and I still face the same error. Is there any quick workaround to fix the issue?

+/- buttons not centered in Firefox

On Firefox 68.12.0 it appears that the '+' and '-' sign are not centered in the circle. I'm seeing this in both mac and windows. At first I thought this had to do with how we were doing some styling in the nodes, but I went to the observable d3 org chart to look at the demo and it's doing the same there.

see the attached screenshot.

Screen Shot 2020-09-28 at 5 50 38 PM

Compact Layout

How can we minimise the distance between nodes when both of the nodes are expanded.

Please find below link for the better illustration of the problem.

@bumbeishvili could you please help me resolving this issue.

DistanceBetweenNodesWhenExpanded.mp4

and sample code pen is https://codepen.io/rajat-sf/pen/ZELmmLr?editors=1010

Thanks for this wonderful repository having almost ready to use code.

Improve subordinates view

Currently, subordinates position and text is kind of hardcoded

It will be better if we expose method for that and allow the user to override it
Screen Shot 2020-02-14 at 19 19 24

Error missing: node

Hello,

I have forked the repository and trying to make it work with my data. I have not been successful in generating a chart using the data I have, which mirrors the one in the source repository.

What I am missing or doing wrong? I am using the email addresses of the managers as the parentNodeId.
I am using d3-org-chart version 1.1.13 of the script along with d3.v5.16

Thank you for your reply.


missing: [email protected]
▼ 2 stack frames were expanded.
stratify
https://91hlv.csb.app/node_modules/d3-hierarchy/src/stratify.js:34:29
TreeChart.render
https://91hlv.csb.app/node_modules/d3-org-chart/index.js:179:13
▲ 2 stack frames were expanded.
eval
/index.js:19:5
  16 |     .svgHeight(window.innerWidth)
  17 |     .initialZoom(0.6)
  18 |     .onNodeClick((d) => console.log(d + " node clicked"))
> 19 |     .render();
     |     ^
  20 | });
  21 | 

Data: https://gist.githubusercontent.com/ebitsdev/df73973abe2992885bd643ff952dedb9/raw/e93bc8556b300a005b3de8e6b2b7bffc88a40ed0/org_chart_data.json.
Project: https://codesandbox.io/s/broken-framework-91hlv?file=/index.js

Unsafe Use of Eval triggers CSP.

The use of naked eval() calls is triggering a CSP error when I try to use this library. I have submitted a PR here: #39 to address the issue.

Pagination /showing fixed number of nodes in each level

Hi I am using the older version of this project link.
but if a node has 40-50 children the view gets cluttered an you have to scroll left/right too much.

I was wondering if there is an easy way to shown "n" number of nodes on each level and will have previous next button to show the next n.

from my understanding this isn't currently implemented in the code right now, so I am looking for any pointers / previous work to start.

Possible to have two nodes at the same time?

Hi all,

I am wondering if d3-organization-chart support two nodes like following screenshot:

Screenshot 2020-08-03 at 10 17 40 AM

Just like a family tree with combination of husband + wife.

If yes, how could I can configure this?

Thanks.

Can I use `d3-organization-chart` in reactjs?

I am developing the project using Reactjs and Redux. In my platform, we need to use the d3-organization chart to show for the company tree to the user.

Integrating this library to react and the data would be loaded from Backend APIs.

Wrong elements order

This functions well in the reference implementations, and it initially worked in my implementation, but it is not currently behaving well for me. This leads me to believe I have borked my implementation in some way - maybe because I'm re-rendering the chart on data changes. Please advise if you know of a way to fix my usage. Details of my problem:

  • Incorrect order:
    image
    Gives the image behind the template:
    image

  • Correct order:
    image
    Gives the image in front of the template:
    image

I think the fix is to move the // Add background rectangle for node image code down a few lines so it is after the // Add foreignObject element inside rectangle code. That seems to fix it locally for me. However, even with current code order, I see that the DOM elements render in the correct order in the reference implementations. I'm interested in any unintended side effects this may introduce. Image may be rendered before template for good reason.

Please forgive my general lack of knowledge if I'm misinterpreting something basic. I'm very new to web development. Thanks for an awesome org chart!

Question best practice

Hi,

I will most probably use your code dt-organization-chart, nice coding.
I am new to github interactions and have a question.

I have made so far only smaller changes and was planning tackle custom name for direct and total subordinates. Nothing fancy but I also may need to change the position somehow.

I found out by browsing forks that it has already been done:
https://github.com/rhodief/d3-organization-chart

So what is the best practice?
Should I ask you for the feature and then ask him to insert it into your code or should i ask him if i could copy it to my fork?

Best regards

Andor

How do I collapse/Expand by nodeId?

I saw a bug reported related to this. Is there supposed to be an api call to collapse and expand nodes by nodeId?

Also, there is a new dev version in progress - check the roadmap here - #14

Update the chart

Hi David,

I've tried to call the update() method with a new set of json source.

VM2961:1 Uncaught ReferenceError: update is not defined
at :1:1

is it possible to re-draw the graph with new data?

Horizontal layout?

Is your feature request related to a problem? Please describe.
Not a problem, but just a preference - in my project I'd like to display the chart elements expanding out horizontally to the right, rather than top-down. Example:

image

Describe the solution you'd like
Ideally this would be a parameter that could be passed as a part of the exposed variables, but I also think it might be possible just to modify the JS file to change the way that the elements are laid out.

I was intrigued by the way the nodes were positioned, as well as how the paths were generated in diagonal(), but I haven't quite played around enough to be able to alter this logic to do what I want - to orientate descendants horizontally towards the right, rather than spreading out top-to-bottom.

Code_OvO3fa3rdU

Describe alternatives you've considered
I tried my hand at modifying the JS file and looked around for an option or configuration I might have missed, but I came up empty - maybe @bumbeishvili has thoughts on how to make it work this way? If not, no worries, thanks anyway for this fantastic project.

Data of size 1 is not supported

Describe the bug
Data of size 1 is not supported and leads to error TypeError: Cannot read property 'forEach' of undefined happening here:

// Collapse all children at first
attrs.root.children.forEach(d => this.collapse(d));

// Then expand some nodes, which have `expanded` property set
 attrs.root.children.forEach(d => this.expandSomeNodes(d));

To Reproduce
Steps to reproduce the behavior:

  1. Provide data in correct format of size 1
  2. Set data and call render like this.chart.data(data).render()
  3. See error in console an no org chart drawn

Expected behavior
Org chart should show the root element

Could you please fix this?

Change the starting position

Hello David,

Could you please help me to find the starting position? (Since I am trying to use it horizontal, I need to start from middle left, instead of middle top)

Images required?

For my use, we don't need the images. If I take out the nodeImage from the example you have, I get a 'cannot read property 'url' of undefined' at the "add images to pattern" part of the code where it tries to look for an image. Is there something that needs to be done to ignore the image?

The code below is from Chrome dev tools.

// Add images to patterns
        const patternImages = patterns.patternify({
            tag: 'image',
            selector: 'pattern-image',
            data: d => [d]
        })
            .attr('x', 0)
            .attr('y', 0)
            .attr('height', ({
                imageWidth
            }) => imageWidth)
            .attr('width', ({
                imageHeight
            }) => imageHeight)
            .attr('xlink:href', ({
                data
            }) => data.nodeImage.url) <------ HERE
            .attr('viewbox', ({
                imageWidth,
                imageHeight
            }) => `0 0 ${imageWidth * 2} ${imageHeight}`)
            .attr('preserveAspectRatio', 'xMidYMin slice')

Chart re-center on update using it with Angular

Describe the bug
When updating the org chart on Angular it is always re-centered in the svg. This bug happens on the Angular example as well as reproduced in a test app (both on D3 v5 and v6 Angular 11). The problem is not happening on the Observable example

To Reproduce
Move around the chart and click the button

https://stackblitz.com/edit/d3-org-chart-angular-integration-muka3u?file=src/app/d3-org-chart/d3-org-chart.component.ts

Expected behavior
The chart should not re-center working fine on below example (move around the chart in the svg and add a new root node)

https://observablehq.com/@bumbeishvili/d3-v5-organization-chart

Screenshots
Please see example links

Desktop (please complete the following information):
Chrome latest as of 14 June 2021

Smartphone (please complete the following information):
Not tested

Additional context


Also, there is a new dev version in progress - check the roadmap here - #14

Vertical Usage and Node Level Limitation

Hello David,

First of all, that an amazing job! Thanks for sharing that all free, I am glad!

Is that possible to use the chart vertically and limit the initial number of level of the nodes.
As default, it comes horizontal and with 3 levels of nodes.

Thanks in advance!

v2 Roadmap

Merged PR - #70

Development

  • Before proceeding with features, simplify code as much as possible

Bugs and small features

  • One element data array
    ° #41
  • Unsafe use of eval
    ° #40
  • Node image group - foreign object order
    ° #34
  • Plus Minus Button
    ° #33
    ° #11
    ° #46 Check
  • Root node collapse

FAQ

  • Provide chart update code snippet
    ° #8

Enhancements

  • d3 flextree
    ° #55
  • Export current or full view
    ° #44
  • Responsivness
    ° #37
  • Better default design
    ° #62

More flexible content

  • Allow providing node content via HTML (properties like, highlighted, collapsed, expanded, subordinates count, subordinates array method, will be included, which allows the user for custom styling). It allows the user to provide custom content for each case.
    ° #9
    ° #10
  • Allow providing custom properties id, and parentId
  • Allow providing expand, collapse content (properties like, highlighted, collapsed, expanded, subordinates count, subordinates array method, will be included, which allows the user custom styling).
    ° #47

UX

  • neighbourMargin
  • fit - zoom to bounds
  • zoom in
  • zoom out
  • Full Screen
  • Expand All

Search & Highlight (#2 )

  • Add option for node centering
    ° #18
  • Higlighting nodes
  • Add option for expand
  • collapse
  • node centering

New Features (Misc)

  • Add horizontal layout option -
    ° #6
    ° #42
    ° #20
  • Option for compact vertical layout - Much like this
    ° #50
    ° #18
  • Adding ability to connect multiple nodes to each other
    ° #59
    ° #57
    ° #3

Fix existing bugs and add integration samples

  • Angular integration
    ° #13
  • React Integration -
    ° #5
  • Vue integration

Upgrade

  • Upgrade to d3.v7
  • Convert as d3 plugin
    ° #35

Misc

  • Make almost all code pieces updatable
  • NPM publish

Examples

  1. Screenshot 2021-07-18 at 09 59 14

Private Consultation

  • Consultation
  • Mentions
  • Articles

Collapse-expand usage

Hello David,

As you can see attached video, collapse and expand animations are acting so weird. I am sending the collapsed and expanded JSON sources as well. Could you please help me to find it out? (You can see source JSON's and describing video below)

issue

Collapsed
[{"nodeId":"1","parentNodeId":null,"expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"<div style='height: 75px; width: 260px; background-color:white'>\n <pre style='color:black; padding-top:3px; font-family:arial'>\n Node Info\n General Node Information\n This node is so good,\n check this node. really good \n </pre>\n</div>","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Root Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"2","parentNodeId":"1","expanded":true,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#FFFF00","width":5,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#FFFF00","lineWidth":5}},{"nodeId":"3","parentNodeId":"1","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"4","parentNodeId":"2","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"5","parentNodeId":"2","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"6","parentNodeId":"3","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"7","parentNodeId":"3","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"8","parentNodeId":"3","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"9","parentNodeId":"4","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"10","parentNodeId":"4","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"11","parentNodeId":"9","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"12","parentNodeId":"9","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"13","parentNodeId":"10","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"14","parentNodeId":"11","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"15","parentNodeId":"7","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"16","parentNodeId":"7","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"17","parentNodeId":"15","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"18","parentNodeId":"17","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"19","parentNodeId":"17","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"20","parentNodeId":"18","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"21","parentNodeId":"6","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"22","parentNodeId":"6","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"23","parentNodeId":"21","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"24","parentNodeId":"21","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"25","parentNodeId":"22","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"26","parentNodeId":"22","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"27","parentNodeId":"26","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"28","parentNodeId":"26","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"29","parentNodeId":"8","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"30","parentNodeId":"8","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}}]

Expanded
[{"nodeId":"1","parentNodeId":null,"expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"<div style='height: 75px; width: 260px; background-color:white'>\n <pre style='color:black; padding-top:3px; font-family:arial'>\n Node Info\n General Node Information\n This node is so good,\n check this node. really good \n </pre>\n</div>","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Root Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"2","parentNodeId":"1","expanded":true,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#FFFF00","width":5,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#FFFF00","lineWidth":5}},{"nodeId":"3","parentNodeId":"1","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"4","parentNodeId":"2","expanded":true,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#FFFF00","width":5,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#FFFF00","lineWidth":5}},{"nodeId":"5","parentNodeId":"2","expanded":true,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#FFFF00","width":5,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#FFFF00","lineWidth":5}},{"nodeId":"6","parentNodeId":"3","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"7","parentNodeId":"3","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"8","parentNodeId":"3","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"9","parentNodeId":"4","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"10","parentNodeId":"4","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"11","parentNodeId":"9","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"12","parentNodeId":"9","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"13","parentNodeId":"10","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"14","parentNodeId":"11","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"15","parentNodeId":"7","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"16","parentNodeId":"7","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"17","parentNodeId":"15","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"18","parentNodeId":"17","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"19","parentNodeId":"17","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"20","parentNodeId":"18","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"21","parentNodeId":"6","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"22","parentNodeId":"6","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"23","parentNodeId":"21","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"24","parentNodeId":"21","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"25","parentNodeId":"22","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"26","parentNodeId":"22","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"27","parentNodeId":"26","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"28","parentNodeId":"26","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"29","parentNodeId":"8","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}},{"nodeId":"30","parentNodeId":"8","expanded":false,"width":342,"height":146,"backgroundColorHex":"#0FB6D0","template":"","directSubordinates":0,"totalSubordinates":0,"border":{"colorHex":"#0F8C79","width":1,"radius":5},"nodeIcon":{"icon":"http://www.iconsdb.com/icons/preview/white/data-protection-xxl.png","size":30},"nodeInfo":{"name":"Node","minorInfo":"Foo bar aaa cc"},"connector":{"lineColorHex":"#DCBDCF","lineWidth":5}}]

Screen Recording 2020-02-18 at 14.03.58.mov.zip

I'd be so happy if you find some time to help me to find the problem.
Cheers

make svg responsive

Hey, it's me again. ;-)

Is there a way to make the org chart responsive or to be more precise: to make the canvas responsive?
Once resizing the browser window the canvas does redraw itself. Is there a way to force this without listening to the window resize event and call the render method again?

No export

I think that export functionality could be the most useful for users. There is any solution to that. I trying to download the chart using some npm packages like html2canvas, domtoimage. It works but the images are not shown. So kindly let me know any other possible ways to download the chart.
Chart (25)

Stacked nodes view

Hey David,
This chart is awesome and very flexible too. I'm trying to manipulate this chart as per my need but i'm little bit in dilemma when it comes to view of nodes they are all scatter on the screen and looks ugly and frustrating at times when there are lots of nodes under a parent. Could it be possible to make them stacked one on another. Though i have tried several hit and trial but unable to achieve. It would be very helpful if you can give some idea around this implementation.

Thanks for your valuable contribution.
stacked_view

nodeIcon is not used / ignored

I saw that the usage of the provided nodeIcon is ignored (cf. node-icon-image in your code).
Why is it like that? I would love to use a custom icon for collapsing nodes.

collapsing root node then trying to expand a descendent node with chart.setExpand throws Uncaught TypeError

pre-req: open chrome dev tools
STR:
Go to the demo site https://observablehq.com/@bumbeishvili/d3-v5-organization-chart
Collapse root node (Ian Devling)
Click on button expand node with id O-111

Expected Result: Nodes should expand, no errors thrown
Actual Result: Error thrown in console; nothing happens.

The error is being thrown from this line https://github.com/bumbeishvili/d3-organization-chart/blob/master/index.js#L1074

The root has no children when everything is collapsed.

Multi parent

Hello,
Can you give me a tip on how to customize this solution for a node to support multi parent.

create links between nodes

I am trying to obtain a functionality where I have to show some relationship of parent and child ( two levels down) is there any way to do that if it has been already implemented where can I get it?

Use d3.flextree

Use d3.flextree instead of standard d3 tree, since it offers more freedom towards compact layout

2 way Org Chart

Is it possible to build a 2 way Org Chart. which to add a level of nodes on the top of the root(company) to show the owners/stockholder of it.

Expand plus and minus sign not pixel perfekt

Because of the different font-size of the chars +- (26 resp 40) with possible combination of char placement in font, it looks like they are little off center.

Not 100% certain if it is a easy fix or just a fix for given font-family, but you could off the - sign little to make the feel more aligned.
Have tried with replacing:
.attr('y', this.isEdge() ? 10: 0)
with
.attr('y', ({ children }) => this.isEdge() ? 10 : children ? -3 : 0)
and it feels a little better.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.