OrgChart icon indicating copy to clipboard operation
OrgChart copied to clipboard

connection links

Open marwenria opened this issue 1 year ago • 6 comments

How can I hide connection lines and change their color? It is urgent. :(

marwenria avatar Jan 04 '25 18:01 marwenria

@dabeng please can you help me?

marwenria avatar Jan 04 '25 18:01 marwenria

Well, asking for "urgent" support from a contributor is not really the way to go.

Still, if you are in such a hurry, you can include at the bottom of the css file (e.g. jquery.orgchart.css) the following css:

.orgchart {
  --background-color: blue;
}

.orgchart .hierarchy::before {
    border-top: 2px solid var(--background-color);
}

.orgchart .hierarchy:not(.couple) > .node:has(+ .nodes)::after {
  background-color: var(--background-color);
}

.orgchart .hierarchy:not(.couple) > .node:has(+ .nodes)::after {
  background-color: var(--background-color);
}

.orgchart > ul > li > ul li > .node:not(.outsider)::before {
  background-color: var(--background-color); 
}

just change --background color to the color you want, including "transparent" to "hide" it.

Alternatively, you can put it anywhere using !important:

.orgchart {
  --background-color: transparent;
}

.orgchart .hierarchy::before {
    border-top: 2px solid var(--background-color)!important;
}

.orgchart .hierarchy:not(.couple) > .node:has(+ .nodes)::after {
  background-color: var(--background-color)!important;
}

.orgchart .hierarchy:not(.couple) > .node:has(+ .nodes)::after {
  background-color: var(--background-color)!important;
}

.orgchart > ul > li > ul li > .node:not(.outsider)::before {
  background-color: var(--background-color)!important; 
}

ValeDale avatar Jan 06 '25 15:01 ValeDale

Thank you, can you help me in another problem?

reyebna avatar Jan 22 '25 18:01 reyebna

Thank you, can you help me in another problem?

Well... depends ! :-)

ValeDale avatar Jan 22 '25 18:01 ValeDale

Can i make something to make nodes adjacent closely like photo, for example close the nodes A and B and C to D. What should i going to do? 😔😔

Image

reyebna avatar Jan 22 '25 18:01 reyebna

It seems to me that to do exactly what you state would be pretty complicated requiring quiet some logic. Also, if A,B or C would have children, that would change again the tree. So overall, not sure how generally "useful" this would be.

Alternatively, you could go for "compact" mode on D, or present the children vertically... This would bring, in your specific case, all the nodes more together...

ValeDale avatar Jan 22 '25 18:01 ValeDale