alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class ChartStackLabelSettings

    Configures the options to customize the stack labels in the chart. Stack labels display the total value for stacked series and provide customization options for appearance and positioning.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ChartSubComponent
    ChartStackLabelSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    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 ChartStackLabelSettings : ChartSubComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    ChartStackLabelSettings()

    Declaration
    public ChartStackLabelSettings()

    Properties

    Angle

    Gets or sets the angle for rotating the stack labels.

    Declaration
    [Parameter]
    public double Angle { get; set; }
    Property Value
    Type Description
    double

    A double value representing the rotation angle, ranging from 0 to 360. The default value is 0.

    Remarks

    This property allows rotating the stack labels by adjusting their angle.

    Examples
    <SfChart>
        <ChartSeries XName=”x” YName=”y” Type=”ChartSeriesType.StackingColumn”>
        </ChartSeries>
        <ChartStackLabelSettings Visible="true" Angle=”90”>
        </ChartStackLabelSettings>
    </SfChart>

    Fill

    Gets or sets the background color of the stack labels.

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

    Accepts valid CSS color strings, including hex and rgba values. The default value is transparent.

    Remarks

    This property sets the background color for the stack labels.

    Examples
    <SfChart>
        <ChartSeries XName=”x” YName=”y” Type=”ChartSeriesType.StackingColumn”>
        </ChartSeries>
        <ChartStackLabelSettings Visible="true" Fill=”white”>
        </ChartStackLabelSettings>
    </SfChart>

    Format

    Gets or sets the format used to display the stack labels.

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

    A string that specifies the format used to display the stack labels.

    Remarks

    Supports placeholders such as {value}, where {value} represents the total stack value. You can use standard numeric format strings such as "N0", "N1", "C0", "P0", etc., to customize the display format of the stack labels.

    Examples
    <SfChart>
        <ChartSeries XName="x" YName="y" Type="ChartSeriesType.StackingColumn">
        </ChartSeries>
        <ChartStackLabelSettings Visible="true" Format="N1">
        </ChartStackLabelSettings>
    </SfChart>

    Rx

    Gets or sets the rounded corner radius along the X-axis for the stack label background.

    Declaration
    [Parameter]
    public double Rx { get; set; }
    Property Value
    Type Description
    double

    A double value representing the corner radius along the X-axis. The default value is 5.

    Remarks

    This property sets the rounded corner radius along the X-axis for the stack label background. The border must be set for the rounded corners to be visible.

    Examples
    <SfChart>
        <ChartSeries XName=”x” YName=”y” Type=”ChartSeriesType.StackingColumn”>
        </ChartSeries>
        <ChartStackLabelSettings Visible="true" Rx=”10”>
        </ChartStackLabelSettings>
    </SfChart>

    Ry

    Gets or sets the rounded corner radius along the Y-axis for the stack label background.

    Declaration
    [Parameter]
    public double Ry { get; set; }
    Property Value
    Type Description
    double

    A double value representing the corner radius along the Y-axis. The default value is 5.

    Remarks

    This property sets the rounded corner radius along the Y-axis for the stack label background. The border must be set for the rounded corners to be visible.

    Examples
    <SfChart>
        <ChartSeries XName=”x” YName=”y” Type=”ChartSeriesType.StackingColumn”>
        </ChartSeries>
        <ChartStackLabelSettings Visible="true" Ry=”10”>
        </ChartStackLabelSettings >
    </SfChart>

    Visible

    Gets or sets a value that determines whether the stack labels are visible.

    Declaration
    [Parameter]
    public bool Visible { get; set; }
    Property Value
    Type Description
    bool

    true to make the stack labels visible; otherwise, false. The default value is false.

    Remarks

    This property controls the visibility of the stack labels, allowing them to be toggled on or off.

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

    Implements

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