Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V24.1

DxChartAnnotationBase<T>.AllowDrag Property

Specifies whether users can drag the annotation.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

[DefaultValue(false)]
[Parameter]
public bool AllowDrag { get; set; }

Property Value

Type Default Description
Boolean false

true to allow users to drag the annotation; otherwise, false.

Remarks

Set the AllowDrag property to true to allow users to drag the annotation to a new position.

<DxChart Data="@DataSource">
    @* ... *@
    <DxChartLineSeries ValueField="@((ApplePrice i) => i.Close)"
                       ArgumentField="@((ApplePrice i) => i.Date)"
                       Name="AAPL" />
    <DxChartAnnotation PositionX="150"
                       PositionY="150"
                       Type="ChartAnnotationType.Image"
                       AllowDrag="true"
                       TooltipText="Drag me"
                       Color="transparent"
                       PaddingLeftRight="0"
                       PaddingTopBottom="0">
        <DxChartAnnotationImage Url="@StaticAssetUtils.GetImagePath("AppleStock/stock.svg")"
                                Width="60"
                                Height="60" />
        <DxChartAnnotationBorder Visible="false" />
    </DxChartAnnotation>
</DxChart>

Chart - Image annotation

Refer to the DxChartAnnotationBase topic for more information about chart annotations.

See Also