menu

Blazor

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

    Show / Hide Table of Contents

    Class AccumulationChartDataLabelFont

    Gets and sets the text style for Accumulation chart's datalabel.

    Inheritance
    System.Object
    ChartCommonFont
    AccumulationChartDataLabelFont
    Inherited Members
    ChartCommonFont.FontStyle
    ChartCommonFont.Opacity
    ChartCommonFont.TextAlignment
    ChartCommonFont.TextOverflow
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class AccumulationChartDataLabelFont : ChartCommonFont

    Constructors

    AccumulationChartDataLabelFont()

    Declaration
    public AccumulationChartDataLabelFont()

    Properties

    Color

    Gets or sets the color for the text in the chart data labels.

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

    A string representing the color for the text. Acceptable formats include hex codes and rgba values. The default value is null.

    Overrides
    ChartCommonFont.Color
    Remarks

    The Color property allows you to customize the color of the data label text when they are visible.

    Examples
    // The following example demonstrates how to set the color of the data label text:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
                <AccumulationDataLabelSettings Visible="true">
                    <AccumulationChartDataLabelFont Color="#FF5733"></AccumulationChartDataLabelFont>
                </AccumulationDataLabelSettings>
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
    </SfAccumulationChart>

    FontFamily

    Gets or sets the font family for the data label text in the chart.

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

    A string representing the font family for the text. The default value is Helvetica.

    Overrides
    ChartCommonFont.FontFamily
    Remarks

    The FontFamily property allows you to customize the font family of the data labels when they are visible. If no font family is specified, the font family will be applied based on the SfAccumulationChart theme.

    Examples
    // The following example demonstrates how to set the font family of the data label text:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
                <AccumulationDataLabelSettings Visible="true">
                    <AccumulationChartDataLabelFont FontFamily="Arial"></AccumulationChartDataLabelFont>
                </AccumulationDataLabelSettings>
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
    </SfAccumulationChart>

    FontWeight

    Gets or sets the font weight for the data label text in the chart.

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

    A string representing the font weight for the text. The default value is 400.

    Overrides
    ChartCommonFont.FontWeight
    Remarks

    The FontWeight property allows you to customize the weight of the data labels text when they are visible. If no font weight is specified, the font weight will be applied based on the SfAccumulationChart theme.

    Examples
    // The following example demonstrates how to set the font weight of the data label text:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
                <AccumulationDataLabelSettings Visible="true">
                    <AccumulationChartDataLabelFont FontWeight="Bold"></AccumulationChartDataLabelFont>
                </AccumulationDataLabelSettings>
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
    </SfAccumulationChart>

    Size

    Gets or sets the font size for the data label text in the chart.

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

    A string representing the font size for the text. The default value is 12px.

    Overrides
    ChartCommonFont.Size
    Remarks

    The Size property allows you to customize the font size of the data labels when they are visible. If no font size is specified, the font size will be applied based on the theme of the SfAccumulationChart.

    Examples
    // The following example demonstrates how to set the font size of the data label text:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
                <AccumulationDataLabelSettings Visible="true">
                    <AccumulationChartDataLabelFont Size="20px"></AccumulationChartDataLabelFont>
                </AccumulationDataLabelSettings>
            </AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
    </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