Class StockChartLastDataLabelFont
Provides options to customize the font style and appearance of the label of the last data in the StockChartSeries.
Inheritance
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. |
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. |
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. |
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. |
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. |
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>