blazor-devexpress-dot-blazor-dot-dxchartannotationimage-666bdab1.md
Specifies the annotation image width.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(30)]
[Parameter]
public double Width { get; set; }
| Type | Default | Description |
|---|---|---|
| Double | 30 |
The image width.
|
Set the DxChartAnnotation.Type property to Image to display an image within a chart annotation and use the Width property to specify the image’s 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>
See Also