Add multiple parentID or multiple childID to diagram

Hi, i'm trying to implement multiple parentID in a diagram (Mind map layout or Organizational Chart) in an Angular project, unfortunately I haven't found this in the documentation.  

I'm trying to implemente something like this: 


3 Replies

AR Aravind Ravi Syncfusion Team April 27, 2020 05:11 AM UTC

Hi Brandon, 
 
We have prepared a sample to show multiple parents for a child in the diagram. In diagram, by using ComplexHierarchicalTree layout we can define the multiple parents to the child in the diagram. If you want to use a Complex hierarchical layout in the diagram, you need to inject ComplexHierarchicalTree in the diagram. Please find below the code snippet for how to define the ComplexHierarchicalTree layout in the diagram. 
 
Diagram.Inject(ComplexHierarchicalTree); 
 
public layout: LayoutModel = { 
        type: 'ComplexHierarchicalTree', 
        horizontalSpacing: 40, verticalSpacing: 40, orientation: 'TopToBottom', 
        margin: { left: 10, right: 0, top: 50, bottom: 0 } 
    }; 
 
Please find the sample in below link 
 
 
For more information about layout please refer to below UG documentation link 
 
 
 
Regards 
Aravind Ravi 
 



AN Alison Niu March 2, 2022 03:27 AM UTC

where is the data? can I see the data?  do you use like parentId: "id1,id2"?




AM Arunkumar Manoharan Syncfusion Team March 3, 2022 06:00 PM UTC

Hi Alison,


We have JSON in a separate file diagram-data.json and by using that Json, we render the layout in the diagram. We have created a layout sample for your reference and provided the sample link below.


Sample link: https://stackblitz.com/edit/angular-8pcsur-3udzmf?file=app.component.ts


Regards,

Arun Kumar.


Loader.
Up arrow icon