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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding Swimlanes to Palette

Thread ID:

Created:

Updated:

Platform:

Replies:

144069 Apr 16,2019 09:17 PM UTC Apr 18,2019 09:42 AM UTC Angular - EJ 2 3
loading
Tags: Diagram
Gordon Brown
Asked On April 16, 2019 09:17 PM UTC

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

Ramya Thirugnanam [Syncfusion]
Replied On 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  


Gordon Brown
Replied On April 17, 2019 07:43 PM UTC

Ramya:

Working fine now thanks.


Gordon Brown

Ramya Thirugnanam [Syncfusion]
Replied On April 18, 2019 09:42 AM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon