menu

Blazor

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

    Show / Hide Table of Contents

    Class ChartAxisTitleStyle

    Provides options to customize the text style of the axis title in a chart.

    Inheritance
    System.Object
    ChartSubComponent
    ChartDefaultFont
    ChartAxisTitleStyle
    Inherited Members
    ChartDefaultFont.FontStyle
    ChartDefaultFont.Opacity
    ChartDefaultFont.TextAlignment
    ChartDefaultFont.TextOverflow
    Namespace: Syncfusion.Blazor.Charts
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ChartAxisTitleStyle : ChartDefaultFont, ISubcomponentTracker, IChartDefaultFont

    Constructors

    ChartAxisTitleStyle()

    Declaration
    public ChartAxisTitleStyle()

    Properties

    Color

    Gets or sets the font color for the axis title.

    Declaration
    public override string Color { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the font color for the axis title. The default font color is determined by the chart's theme. By default, the theme is set to Material with a font color of rgba(0, 0, 0, 1).

    Overrides
    ChartDefaultFont.Color
    Remarks

    Use valid hex or rgba CSS color strings for the color value.

    Examples
    // The following code demonstrates setting a customized color for the axis title.
    <SfChart>
        <ChartPrimaryXAxis Title="XAxis">
            <ChartAxisTitleStyle Color="blue" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis Title="YAxis">
            <ChartAxisTitleStyle Color="blue" />
        </ChartPrimaryYAxis>
    </SfChart>

    FontFamily

    Gets or sets the font family for the axis title.

    Declaration
    public override string FontFamily { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the font family for the axis title. The default font family is determined by the chart's theme. By default, the theme is set to Material with the font family Roboto.

    Overrides
    ChartDefaultFont.FontFamily
    Remarks

    This property allows you to define a family of fonts to be used for the axis title. It can be set to any valid CSS font-family value, such as "Arial", "Times New Roman", or a generic font family like "serif" or "sans-serif".

    Examples
    // The following code demonstrates setting a customized font family for the axis title.
    <SfChart>
        <ChartPrimaryXAxis Title="XAxis">
            <ChartAxisTitleStyle FontFamily="italic" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis Title="YAxis">
            <ChartAxisTitleStyle FontFamily="italic" />
        </ChartPrimaryYAxis>
    </SfChart>

    FontWeight

    Gets or sets the font weight for the axis title.

    Declaration
    public override string FontWeight { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the font weight for the axis title. The default font weight is determined by the chart's theme. By default, the theme is set to Material with a font weight of 600.

    Overrides
    ChartDefaultFont.FontWeight
    Remarks

    This property allows you to specify the thickness or boldness of the font used for rendering the axis title.

    Examples
    // The following code demonstrates setting a customized font weight for the axis title.
    <SfChart>
        <ChartPrimaryXAxis Title="XAxis">
            <ChartAxisTitleStyle FontWeight="600" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis Title="YAxis">
            <ChartAxisTitleStyle FontWeight="600" />
        </ChartPrimaryYAxis>
    </SfChart>

    Size

    Gets or sets the font size of the axis title.

    Declaration
    public override string Size { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the font size of the axis title. The default font size for the axis title is 14px.

    Overrides
    ChartDefaultFont.Size
    Remarks

    Use this property to specify the font size for the axis title text. This can be set using a valid CSS font size string (e.g., "14px", "1em").

    Examples
    // The following code demonstrates setting a customized size for the axis title.
    <SfChart>
        <ChartPrimaryXAxis Title="XAxis">
            <ChartAxisTitleStyle Size="15px" />
        </ChartPrimaryXAxis>
        <ChartPrimaryYAxis Title="YAxis">
            <ChartAxisTitleStyle Size="15px" />
        </ChartPrimaryYAxis>
    </SfChart>
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved