Skip to main content
All docs
V25.1
  • DxChartAnnotationBase<T>.PaddingLeftRight Property

    Specifies the padding between the left or right annotation edge and its content.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(10)]
    [Parameter]
    public double PaddingLeftRight { get; set; }

    Property Value

    Type Default Description
    Double 10

    The padding in pixels.

    Remarks

    Use the PaddingLeftRight or PaddingTopBottom property to add or remove empty space around annotation content (an image or text string).

    The following code snippet removes paddings between the annotation’s edges and its image content:

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

    Chart - Image annotation

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

    See Also