Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ChartAnnotationType Enum

Lists annotation types.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public enum ChartAnnotationType

#Members

Name Description
Text

Displays text assigned to the DxChartAnnotationBase.Text property.

Image

Displays an image specified by the DxChartAnnotationImage.Url property.

#Related API Members

The following properties accept/return ChartAnnotationType values:

#Remarks

Use the DxChartAnnotation.Type property to specify whether the chart component displays text or image content within the corresponding annotation.

Based on the specified annotation type, assign a text string to the DxChartAnnotation.Text property or add a DxChartAnnotationImage object and configure image settings.

Chart - Annotation type

razor
<DxChart Data="@DataSource">
    @* ... *@
    <DxChartLineSeries ValueField="@((ApplePrice i) => i.Close)"
                       ArgumentField="@((ApplePrice i) => i.Date)"
                       Name="AAPL" />
    @* ... *@
    <DxChartAnnotation Text="iPhone 14"
                       Argument="new DateTime(2022, 9, 7)"
                       Series="AAPL"
                       VerticalOffset="60">
            @* ... *@
    </DxChartAnnotation>
    <DxChartAnnotation Type="ChartAnnotationType.Image"
                       PositionX="150"
                       PositionY="150"
                       PaddingLeftRight="0"
                       PaddingTopBottom="0">
        <DxChartAnnotationImage Url="@StaticAssetUtils.GetImagePath("AppleStock/stock.svg")"
                                Width="60"
                                Height="60" />
    </DxChartAnnotation>
</DxChart>
See Also