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

How I can fix my method to put the label inside the BPMN form?

How I can fix my method to put the label inside the BPMN form?

Because put the label under form and not inside :(


        BPMNNode CreateNodeBPMN(String name, double width, double height, double offsetx, double offsety, string labelText, BPMNShapes type )
        {
            BPMNNode node = new BPMNNode();
            node.Name = name;
            node.Width = width;
            node.Height = height;
            node.OffsetX = offsetx;
            node.OffsetY = offsety;
            node.FillColor = "#BDBDB";
            node.BorderColor = "#BDBDB";
            Syncfusion.JavaScript.DataVisualization.Models.Diagram.Label label = new Syncfusion.JavaScript.DataVisualization.Models.Diagram.Label();

            label.Text = labelText;
            label.Mode = LabelEditMode.View;
            label.ReadOnly = true;
            label.FontColor = "#000000";
            label.Name = name + "_label";

            label.FontSize = 12;

            label.VerticalAlignment = Syncfusion.JavaScript.DataVisualization.DiagramEnums.VerticalAlignment.Center;
            label.HorizontalAlignment = Syncfusion.JavaScript.DataVisualization.DiagramEnums.HorizontalAlignment.Center;
            node.Labels.Add(label);

            node.Shape = type;


            return node;
        }

3 Replies

SG Shyam G Syncfusion Team July 6, 2015 12:56 PM UTC

Hi Scarymorfeo,

Thanks for using Syncfusion products.

Currently we don’t have option to set the label inside the bpmn shape. We have already logged “Issue in labels positioning for the BPMN shape” as a defect. The fix for this issue is estimated to be available in Volume 2 release, which is scheduled to release in the second week of July, 2015.

Please let us know if you require further assistance on this.

Regards,
Shyam G


MA maysa replied to Shyam G October 26, 2017 12:00 PM UTC

Hi Scarymorfeo,

Thanks for using Syncfusion products.

Currently we don’t have option to set the label inside the bpmn shape. We have already logged “Issue in labels positioning for the BPMN shape” as a defect. The fix for this issue is estimated to be available in Volume 2 release, which is scheduled to release in the second week of July, 2015.

Please let us know if you require further assistance on this.

Regards,
Shyam G

Hello, is it possible to put the label inside the BPMN form, if so, how should I do it? 
Thank you


SG Shyam G Syncfusion Team October 27, 2017 04:12 AM UTC

Hi Maysa, 
 
Please refer to the code example below in which we have shown how to create a label for the BPMN node. 
 
Code example: 
           DiagramProperties model = new DiagramProperties(); 
           BPMNNode node = new BPMNNode(); 
            node.Name = "BPMN";          
            node.Width = 200; 
            node.Height = 200; 
            node.OffsetX = 200; 
            node.OffsetY = 200; 
            //Sets the type of BPMN shape 
            node.Shape = BPMNShapes.Event; 
            //Sets type of the Event 
            node.Event = BPMNEvents.End; 
            Label label = new Label(); 
            //set an label for BPMN shape 
            label.Text = "BPMN Node"; 
            //position the label using offset property 
            label.Offset = new DiagramPoint() {X=0.2f, Y = 0.5f }; 
            node.Labels.Add(label); 
            //add node into model nodes collection 
      model.Nodes.Add(node); 
 
Please refer to the help documentation for more details 
 
 
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon