- Home
- Forum
- ASP.NET MVC
- 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?
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;
}
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;
}
SIGN IN To post a reply.
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
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
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
Help documentation: https://help.syncfusion.com/aspnetmvc/diagram/label?cs-save-lang=1&cs-lang=csharp#create-label
Regards,
Shyam G
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
SC scarymorfeo
- Jul 3, 2015 05:29 PM UTC
- Oct 27, 2017 04:12 AM UTC