alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ChartStackLabelFont

    Provides options to customize the appearance of the stack label, including font size, color, style, weight, and font family.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ChartSubComponent
    ChartDefaultFont
    ChartStackLabelFont
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ChartDefaultFont.FontStyle
    ChartDefaultFont.Opacity
    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 ChartStackLabelFont : ChartDefaultFont, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    ChartStackLabelFont()

    Declaration
    public ChartStackLabelFont()

    Properties

    Color

    Gets or sets the color of the stack label.

    Declaration
    [Parameter]
    public override string Color { get; set; }
    Property Value
    Type Description
    string

    A string that represents the font color of the stack label. Accepts values in hexadecimal or rgba format, as valid CSS color strings.

    Overrides
    ChartDefaultFont.Color
    Remarks

    This property defines the font color used for the stack labels in the chart.

    Examples
    <SfChart>
        <ChartSeries XName="x" YName="y" Type="ChartSeriesType.StackingColumn">
        </ChartSeries>
        <ChartStackLabelSettings Visible="true">
            <ChartStackLabelFont Color="green">
            </ChartStackLabelFont>
        </ChartStackLabelSettings>
    </SfChart>

    FontFamily

    Gets or sets the font family of the stack label.

    Declaration
    [Parameter]
    public override string FontFamily { get; set; }
    Property Value
    Type Description
    string

    A string that represents the font family used for the stack label.

    Overrides
    ChartDefaultFont.FontFamily
    Remarks

    Specifies the font family applied to the stack label. You can use standard or custom fonts supported by the browser or system.

    Examples
    <SfChart>
        <ChartSeries XName="x" YName="y" Type="ChartSeriesType.StackingColumn">
        </ChartSeries>
        <ChartStackLabelSettings Visible="true">
            <ChartStackLabelFont FontFamily="Arial">
            </ChartStackLabelFont>
        </ChartStackLabelSettings>
    </SfChart>

    FontWeight

    Gets or sets the font weight of the stack label.

    Declaration
    [Parameter]
    public override string FontWeight { get; set; }
    Property Value
    Type Description
    string

    A string that represents the weight of the font used for the stack label.

    Overrides
    ChartDefaultFont.FontWeight
    Remarks

    Use this property to define the thickness of the text characters in the stack label, allowing you to control the level of boldness.

    Examples
    <SfChart>
        <ChartSeries XName="x" YName="y" Type="ChartSeriesType.StackingColumn">
        </ChartSeries>
        <ChartStackLabelSettings Visible="true">
            <ChartStackLabelFont FontWeight="600">
            </ChartStackLabelFont>
        </ChartStackLabelSettings>
    </SfChart>

    Size

    Gets or sets the font size of the stack label.

    Declaration
    [Parameter]
    public override string Size { get; set; }
    Property Value
    Type Description
    string

    A string that represents the font size of the stack label.

    Overrides
    ChartDefaultFont.Size
    Remarks

    Use this property to specify the font size of the stack label.

    Examples
    <SfChart>
        <ChartSeries XName="x" YName="y" Type="ChartSeriesType.StackingColumn">
        </ChartSeries>
        <ChartStackLabelSettings Visible="true">
            <ChartStackLabelFont Size="12px">
            </ChartStackLabelFont>
        </ChartStackLabelSettings>
    </SfChart>

    TextAlignment

    Gets or sets the alignment of the stack label relative to its position on the chart. The available options are:

    • Near: Aligns the label to the start of the stack.
    • Center: Aligns the label to the center of the stack.
    • Far: Aligns the label to the end of the stack.
    Declaration
    [Parameter]
    public override Alignment TextAlignment { get; set; }
    Property Value
    Type Description
    Alignment

    An enum value representing the alignment of the stack label. The default value is Center.

    Overrides
    ChartDefaultFont.TextAlignment
    Remarks

    This property sets the alignment for the stack label relative to its position on the chart.

    Examples
    <SfChart>
        <ChartSeries XName=”x” YName=”y” Type=”ChartSeriesType.StackingColumn”>
        </ChartSeries>
        <ChartStackLabelSettings Visible="true">
            <ChartStackLabelFont TextAlignment=”Alignment.Near”>
            </ChartStackLabelFont>
        </ChartStackLabelSettings >
    </SfChart>

    Implements

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