Skip to main content
All docs
V24.1

DxChartAxisStrip.PaddingLeftRight Property

Specifies the padding between the left or right strip edge and its label.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.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

Based on the HorizontalAlignment property value, the PaddingLeftRight property moves the axis strip label to the left or right.

The following example uses spin editors to change paddings for axis strip labels:

<DxChart Data="@DataSource" Width="100%" CustomizeSeriesPoint="@CustomizePoint">
    <DxChartTitle Text="Temperature (high) in September, °F" />
    <DxChartLegend Visible="false" />
    <DxChartSplineSeries ArgumentField="@((TemperatureData s) => s.Date)"
                         ValueField="@((TemperatureData s) => s.Temperature)"
                         Color="@SeriesColor">
        <DxChartSeriesLabel FormatPattern="{value:#}°F" />
    </DxChartSplineSeries>
    <DxChartValueAxis>
        <DxChartAxisStrip StartValue="@HighAverage"
                          Color="rgba(255, 155, 85, 0.15)"
                          PaddingLeftRight="@CurrentPaddingLeftRight"
                          PaddingTopBottom="@CurrentPaddingTopBottom">
            <DxChartAxisStripLabel Text="Above average high"
                                   HorizontalAlignment="ChartStripLabelHorizontalAlignment.Left"
                                   VerticalAlignment="ChartStripLabelVerticalAlignment.Top">
                <DxChartFont Color="@HighAverageColor" Weight="500" Size="14" />
            </DxChartAxisStripLabel>
        </DxChartAxisStrip>
        <DxChartAxisStrip EndValue="LowAverage"
                          Color="rgba(97, 153, 230, 0.1)"
                          PaddingLeftRight="@CurrentPaddingLeftRight"
                          PaddingTopBottom="@CurrentPaddingTopBottom">
            <DxChartAxisStripLabel Text="Below average low"
                                   HorizontalAlignment="ChartStripLabelHorizontalAlignment.Right"
                                   VerticalAlignment="ChartStripLabelVerticalAlignment.Bottom">
                <DxChartFont Color="@LowAverageColor" Weight="500" Size="14" />
            </DxChartAxisStripLabel>
        </DxChartAxisStrip>
    </DxChartValueAxis>
</DxChart>

@code {
    // ...
    double CurrentPaddingLeftRight = 10;
    double CurrentPaddingTopBottom = 10;
}

Chart - Strip label paddings

See Also