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

How to dynamically add start node to diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

147577 Sep 17,2019 07:28 AM UTC Sep 18,2019 04:48 AM UTC Angular - EJ 2 1
loading
Tags: Diagram
Charlie BengerStevenson
Asked On September 17, 2019 07:28 AM UTC

I am utilising the trial period so still very green, so apologies in advance for the rookie question. Also I am not getting answers to my support tickets so am trying out the forum to see if this is the best route to getting resolutions to issues in a reasonable timeframe that allows me to perform my evaluation of your product within the trial period.

This code works :

this.diagram.addNode( {
        shape: { type: 'Text'content: 'Basic Shapes' },
        style: { fontSize: 16fill: 'None'fontFamily: 'sans-serif'bold: truestrokeWidth: 0 },
        offsetX: 300,
        offsetY: 300
      });

This code doesn't work, and doesn't give any errors :

this.diagram.addNode( {
        shape: { type: 'Bpmn'shape: 'Event',
        event: {
            event: 'Start',
            trigger: 'None'
          }
        },
        offsetX: 200,
        offsetY: 200
      });

What am I doing wrong?


Shyam G [Syncfusion]
Replied On September 18, 2019 04:48 AM UTC

Hi Charlie, 

We should inject BpmnDiagrams module to render a BPMN Node in the diagram. Please refer to a code example below. 

Code example:  
App.component.ts 
 
import { 
    BpmnDiagrams 
} from '@syncfusion/ej2-diagrams'; 
 
Diagram.Inject(BpmnDiagrams); 

Please refer to the help documentation below that shows the list of diagram features module you can inject it in your application. 
 
 
Here is an sample with your code 
 
 

Regards, 
Shyam G 


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