Skip to main content
All docs
V24.1

DxChartAnnotationBase<T>.VerticalOffset Property

Specifies the annotation’s vertical offset.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public double VerticalOffset { get; set; }

Property Value

Type Description
Double

The offset in pixels.

Remarks

The VerticalOffset property value shifts the annotation vertically from its initial position. A positive value shifts an annotation down, a negative value shifts it up.

The following example shifts the annotation horizontally or vertically based on the values of spin editors:

<DxChart Data="@DataSource">
    @* ... *@
    <DxChartLineSeries ValueField="@((ApplePrice i) => i.Close)"
                       ArgumentField="@((ApplePrice i) => i.Date)"
                       Name="AAPL" />
    <DxChartAnnotation Argument="new DateTime(2021, 4, 20)"
                       Series="AAPL"
                       Text="Fifth generation of iPad Pro"
                       HorizontalOffset="@CurrentHorizontalOffset"
                       VerticalOffset="@CurrentVerticalOffset" />
</DxChart>

@code {
    double CurrentHorizontalOffset = 0;
    double CurrentVerticalOffset = 0;
    // ...
}

Chart - Annotation offset

Refer to the following section for more information about annotations: Annotations in Blazor Charts.

See Also