alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class AccumulationChartCenterLabel

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

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    AccumulationChartCenterLabel
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnInitialized()
    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.IsDisposed
    OwningComponentBase.ScopedServices
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(bool)
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnAfterRenderAsync(bool)
    SfBaseComponent.OnInitializedAsync()
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class AccumulationChartCenterLabel : SfBaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    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
    [Parameter]
    public string HoverTextFormat { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    public string Text { get; set; }
    Property Value
    Type Description
    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
    [Parameter]
    public double XOffset { get; set; }
    Property Value
    Type Description
    double

    A 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
    [Parameter]
    public double YOffset { get; set; }
    Property Value
    Type Description
    double

    A 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
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Implements

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