alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ChartAxisMultiLevelLabelTextStyle

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

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ChartSubComponent
    ChartDefaultFont
    ChartAxisMultiLevelLabelTextStyle
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ChartDefaultFont.FontFamily
    ChartDefaultFont.FontStyle
    ChartDefaultFont.FontWeight
    ChartDefaultFont.Opacity
    ChartDefaultFont.TextAlignment
    ChartDefaultFont.TextOverflow
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.Dispose(bool)
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartAxisMultiLevelLabelTextStyle : ChartDefaultFont, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    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
    [Parameter]
    public override string Color { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    public override string Size { get; set; }
    Property Value
    Type Description
    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>

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved