Back to Devexpress

DxChartAxisStripLabel Class

blazor-devexpress-dot-blazor-96e7f8fa.md

latest3.6 KB
Original Source

DxChartAxisStripLabel Class

Defines a strip label.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class DxChartAxisStripLabel :
    DxComplexSettingsComponent<DxChartAxisStripLabel, ChartAxisStripLabelModel>,
    IModelProvider<ChartFontModel>

Remarks

The DxChartAxisStripLabel component allows you to show and configure labels for DxChartAxisStrip objects.

To create an axis strip label, add a DxChartAxisStripLabel object to strip markup and use the Text property to specify the label’s text. To customize the label’s font settings, add a DxChartFont object to label markup.

razor
<DxChart Data="@DataSource" Width="100%">
    @* ... *@
    <DxChartValueAxis>
        <DxChartAxisStrip StartValue="@HighAverage"
                          Color="rgba(255, 155, 85, 0.15)">
            <DxChartAxisStripLabel Text="Above average high">
                <DxChartFont Color="@HighAverageColor" Weight="500" Size="14"/>
            </DxChartAxisStripLabel>
        </DxChartAxisStrip>
        <DxChartAxisStrip EndValue="LowAverage"
                          Color="rgba(97, 153, 230, 0.1)">
            <DxChartAxisStripLabel Text="Below average low">
                <DxChartFont Color="@LowAverageColor" Weight="500" Size="14" />
            </DxChartAxisStripLabel>
        </DxChartAxisStrip>
    </DxChartValueAxis>
</DxChart>

@code {
    // ...
    double HighAverage = 60.8;
    double LowAverage = 53;
    string HighAverageColor = "#ff9b52";
    string LowAverageColor = "#6199e6";
}

You can also customize the label’s position. The following options are available:

HorizontalAlignmentSpecifies the horizontal alignment for the axis strip label.VerticalAlignmentSpecifies the vertical alignment for the axis strip label.PaddingLeftRightSpecifies the padding between the left or right strip edge and its label.PaddingTopBottomSpecifies the padding between the top or bottom strip edge and its label.

Implements

IComponent

IHandleEvent

IHandleAfterRender

IDisposable

Inheritance

Object ComponentBase DxSettingsComponent<DevExpress.Blazor.Internal.ChartAxisStripLabelModel> DxComplexSettingsComponent<DxChartAxisStripLabel, DevExpress.Blazor.Internal.ChartAxisStripLabelModel> DxChartAxisStripLabel

See Also

DxChartAxisStripLabel Members

DevExpress.Blazor Namespace