Skip to main content
All docs
V25.1
  • ASPxDiagram.Units Property

    Specifies the measurement unit for size properties.

    Namespace: DevExpress.Web.ASPxDiagram

    Assembly: DevExpress.Web.ASPxDiagram.v25.1.dll

    NuGet Package: DevExpress.Web

    Declaration

    [DefaultValue(DiagramUnit.In)]
    public DiagramUnit Units { get; set; }

    Property Value

    Type Default Description
    DiagramUnit In

    The unit.

    Available values:

    Name Description
    In

    Inch

    Cm

    Centimeter

    Px

    Pixel

    Remarks

    The Units property specifies the unit for measurements in a diagram, for instance, DefaultHeight (custom shape properties), Size (grid properties), or Left (node and edge data-bound settings).

    User interface elements display measurements in ViewUnits.

    <dx:ASPxDiagram ID="Diagram" runat="server" Width="100%" Height="600px" Units="Px"
        NodesDataSourceID="FlowNodesDemoDataSource" EdgesDataSourceID="FlowEdgesDemoDataSource" >
        <Mappings>
            <Node Key="ID" Type="Type" Width="Width" Height="Height" />
            <Edge Key="ID" FromKey="FromID" ToKey="ToID" Text="Text" />
        </Mappings>
    </dx:ASPxDiagram>
    

    Run Demo: Node and Edge Data Sources

    When you export a diagram, the control saves the diagram’s data in its own text format. The resulting JSON object contains measurements in twips, regardless of the Units or ViewUnits property values. Do not modify this JSON object because modified data can load incorrectly.

    See Also