menu

Blazor

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

    Show / Hide Table of Contents

    Class StockChartLastDataLabelFont

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

    Inheritance
    System.Object
    StockChartLastDataLabelFont
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class StockChartLastDataLabelFont : OwningComponentBase
    Remarks

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

    Constructors

    StockChartLastDataLabelFont()

    Declaration
    public StockChartLastDataLabelFont()

    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
    <SfStockChart>
        <StockChartSeriesCollection>
           <StockChartSeries XName="X" YName="Y" DataSource="@StockData" Type="ChartSeriesType.Line">
            <StockChartLastDataLabel ShowLabel="true">
              <StockChartLastDataLabelFont Color=”Green” />
           </StockChartLastDataLabel>
          </StockChartSeries>
        </StockChartSeriesCollection>
    </SfStockChart>

    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 stock 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
    <SfStockChart>
        <StockChartSeriesCollection>
           <StockChartSeries XName="X" YName="Y" DataSource="@StockData" Type="ChartSeriesType.Line">
            <StockChartLastDataLabel ShowLabel="true">
              <StockChartLastDataLabelFont FontFamily=”Arial” />
           </StockChartLastDataLabel>
          </StockChartSeries>
        </StockChartSeriesCollection>
    </SfStockChart>

    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
    <SfStockChart>
        <StockChartSeriesCollection>
           <StockChartSeriesXName="X" YName="Y" DataSource="@StockData" Type="ChartSeriesType.Line">
            <StockChartLastDataLabel ShowLabel="true">
              < StockChartLastDataLabelFont FontStyle=”italic” />
           </StockChartLastDataLabel>
          </StockChartSeries>
        </StockChartSeriesCollection>
    </SfStockChart>

    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
    <SfStockChart>
        <StockChartSeriesCollection>
           <StockChartSeries XName="X" YName="Y" DataSource="@StockData" Type="ChartSeriesType.Line">
            <StockChartLastDataLabel ShowLabel="true">
              <StockChartLastDataLabelFont FontWeight=”600” />
           </StockChartLastDataLabel>
          </StockChartSeries>
        </StockChartSeriesCollection>
    </SfStockChart>

    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
    <SfStockChart>
        <StockChartSeriesCollection>
           <StockChartSeries XName="X" YName="Y" DataSource="@StockData" Type="ChartSeriesType.Line">
            <StockChartLastDataLabel ShowLabel="true">
              <StockChartLastDataLabelFont Size=”13px” />
           </StockChartLastDataLabel>
          </StockChartSeries>
        </StockChartSeriesCollection>
    </SfStockChart>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved