Class
ChartSubtitle

Configures the chart subtitle display and styling to provide additional context and information below the main chart title. Controls subtitle text, appearance, positioning, and layout to enhance chart communication and provide supplementary details for comprehensive data presentation. Children: ChartSubtitleBorder, ChartSubtitleMargin, ChartSubtitlePadding.

Definition

Constructors

ChartSubtitle()

Declaration

cs-api-definition
public ChartSubtitle()

Properties

Align

Determines the horizontal text alignment for the subtitle using ChartSubtitleAlign values. Choose from left, center, or right alignment to match the overall chart layout and design requirements for professional presentation.

Declaration

cs-api-definition
[Parameter]
public ChartSubtitleAlign? Align { get; set; }

Property Value

ChartSubtitleAlign?

Background

Sets the background color for the chart subtitle using any valid CSS color value. Accepts hex codes (#F5F5F5), RGB values (rgb(245, 245, 245)), named colors (lightgray, white), or HSL values. Use subtle background colors to enhance subtitle visibility without overwhelming the chart content.

Declaration

cs-api-definition
[Parameter]
public string Background { get; set; }

Property Value

string

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Color

Sets the text color for the chart subtitle using any valid CSS color value. Accepts hex codes (#616161), RGB values (rgb(97, 97, 97)), named colors (gray, black), or HSL values. Choose colors that provide good contrast and maintain the subtitle's secondary role to the main title.

Declaration

cs-api-definition
[Parameter]
public string Color { get; set; }

Property Value

string

Font

Defines the font styling for the subtitle text using CSS font notation. Specify font size, family, and style like "14px Arial", "16px 'Segoe UI'", or "italic 15px sans-serif". Subtitle fonts are typically smaller than main titles but larger than body text.

Declaration

cs-api-definition
[Parameter]
public string Font { get; set; }

Property Value

string

Position

Specifies the positioning of the subtitle relative to the chart using ChartSubtitlePosition values. Control whether the subtitle appears above or below the chart content for optimal layout and visual hierarchy in chart presentations.

Declaration

cs-api-definition
[Parameter]
public ChartSubtitlePosition? Position { get; set; }

Property Value

ChartSubtitlePosition?

Text

Specifies the subtitle text content to display below the main chart title. Use concise, descriptive text that provides additional context, data source information, time periods, or other relevant details that enhance chart understanding without cluttering the visualization.

Declaration

cs-api-definition
[Parameter]
public string Text { get; set; }

Property Value

string

Visible

Controls the visibility of the chart subtitle. Set to true to display the subtitle, false to hide it, or leave null for default behavior. Subtitles provide valuable context but can be hidden for cleaner presentations when additional information isn't needed.

Declaration

cs-api-definition
[Parameter]
public bool? Visible { get; set; }

Property Value

bool?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>