menu

Blazor

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

    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
    System.Object
    ChartSubComponent
    ChartStackLabelSettings
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartStackLabelSettings : ChartSubComponent, ISubcomponentTracker

    Constructors

    ChartStackLabelSettings()

    Declaration
    public ChartStackLabelSettings()

    Properties

    Angle

    Gets or sets the angle for rotating the stack labels.

    Declaration
    public double Angle { get; set; }
    Property Value
    Type Description
    System.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
    public string Fill { get; set; }
    Property Value
    Type Description
    System.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
    public string Format { get; set; }
    Property Value
    Type Description
    System.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
    public double Rx { get; set; }
    Property Value
    Type Description
    System.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
    public double Ry { get; set; }
    Property Value
    Type Description
    System.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
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    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>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved