Back to Devexpress

DxChartAnnotationImage Class

blazor-devexpress-dot-blazor-67715e49.md

latest3.0 KB
Original Source

DxChartAnnotationImage Class

Defines settings for image annotations.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxChartAnnotationImage :
    DxSettingsComponent<ChartAnnotationImageModel>

Remarks

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:

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>

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

Implements

IComponent

IHandleEvent

IHandleAfterRender

IDisposable

Inheritance

Object ComponentBase DxSettingsComponent<DevExpress.Blazor.Internal.ChartAnnotationImageModel> DxChartAnnotationImage

See Also

DxChartAnnotationImage Members

DevExpress.Blazor Namespace