menu

Blazor

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

    Show / Hide Table of Contents

    Class AccumulationChartLegendFont

    Gets and sets the text style of the accumulation chart's texts.

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

    Constructors

    AccumulationChartLegendFont()

    Declaration
    public AccumulationChartLegendFont()

    Properties

    Color

    Gets or sets the font color of the legend text in the SfAccumulationChart.

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

    A string representing the font color of the legend text. The default font color is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a legend font color of #666666.

    Overrides
    ChartCommonFont.Color
    Remarks

    The Color property allows customization of the legend text color. It supports standard CSS color formats, such as hex codes, rgb, rgba, etc.

    Examples
    // The following code snippet demonstrates how to set the legend text font color in an accumulation chart:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
        <AccumulationChartLegendSettings Visible="true">
            <AccumulationChartLegendFont Color="#ff0000"/>
        </AccumulationChartLegendSettings>
    </SfAccumulationChart>

    FontFamily

    Gets or sets the font family of the legend text in the SfAccumulationChart.

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

    A string representing the font family of the legend text. The default font family is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a legend font family of Helvetica.

    Overrides
    ChartCommonFont.FontFamily
    Remarks

    The font family accepts typical CSS font family syntax, allowing customization to match the desired text style.

    Examples
    // The following code snippet demonstrates how to set the legend text font family in an accumulation chart:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
        <AccumulationChartLegendSettings Visible="true">
            <AccumulationChartLegendFont FontFamily="Arial"/>
        </AccumulationChartLegendSettings>
    </SfAccumulationChart>

    FontWeight

    Gets or sets the font weight of the legend text in the SfAccumulationChart.

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

    A string representing the font weight of the legend text. The default font weight is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a legend font weight of 400.

    Overrides
    ChartCommonFont.FontWeight
    Remarks

    The font weight can be a number (100 to 900), or a keyword such as 'normal', 'bold', 'bolder', or 'lighter'.

    Examples
    // The following code snippet demonstrates how to set the legend text font weight in an accumulation chart:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
        <AccumulationChartLegendSettings Visible="true">
            <AccumulationChartLegendFont FontWeight="bold"/>
        </AccumulationChartLegendSettings>
    </SfAccumulationChart>

    Size

    Gets or sets the font size of the legend text in the SfAccumulationChart.

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

    A string representing the font size of the legend text. The default size is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a legend text size of 14px.

    Overrides
    ChartCommonFont.Size
    Remarks

    The size value accepts standard CSS font size specifications such as 'px', 'em', etc.

    Examples
    // The following code snippet demonstrates how to set the legend text font size in an accumulation chart:
    <SfAccumulationChart>
        <AccumulationChartSeriesCollection>
            <AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
        </AccumulationChartSeriesCollection>
        <AccumulationChartLegendSettings Visible="true">
            <AccumulationChartLegendFont Size="23px"/>
        </AccumulationChartLegendSettings>
    </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