menu

Blazor

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

    Show / Hide Table of Contents

    Class ChartLastDataLabelFont

    Provides options to customize the font style and appearance of the label of the last data in the ChartSeries.

    Inheritance
    System.Object
    ChartSubComponent
    ChartLastDataLabelFont
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartLastDataLabelFont : ChartSubComponent, ISubcomponentTracker
    Remarks

    It is used to render and customize the last value label for chart series with in the SfChart.

    Constructors

    ChartLastDataLabelFont()

    Declaration
    public ChartLastDataLabelFont()

    Properties

    Color

    Gets or sets the font color of the last value label text.

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

    A System.String specifying the text color.
    Accepts standard CSS color formats such as hex (#00FF00) or rgba (rgba(0, 255, 0, 1)).
    The default is based on the chart's theme—for example, Material uses rgba(97, 97, 97, 1).

    Remarks

    Use this property to ensure the text stands out appropriately against the chart background.

    Examples
    <SfChart>
       <ChartSeriesCollection>
        <ChartSeries XName="X" YName="Y" DataSource="@StockData">
            <ChartLastDataLabel ShowLabel="true">
                <ChartLastDataLabelFont Color="Green" />
            </ChartLastDataLabel>
        </ChartSeries>
       </ChartSeriesCollection>
    </SfChart>

    FontFamily

    Gets or sets the font family of the last value label text.

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

    A System.String that specifies the font family to apply.
    The default is determined by the chart’s theme. For example, the Material theme uses Roboto.

    Remarks

    Use this property to align the label’s font style with your application's design guidelines.

    Examples
    <SfChart>
       <ChartSeriesCollection>
        <ChartSeries XName="X" YName="Y" DataSource="@StockData">
            <ChartLastDataLabel ShowLabel="true">
                <ChartLastDataLabelFont FontFamily="Arial" />
            </ChartLastDataLabel>
        </ChartSeries>
       </ChartSeriesCollection>
    </SfChart>

    FontStyle

    Gets or sets the font style of the last value label text.

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

    A System.String that defines the font style.
    Common values include "normal", "italic", and "oblique".
    The default value is "normal".

    Remarks

    Applies emphasis to the label text and can be used to convey meaning or importance.

    Examples
    <SfChart>
       <ChartSeriesCollection>
        <ChartSeries XName="X" YName="Y" DataSource="@StockData">
            <ChartLastDataLabel ShowLabel="true">
                <ChartLastDataLabelFont FontStyle="Italic" />
            </ChartLastDataLabel>
        </ChartSeries>
       </ChartSeriesCollection>
    </SfChart>

    FontWeight

    Gets or sets the font weight of the last value label text.

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

    A System.String that defines the font weight.
    Acceptable values include "Normal", "Bold", or numeric values like "600".
    The default value is "".

    Remarks

    Use this property to define the thickness or boldness of the label’s text for visual emphasis.

    Examples
    <SfChart>
       <ChartSeriesCollection>
        <ChartSeries XName="X" YName="Y" DataSource="@StockData">
            <ChartLastDataLabel ShowLabel="true">
                <ChartLastDataLabelFont FontWeight="600" />
            </ChartLastDataLabel >
        </ChartSeries>
       </ChartSeriesCollection>
    </SfChart>

    Size

    Gets or sets the size of the last value label text.

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

    A System.String value that defines the font size of the label.
    The value can be specified using valid CSS units (e.g., 14px, 1rem, large).
    The default value is 16px.

    Remarks

    This property controls the font size of the last value label, allowing for precise visual customization.

    Examples
    <SfChart>
       <ChartSeriesCollection>
        <ChartSeries XName="X" YName="Y" DataSource="@StockData">
            <ChartLastDataLabel ShowLabel="true">
                <ChartLastDataLabelFont Size="14px" />
            </ ChartLastDataLabel>
        </ChartSeries>
       </ChartSeriesCollection>
    </SfChart>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved