wesnolte / jOrgChart

A jQuery plugin to draw tree-like structures such as OrgCharts.
989 stars 675 forks source link

Export tree to JSON ? and limit child members? #51

Open cbake6807 opened 10 years ago

cbake6807 commented 10 years ago

Is there currently any way to export a chart's structure to JSON? I'd like to allow users to dynamically rearrange their flow, add nodes as desired and have a way to export out the current state into json, while "somehow" maintaining the left/right ordering of child nodes, etc..

Also, is there any way each parent node can restrict the number of child nodes?

I'd like to use this to display an upsell flow of products during an order checkout process. In my application, each main product (respective parent node) would have accept/reject decision based logic to redirect to "the next upsell" based on 2 child nodes assigned under the respective parent. (Product A -> Accepts to Product B, and Rejects to Product C)

I'd need to limit 2 child nodes per parent node, and assign them as an "accept" or "reject" stage of the flow.

This is an awesome application! I look forward to using it in my app. Thanks! Chris

YashSOA commented 10 years ago

Hey, Chris!!

I am looking for the same thing. Do you have any idea how we can accomplish that? I am trying to implement the feature to export the structure to JSON, but no luck!! Appreciate if you have any idea regarding that!!

Thanks & Regards, Yash

selvamani-subramani commented 10 years ago

yeah Here I made jorgchart with json https://github.com/sselvamani22/jOrgChart

YashSOA commented 10 years ago

thanks man!! appreciate it!!