Back to Devexpress

ChartAnnotationType Enum

blazor-devexpress-dot-blazor-222557ba.md

latest2.3 KB
Original Source

ChartAnnotationType Enum

Lists annotation types.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public enum ChartAnnotationType

Members

NameDescription
Text

Displays text assigned to the DxChartAnnotationBase.Text property.

| | Image |

Displays an image specified by the DxChartAnnotationImage.Url property.

|

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.

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

DevExpress.Blazor Namespace