menu

Blazor

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

    Show / Hide Table of Contents

    Class ChartAxisMultiLevelLabelTextStyle

    Options to customize the multilevel label text in a chart axis.

    Inheritance
    System.Object
    ChartSubComponent
    ChartDefaultFont
    ChartAxisMultiLevelLabelTextStyle
    Inherited Members
    ChartDefaultFont.FontFamily
    ChartDefaultFont.FontStyle
    ChartDefaultFont.FontWeight
    ChartDefaultFont.Opacity
    ChartDefaultFont.TextAlignment
    ChartDefaultFont.TextOverflow
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartAxisMultiLevelLabelTextStyle : ChartDefaultFont, ISubcomponentTracker, IChartDefaultFont
    Remarks

    This component offers properties to style the text of multi-level labels, ensuring control over their visual presentation in chart axes.

    Constructors

    ChartAxisMultiLevelLabelTextStyle()

    Declaration
    public ChartAxisMultiLevelLabelTextStyle()

    Properties

    Color

    Gets or sets the color for the multi-level label text.

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

    A string representing the color of the multi-level label text. The default multi-level label text color is determined by the chart's theme. By default, the theme is set to Material with a font color of rgba(97, 97, 97, 1).

    Overrides
    ChartDefaultFont.Color
    Remarks

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

    Examples
    // This example demonstrates how to customize the text color of a multi-level label in the primary X-axis of a Chart.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartMultiLevelLabels>
                <ChartMultiLevelLabel>
                    <ChartAxisMultiLevelLabelTextStyle Color="red" />
                    <ChartCategories>
                        <ChartCategory Start="10" End="40" Text="Half yearly 1" />
                    </ChartCategories>
                </ChartMultiLevelLabel>
            </ChartMultiLevelLabels>
        </ChartPrimaryXAxis>
        <ChartSeriesCollection>
            <ChartSeries DataSource="@Data" XName="XValue" YName="YValue" />
        </ChartSeriesCollection>
    </SfChart>

    Size

    Gets or sets the font size for the multi-level label text.

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

    A string representing the font size of the multi-level label text. The default value is "12px".

    Overrides
    ChartDefaultFont.Size
    Remarks

    This property allows customization of the font size, promoting consistency with the general design of the chart.

    Examples
    // This example demonstrates how to customize the text size of a multi-level label in the primary X-axis of a Chart.
    <SfChart>
        <ChartPrimaryXAxis>
            <ChartMultiLevelLabels>
                <ChartMultiLevelLabel>
                    <ChartAxisMultiLevelLabelTextStyle Size="15px" />
                    <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