Class AccumulationChartDataLabelFont
Gets and sets the text style for Accumulation chart's datalabel.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class AccumulationChartDataLabelFont : ChartCommonFont
Constructors
AccumulationChartDataLabelFont()
Declaration
public AccumulationChartDataLabelFont()
Properties
Color
Gets or sets the color for the text in the chart data labels.
Declaration
public override string Color { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color for the text. Acceptable formats include hex codes and |
Overrides
Remarks
The Color property allows you to customize the color of the data label text when they are visible.
Examples
// The following example demonstrates how to set the color of the data label text:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationDataLabelSettings Visible="true">
<AccumulationChartDataLabelFont Color="#FF5733"></AccumulationChartDataLabelFont>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
FontFamily
Gets or sets the font family for the data label text in the chart.
Declaration
public override string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the font family for the text. The default value is Helvetica. |
Overrides
Remarks
The FontFamily property allows you to customize the font family of the data labels when they are visible. If no font family is specified, the font family will be applied based on the SfAccumulationChart theme.
Examples
// The following example demonstrates how to set the font family of the data label text:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationDataLabelSettings Visible="true">
<AccumulationChartDataLabelFont FontFamily="Arial"></AccumulationChartDataLabelFont>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
FontWeight
Gets or sets the font weight for the data label text in the chart.
Declaration
public override string FontWeight { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the font weight for the text. The default value is 400. |
Overrides
Remarks
The FontWeight property allows you to customize the weight of the data labels text when they are visible. If no font weight is specified, the font weight will be applied based on the SfAccumulationChart theme.
Examples
// The following example demonstrates how to set the font weight of the data label text:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationDataLabelSettings Visible="true">
<AccumulationChartDataLabelFont FontWeight="Bold"></AccumulationChartDataLabelFont>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Size
Gets or sets the font size for the data label text in the chart.
Declaration
public override string Size { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the font size for the text. The default value is 12px. |
Overrides
Remarks
The Size property allows you to customize the font size of the data labels when they are visible. If no font size is specified, the font size will be applied based on the theme of the SfAccumulationChart.
Examples
// The following example demonstrates how to set the font size of the data label text:
<SfAccumulationChart>
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users">
<AccumulationDataLabelSettings Visible="true">
<AccumulationChartDataLabelFont Size="20px"></AccumulationChartDataLabelFont>
</AccumulationDataLabelSettings>
</AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |