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