You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/diagram/annotations/connector-annotation.md
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
2
layout: post
3
3
title: Connector Annotation Position in Blazor Diagram | Syncfusion
4
-
description: Checkout and learn here all about Annotation for Connector in Syncfusion Blazor Diagram component and more.
4
+
description: Checkout and Learn how to position and align annotations on connectors in the Syncfusion Blazor Diagram component and much more details.
5
5
platform: Blazor
6
6
control: Diagram Component
7
7
documentation: ug
8
8
---
9
9
10
10
# Connector Annotation Position in Blazor Diagram
11
11
12
-
Annotations of a connector can be positioned using the following properties of Annotation class.
12
+
Connector annotations can be precisely positioned using several properties of the `PathAnnotation`class, including:
13
13
14
14
* Offset
15
15
* Alignment
@@ -21,7 +21,7 @@ Annotations of a connector can be positioned using the following properties of A
21
21
22
22
## How to Update Offset Position for Annotations
23
23
24
-
The [Offset](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.PathAnnotation.html#Syncfusion_Blazor_Diagram_PathAnnotation_Offset) property of an annotation is used to align the annotations based on fractions. A value of 0 represents Top-Left corner, 1 represents Bottom-Right corner, and 0.5 represents half of Width/Height.
24
+
The [Offset](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.PathAnnotation.html#Syncfusion_Blazor_Diagram_PathAnnotation_Offset) property positions an annotation along the length of the connector segment. It accepts a fractional value from **0** to **1**, where **0**represents the beginning of the segment, **1** represents the end, and **0.5** represents the center.
25
25
26
26
```cshtml
27
27
@using Syncfusion.Blazor.Diagram
@@ -68,19 +68,21 @@ The [Offset](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Pat
68
68
}
69
69
}
70
70
```
71
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/UpdateOffsetofAnnotation)
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/UpdateOffsetofAnnotation)
72
74
73
75
The following image shows the relationship between the annotation position and offset (fraction values).
74
76
75
77

76
78
77
79
>**Note:**
78
-
> * By default, offset value of the connector annotation is 0.5.
79
-
> *Connector annotation's Id should not start with numbers or special characters and should not contain special characters such as underscores(_) or spaces.
80
+
> * By default, the `offset` value of a connector annotation is 0.5.
81
+
> *An annotation's ID must not start with a number or special character and must not contain underscores(_) or spaces.
80
82
81
83
## How to Change Annotation Alignment
82
84
83
-
The connector’s annotation can be aligned over its segment path using the [Alignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.PathAnnotation.html#Syncfusion_Blazor_Diagram_PathAnnotation_Alignment) property of the annotation.
85
+
The [Alignment](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.PathAnnotation.html#Syncfusion_Blazor_Diagram_PathAnnotation_Alignment) property aligns an annotation relative to the connector's path.
84
86
85
87
```cshtml
86
88
@using Syncfusion.Blazor.Diagram
@@ -121,7 +123,9 @@ The connector’s annotation can be aligned over its segment path using the [Ali
121
123
}
122
124
}
123
125
```
124
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/AlignmentOfAnnotation)
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/AlignmentOfAnnotation)
125
129
126
130
The following screenshot shows how the annotation of the connector aligned over its path.
127
131
@@ -131,7 +135,7 @@ N> By default, Alignment value of the connector annotation is `Center`.
131
135
132
136
## How to Change Annotation Displacement
133
137
134
-
The [Displacement](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.PathAnnotation.html#Syncfusion_Blazor_Diagram_PathAnnotation_Displacement) property is used to dislocate the annotation by the value given. By default, annotation will be in centered on the connector path. When you assign a value to the Displacement property, the annotation will be displaced from its position by displacement value.
138
+
The [Displacement](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.PathAnnotation.html#Syncfusion_Blazor_Diagram_PathAnnotation_Displacement) property moves an annotation from its default position along the connector path. By default, annotation will be in centered on the connector path. It accepts a DiagramPoint object that specifies the horizontal (X) and vertical (Y) distance to move the annotation.
135
139
136
140
```cshtml
137
141
@using Syncfusion.Blazor.Diagram
@@ -171,7 +175,9 @@ The [Displacement](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagr
171
175
}
172
176
}
173
177
```
174
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/DisplacementOfAnnotation)
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/DisplacementOfAnnotation)
175
181
176
182
## How to Update Annotation Segment Angle
177
183
@@ -213,20 +219,22 @@ The following code example shows how the connector annotation rotated in its pat
213
219
}
214
220
}
215
221
```
216
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/SegmentAngleOfAnnotation)
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/AnnotationOfConnector/SegmentAngleOfAnnotation)
217
225
218
226
| SegmentAngle | Output |
219
227
|---|---|
220
228
| True ||
221
229
| False ||
222
230
223
-
N> By default, the SegmentAngle will be disabled.
231
+
N> By default, the `SegmentAngle` property is **false**.
224
232
225
233
The `HorizontalAlignment`, `VerticalAlignment` and `Margin` properties were explained in the [NodeAnnotation](./node-annotation).
226
234
227
235
## See also
228
236
229
-
*[How to add annotation for Node](./node-annotation)
237
+
*[How to add an annotation for a Node](./node-annotation)
230
238
231
239
*[How to add or remove annotation constraints](../constraints#annotation-constraints)
|[TextChanged](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_TextChanged)|[TextChangeEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.TextChangeEventArgs.html)|Triggers when the node’s/connector's label is changed in the diagram.|
20
-
|[TextChanging](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_TextChanging)|[TextChangeEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.TextChangeEventArgs.html)|An event that is raised when the node and connector's label is changing in the diagram.|
19
+
|[TextChanged](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_TextChanged)|[TextChangeEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.TextChangeEventArgs.html)|Triggers after a node or connector's annotation text has been changed in the diagram.|
20
+
|[TextChanging](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_TextChanging)|[TextChangeEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.TextChangeEventArgs.html)|An event that is raised when the node and connector's annotation text is changing in the diagram.|
21
21
22
-
The following code example shows how to register and get notifications from the TextChanged and TextChanging events.
22
+
The following code example shows how to register and get notifications from the `TextChanged` and `TextChanging` events.
23
23
24
24
```cshtml
25
25
@using Syncfusion.Blazor.Diagram
@@ -61,14 +61,16 @@ The following code example shows how to register and get notifications from the
61
61
}
62
62
}
63
63
```
64
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/Events/TextChangedEvent)
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/Events/TextChangedEvent)
65
67
66
68
## See also
67
69
68
70
*[How to add or remove annotation constraints](../constraints#annotation-constraints)
69
71
70
72
*[How to customize the annotation](./appearance)
71
73
72
-
*[How to add annotation for Node](./node-annotation)
74
+
*[How to add an annotation for a Node](./node-annotation)
73
75
74
-
*[How to add annotation for Connector](./connector-annotation)
76
+
*[How to add an annotation for a Connector](./connector-annotation)
Copy file name to clipboardExpand all lines: blazor/diagram/annotations/interactions.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
layout: post
3
3
title: Annotation Interaction in Blazor Diagram Component | Syncfusion
4
-
description: Checkout and learn here all about Interaction in Syncfusion Blazor Diagram component and much more details.
4
+
description: Checkout and Learn how to interact with annotations in the Syncfusion Blazor Diagram component and much more details.
5
5
platform: Blazor
6
6
control: Diagram Component
7
7
documentation: ug
@@ -12,7 +12,7 @@ documentation: ug
12
12
Diagram provides the support to the annotations rotation interactively.
13
13
14
14
## How to Rotate Annotations
15
-
The [RotationReference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ShapeAnnotation.html#Syncfusion_Blazor_Diagram_ShapeAnnotation_RotationReference) property of an annotation allows you to control whether the text should rotate relative to its parent node or the Page. The following code examples illustrate how to configure RotationReference for an annotation.
15
+
The [RotationReference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.ShapeAnnotation.html#Syncfusion_Blazor_Diagram_ShapeAnnotation_RotationReference) property of an annotation allows you to control whether the text should rotate relative to its parent node or the Page. The following code examples illustrate how to configure `RotationReference` for an annotation.
16
16
17
17
18
18
```cshtml
@@ -67,21 +67,21 @@ The [RotationReference](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.
| Page | When this option is set, the annotation remains fixed in its original orientation even if its parent node is rotated. ||
75
-
| Parent |In this case, the annotation rotates along with its parent node. ||
74
+
|**Page**| When this option is set, the annotation remains fixed in its original orientation even if its parent node is rotated. ||
75
+
|**Parent**|When this option is set, the annotation rotates along with its parent node. ||
76
76
77
77
78
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/Interactions/RotationReference)
78
+
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/Interactions/RotationReference)
79
79
80
80
## How to rotate a Annotation using the RotationAngle property
81
81
82
-
The [RotationAngle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Annotation.html#Syncfusion_Blazor_Diagram_Annotation_RotationAngle)property for an annotation gets or sets the rotation angle in degrees. This determines how much the annotation text is tilted from its normal position. The default value is 0.
82
+
The [RotationAngle](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.Annotation.html#Syncfusion_Blazor_Diagram_Annotation_RotationAngle) property sets the rotation angle of an annotation in degrees. This determines how much the annotation text is tilted from its normal position. The default value is **0**.
83
83
84
-
The following code examples illustrate how to configure RotationAngle for an annotation.
84
+
The following code examples illustrate how to configure `RotationAngle` for an annotation.
85
85
86
86
```cshtml
87
87
@using Syncfusion.Blazor.Diagram
@@ -112,16 +112,18 @@ The following code examples illustrate how to configure RotationAngle for an ann
112
112
}
113
113
}
114
114
```
115
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/RotationAngleProperty)
A complete working sample can be downloaded from [GitHub](https://github.com/SyncfusionExamples/Blazor-Diagram-Examples/tree/master/UG-Samples/Annotations/RotationAngleProperty)
116
118
117
119

118
120
119
121
## See also
120
122
121
123
*[How to add or remove annotation constraints](../constraints#annotation-constraints)
122
124
123
-
*[How to add annotation for Node](./node-annotation)
125
+
*[How to add an annotation for a Node](./node-annotation)
124
126
125
-
*[How to add annotation for Connector](./connector-annotation)
127
+
*[How to add an annotation for a Connector](./connector-annotation)
126
128
127
129
*[How to animate connectors using annotationtemplate in angular diagram](https://support.syncfusion.com/kb/article/20265/how-to-animate-connectors-using-annotationtemplate-in-angular-diagram )
0 commit comments