menu

Blazor

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

    Show / Hide Table of Contents

    Class AccumulationChartCenterLabel

    Provides options to customize the center label of pie and donut charts.

    Inheritance
    System.Object
    SfBaseComponent
    AccumulationChartCenterLabel
    Inherited Members
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnAfterRenderAsync(Boolean)
    SfBaseComponent.OnInitializedAsync()
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class AccumulationChartCenterLabel : SfBaseComponent
    Remarks

    The AccumulationChartCenterLabel is a child component of the SfAccumulationChart. It is used to render and customize the center label for pie and donut charts within the SfAccumulationChart.

    Constructors

    AccumulationChartCenterLabel()

    Declaration
    public AccumulationChartCenterLabel()

    Properties

    HoverTextFormat

    Defines the text format for the center label when hovering over a pie or donut chart data point.

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

    A string that specifies the format of the center label text during hover interactions. The default value is an empty string.

    Remarks

    This property defines the label format displayed when hovering over a pie or donut chart data point. It only takes effect when a valid format is provided, replacing the center label text with content generated based on the specified format string. If this property is not set, the center label will remain the same as the provided Text even when hovered over a chart data point.

    Examples
    <SfAccumulationChart>
        <AccumulationChartCenterLabel Text="Label" HoverTextFormat="${point.x} <br> ${point.y}%">
        </AccumulationChartCenterLabel>
    </SfAccumulationChart>

    Text

    Defines the text to be displayed at the center of pie and donut charts.

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

    A string representing the center label text. The default value is an empty string.

    Remarks

    This property is used to display the text at the center of pie and donut charts.

    Examples
    <SfAccumulationChart>
        <AccumulationChartCenterLabel Text="Label">
        </AccumulationChartCenterLabel>
    </SfAccumulationChart>

    XOffset

    Gets or sets the horizontal offset position of the center label.

    Declaration
    public double XOffset { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double value that specifies the horizontal offset of the center label. The default value is 0.

    Remarks

    Adjusts the horizontal position (XOffset) of the center label by a specific offset (in pixels). Positive values move the label to the right, and negative values move it to the left.

    Examples
    <SfAccumulationChart>
        <AccumulationChartCenterLabel Text="Label" XOffset="10">
        </AccumulationChartCenterLabel>
    </SfAccumulationChart>

    YOffset

    Gets or sets the vertical offset position of the center label.

    Declaration
    public double YOffset { get; set; }
    Property Value
    Type Description
    System.Double

    A System.Double value that specifies the vertical offset of the center label. The default value is 0.

    Remarks

    Adjusts the vertical position (YOffset) of the center label by a specific offset (in pixels). Positive values move the label downward, and negative values move it upward.

    Examples
    <SfAccumulationChart>
        <AccumulationChartCenterLabel Text="Label" YOffset="10">
        </AccumulationChartCenterLabel>
    </SfAccumulationChart>

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved