Class AccumulationChartTitleStyle
Gets or sets the configuration of the title style in the Accumulation chart.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class AccumulationChartTitleStyle : ChartCommonFont
Constructors
AccumulationChartTitleStyle()
Declaration
public AccumulationChartTitleStyle()
Properties
FontFamily
Gets or sets the font family of the title text in the SfAccumulationChart.
Declaration
public override string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the font family of the title text. The default font family is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a title font family of Helvetica. |
Overrides
Remarks
This property accepts typical CSS font family names, allowing customization to match the desired text style.
Examples
// The following code demonstrates setting a custom font family for the title text:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle FontFamily="Arial" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
FontWeight
Gets or sets the font weight of the title text in the SfAccumulationChart.
Declaration
public override string FontWeight { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the font weight of the title text. The default font weight is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a title font weight of 600. |
Overrides
Remarks
The font weight can be a number (100 to 900), or a keyword such as 'normal', 'bold', 'bolder', or 'lighter'.
Examples
// The following code demonstrates setting a custom font weight for the title text:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle FontWeight="bold" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Position
Defines the position of the chart title and subtitle.
Declaration
public ChartTitlePosition Position { get; set; }
Property Value
Type | Description |
---|---|
ChartTitlePosition | An enum value representing the position of the title. The default value is Top. |
Remarks
Available options:
- Top - Displays the title and subtitle at the top of the chart.
- Left - Displays the title and subtitle on the left side of the chart.
- Bottom - Displays the title and subtitle at the bottom of the chart.
- Right - Displays the title and subtitle on the right side of the chart.
- Custom - Displays the title and subtitle based on the specified X and Y coordinates.
Examples
// The following code demonstrates setting a customized position for the chart title:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle Position="ChartTitlePosition.Bottom" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Size
Gets or sets the font size of the title text in the SfAccumulationChart.
Declaration
public override string Size { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the font size of the title text. The default size is determined by the SfAccumulationChart theme. By default, the theme is set to Bootstrap4 with a title text size of 16px. |
Overrides
Remarks
This property accepts standard CSS font-size specifications, such as values in 'px'.
Examples
// The following code demonstrates setting a custom font size for the title text:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle Size="23px" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
TextAlignment
Gets or sets the text alignment of the title.
Declaration
public override Alignment TextAlignment { get; set; }
Property Value
Type | Description |
---|---|
Alignment | One of the Alignment values that specifies the alignment of the text. Options include:
|
Overrides
Remarks
Text alignment adjusts the horizontal placement of text within its container, affecting its position relative to other content.
Examples
// The following code demonstrates setting the text alignment for the chart title:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle TextAlignment="Alignment.Far" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
X
Defines the X coordinate for the chart title and subtitle.
Declaration
public double X { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the horizontal position. The default value is 0. |
Remarks
This property is applicable only when the position is set to Custom.
Examples
// This example demonstrates setting a custom X coordinate for the chart title:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle Position="ChartTitlePosition.Custom" X="60" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Y
Defines the Y coordinate for the chart title and subtitle.
Declaration
public double Y { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value representing the vertical position. The default value is 0. |
Remarks
This property is applicable only when the position is set to Custom.
Examples
// This example demonstrates setting a custom Y coordinate for the chart title:
<SfAccumulationChart Title="Mobile Browser Statistics">
<AccumulationChartTitleStyle Position="ChartTitlePosition.Custom" Y="150" />
<AccumulationChartSeriesCollection>
<AccumulationChartSeries DataSource="@StatisticsDetails" XName="Browser" YName="Users"></AccumulationChartSeries>
</AccumulationChartSeriesCollection>
</SfAccumulationChart>
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |