Skip to content

Commit a27c305

Browse files
Diagram: add a note about overriding shape settings (DevExpress#6916) (DevExpress#6918)
1 parent e7ccf98 commit a27c305

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

concepts/05 UI Components/Diagram/10 Data Binding/40 Optional Binding Expressions.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
The Diagram allows you to bind a number of shape and connector visual properties, like type, size, and style.
1+
The Diagram allows you to bind a number of shape and connector visual properties, like type, size, and style.
22

3-
[note] If a binding property is undefined, the corresponding shape or connector property value is maintained inside the loaded Diagram UI component and is lost after a page is reloaded.
4-
53
![Diagram - Data Binding Options](/images/diagram/binding-options.png)
64

5+
The following node properties are available:
6+
77
<table class="dx-table">
88
<tr>
99
<th>Node property</th>
@@ -81,7 +81,7 @@ The Diagram allows you to bind a number of shape and connector visual properties
8181
</tr>
8282
</table>
8383

84-
[note] If you bind a Diagram to a [linear](/concepts/05%20UI%20Components/Diagram/10%20Data%20Binding/20%20Linear%20Array.md '/Documentation/Guide/UI_Components/Diagram/Data_Binding/#Linear_Array') or [hierarchical array](/concepts/05%20UI%20Components/Diagram/10%20Data%20Binding/30%20Hierarchical%20Array.md '/Documentation/Guide/UI_Components/Diagram/Data_Binding/#Hierarchical_Array'), edge binding properties are not in effect, because connectors are not bound to specific edges. This is why the storage of connector styles in a data source is not supported.
84+
The following node properties are available:
8585

8686
<table class="dx-table">
8787
<tr>
@@ -160,6 +160,16 @@ The Diagram allows you to bind a number of shape and connector visual properties
160160
</tr>
161161
</table>
162162

163+
[note]
164+
165+
- If a binding property is undefined, the corresponding shape or connector property value is maintained inside the loaded Diagram UI component and is lost after a page is reloaded.
166+
167+
- Diagram [nodes](/Documentation/ApiReference/UI_Components/dxDiagram/Configuration/nodes/) and shapes ([default](/Documentation/Guide/UI_Components/Diagram/Shape_Types/) and [custom](/Documentation/ApiReference/UI_Components/dxDiagram/Configuration/customShapes/)) are linked. Initially, you can set all shape properties with [defaultItemProperties](/ApiReference/UI_Components/dxDiagram/Configuration/defaultItemProperties/) or within a [customShapes](/Documentation/ApiReference/UI_Components/dxDiagram/Configuration/customShapes/) array. When a shape is placed on a canvas, these properties merge with the **nodes'** default settings or callbacks that end with **Expr** (for instance, [typeExpr](/Documentation/ApiReference/UI_Components/dxDiagram/Configuration/nodes/#typeExpr)). Use these callbacks to override the default shape settings.
168+
169+
- If you bind a Diagram to a [linear](/concepts/05%20UI%20Components/Diagram/10%20Data%20Binding/20%20Linear%20Array.md '/Documentation/Guide/UI_Components/Diagram/Data_Binding/#Linear_Array') or [hierarchical array](/concepts/05%20UI%20Components/Diagram/10%20Data%20Binding/30%20Hierarchical%20Array.md '/Documentation/Guide/UI_Components/Diagram/Data_Binding/#Hierarchical_Array'), edge binding properties are not in effect, because connectors are not bound to specific edges. This is why the storage of connector styles in a data source is not supported.
170+
171+
[/note]
172+
163173
You can set a binding property to the name of a data source field that supplies item values, or to an expression that returns a constant value or calculates a value in runtime based on conditions.
164174

165175
If your diagram includes container shapes, define the [containerKeyExpr](/api-reference/10%20UI%20Components/dxDiagram/1%20Configuration/nodes/containerKeyExpr.md '/Documentation/ApiReference/UI_Components/dxDiagram/Configuration/nodes/#containerKeyExpr') property to store information about a parent container in the data source. Otherwise, this information will be lost.

0 commit comments

Comments
 (0)