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

DxChartAnnotationBase<T>.Type Property

Specifies the annotation type.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public ChartAnnotationType Type { get; set; }

#Property Value

Type Description
ChartAnnotationType

An enumeration value.

Available values:

Name Description
Text

Displays text assigned to the DxChartAnnotationBase.Text property.

Image

Displays an image specified by the DxChartAnnotationImage.Url property.

#Remarks

Use the Type property to specify whether the chart displays an image or text string within the annotation.

Chart - Annotation type

The default annotation type is Text. To display a text annotation, assign a text string to the Text property.

razor
<DxChartAnnotation Text="iPhone 14">
    @* ... *@
</DxChartAnnotation>

To create an image annotation, follow the steps below:

  • Set the Type property to Image.
  • Add a DxChartAnnotationImage object to the markup and configure image settings.
razor
<DxChartAnnotation Type="ChartAnnotationType.Image">
    <DxChartAnnotationImage Url="@StaticAssetUtils.GetImagePath("AppleStock/stock.svg")"
                            Width="40"
                            Height="40" />
    @* ... *@
</DxChartAnnotation>

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

See Also