We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Adding Swimlanes to Palette

Trying to add Swimlanes to a palette using angular with EJ2. Not having any success. Below is my latest attempt. This is a bit of guess as I haven't been able to find any examples of this in Angular.  Not sure
     - which properties
     - how to set these properties

export function getSwimLaneShapes(): NodeModel[] {
     const swimLaneShapes: NodeModel[] = [
          {
               id: 'Horivontal SwimLane', shape: { type: 'SwimLane', shape: 'stackCanvas1' }
          },
          {
               id: 'Vertical SwimLane', shape: {type: 'SwimLane', shape: 'stackCanvas2' }
          }
     ]
}

Thanks,


Gordon Brown

3 Replies

RT Ramya Thirugnanam Syncfusion Team April 17, 2019 06:37 AM UTC

Hi Gordon,  
 
In your sample, you have not set lanes collection, orientation and isLane property inside a shape object, width and height. So that, the swimlane is not rendered in palette. We have modified your code example and provided below.  
 
Code example:  
  const swimLaneShapes: NodeModel[] = [  
          {  
               id: 'Horivontal SwimLane', shape: { type: 'SwimLane', lanes: [  
                        {  
                            id: 'lane1',  
                            style: { strokeColor: 'black' }, height: 60, width: 150,  
                            header: { width: 50, height: 50, style: { strokeColor: 'black', fontSize: 11 } },  
                        }  
                    ], orientation: 'Horizontal', isLane: true}, width:140, height:60  
          },  
          {  
               id: 'Vertical SwimLane', shape: {type: 'SwimLane', lanes: [  
                        {  
                            id: 'lane1',  
                            style: { strokeColor: 'black' }, height: 60, width: 150,  
                            header: { width: 50, height: 50, style: { strokeColor: 'black', fontSize: 11 } },  
                        }  
                    ], orientation: 'Horizontal', isLane: true  
             }, width:60, height:140  
          }  
     ]  
 
 
 
Here is the sample in which we have shown how to add swimlane and phase to the palette.  
 
Please find the help documentation below which shows how to add swimlane to the palette.  
 
Here is the online angular sample  
 
Regards,  
Ramya T  



GB Gordon Brown April 17, 2019 07:43 PM UTC

Ramya:

Working fine now thanks.


Gordon Brown


RT Ramya Thirugnanam Syncfusion Team April 18, 2019 09:42 AM UTC

Hi Gordon,   
 
Thanks for your update. 
 
Regards, 
Ramya T 


Loader.
Live Chat Icon For mobile
Up arrow icon