menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartAxisMultiLevelLabelBorder - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartAxisMultiLevelLabelBorder

    Provides the options to customize the multilevel label border for a chart axis, including color, border type, and width.

    Inheritance
    System.Object
    ChartSubComponent
    ChartAxisMultiLevelLabelBorder
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartAxisMultiLevelLabelBorder : ChartSubComponent, ISubcomponentTracker

    Constructors

    ChartAxisMultiLevelLabelBorder()

    Declaration
    public ChartAxisMultiLevelLabelBorder()

    Properties

    Color

    Gets or sets the color of the multi-level labels border.

    Declaration
    public string Color { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the color of the multi-level labels border. The default multi-level label border color is determined by the chart's theme. By default, the theme is set to Material with a font color of #b5b5b5. The default value is an empty string.

    Remarks

    Use valid hex or rgba CSS color strings for the color value.

    Examples
    // This example demonstrates how to apply a colored border to a multi-level label on the X-axis.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartMultiLevelLabels>
                <ChartMultiLevelLabel>
                    <ChartAxisMultiLevelLabelBorder Color="blue" />
                    <ChartCategories>
                        <ChartCategory Start="10" End="40" Text="Half yearly 1" />
                    </ChartCategories>
                </ChartMultiLevelLabel>
            </ChartMultiLevelLabels>
        </ChartPrimaryXAxis>
        <ChartSeriesCollection>
            <ChartSeries DataSource="@Data" XName="XValue" YName="YValue" />
        </ChartSeriesCollection>
    </SfChart>

    Type

    Gets or sets the border type for multi-level labels.

    Declaration
    public BorderType Type { get; set; }
    Property Value
    Type Description
    BorderType

    One of the BorderType enumerations that specifies the border type for multi-level labels. The options include:

    • Rectangle - Renders the border in a rectangular shape around the label.
    • WithoutTopBorder - Renders the border without the top edge around the label.
    • WithoutTopandBottomBorder - Renders the border without both top and bottom edges around the label.
    • WithoutBorder - Renders the label without any border.
    • Brace - Renders the border with a brace-like shape around the label.
    • CurlyBrace - Renders the border with a curly brace-like shape around the label.
      The default value is BorderType.Rectangle.
    Remarks

    This property determines the style of the border around multi-level labels.

    Examples
    // This example demonstrates how to apply a curly brace border to a multi-level label on the X-axis
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartMultiLevelLabels>
                <ChartMultiLevelLabel>
                    <ChartAxisMultiLevelLabelBorder Type="BorderType.CurlyBrace" />
                    <ChartCategories>
                        <ChartCategory Start="10" End="40" Text="Half yearly 1" />
                    </ChartCategories>
                </ChartMultiLevelLabel>
            </ChartMultiLevelLabels>
        </ChartPrimaryXAxis>
        <ChartSeriesCollection>
            <ChartSeries DataSource="@Data" XName="XValue" YName="YValue" />
        </ChartSeriesCollection>
    </SfChart>

    Width

    Gets or sets the width of the multi-level labels border in pixels.

    Declaration
    public double Width { get; set; }
    Property Value
    Type Description
    System.Double

    The width of the border in pixels. The default value is 1.

    Remarks

    This property specifies the thickness of the border.

    Examples
    // This example demonstrates how to set the border width for a multi-level label on the X-axis.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartMultiLevelLabels>
                <ChartMultiLevelLabel>
                    <ChartAxisMultiLevelLabelBorder Width="3" />
                    <ChartCategories>
                        <ChartCategory Start="10" End="40" Text="Half yearly 1" />
                    </ChartCategories>
                </ChartMultiLevelLabel>
            </ChartMultiLevelLabels>
        </ChartPrimaryXAxis>
        <ChartSeriesCollection>
            <ChartSeries DataSource="@Data" XName="XValue" YName="YValue" />
        </ChartSeriesCollection>
    </SfChart>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved