blazor-devexpress-dot-blazor-67715e49.md
Defines settings for image annotations.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
public class DxChartAnnotationImage :
DxSettingsComponent<ChartAnnotationImageModel>
The Chart component allows you to display images within chart annotations. To enable this functionality, set the DxChartAnnotation.Type property to Image and add a DxChartAnnotationImage object to annotation markup. You can configure the following image settings:
UrlSpecifies the annotation image URL.HeightSpecifies the annotation image height.WidthSpecifies the annotation image width.
The following example configures settings for an image annotation:
<DxChart Data="@DataSource">
@* ... *@
<DxChartLineSeries ValueField="@((ApplePrice i) => i.Close)"
ArgumentField="@((ApplePrice i) => i.Date)"
Name="AAPL" />
<DxChartAnnotation PositionX="150"
PositionY="150"
Type="ChartAnnotationType.Image"
Color="transparent"
PaddingLeftRight="0"
PaddingTopBottom="0">
<DxChartAnnotationImage Url="@StaticAssetUtils.GetImagePath("AppleStock/stock.svg")"
Width="60"
Height="60" />
<DxChartAnnotationBorder Visible="false" />
</DxChartAnnotation>
</DxChart>
Refer to the following section for additional information about annotations: Annotations in Blazor Charts.
Object ComponentBase DxSettingsComponent<DevExpress.Blazor.Internal.ChartAnnotationImageModel> DxChartAnnotationImage
See Also