Back to Devexpress

DxChartAnnotationImage.Width Property

blazor-devexpress-dot-blazor-dot-dxchartannotationimage-666bdab1.md

latest1.9 KB
Original Source

DxChartAnnotationImage.Width Property

Specifies the annotation image width.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(30)]
[Parameter]
public double Width { get; set; }

Property Value

TypeDefaultDescription
Double30

The image width.

|

Remarks

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:

razor
<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

DxChartAnnotationImage Class

DxChartAnnotationImage Members

DevExpress.Blazor Namespace