Closed kosirm closed 11 months ago
Hi, I'd suggest taking a look at installing section to understand how the library works and what/how you can customize/get/modify
https://github.com/bumbeishvili/org-chart?tab=readme-ov-file#installing
In your case,
chart.layout('top') // this sets the layout
chart.layout() // this gets the current layout
Perfect, thank you!
Hi, I just discovered this library and I'm amazed with quality and usefulness of this library! It is the best Christmas present for me this year :) Thank you so much for sharing this code!
I would like to make a few visual changes regarding the direction of the chart. I found this nice function which rotates the chart:
onclick='chart.layout(["right","bottom","left","top"][index++%4]).render().fit()
but I don't know how can I get direction programatically... If I try to see direction withconsole.log("Direction:"+JSON.stringify(chart.layout(["top"])))
I expected true/false, but I get empty object:Direction:{}
Thanks for any hint.
Merry Christmas and Happy New Year 2024!