Class
ChartYAxisPlotBandLabel

Configures the text label displayed within or adjacent to a Y-axis plot band. Provides comprehensive control over label appearance, positioning, and styling to clearly identify highlighted value ranges and enhance chart understanding. Use this component to add descriptive text that explains the significance of plot band ranges and improves chart accessibility for value interpretation.

Definition

Constructors

ChartYAxisPlotBandLabel()

Declaration

cs-api-definition
public ChartYAxisPlotBandLabel()

Properties

Align

Defines the horizontal alignment of the plot band label within the highlighted Y-axis value range for optimal text positioning. Available options include left alignment for labels at the start of the value range, center alignment for balanced positioning, and right alignment for labels at the end of the highlighted area. Use this property to ensure label readability and appropriate visual balance within the plot band's vertical space and value context. See ChartAxisPlotBandsLabelAlign for all available alignment options.

Declaration

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

Property Value

ChartAxisPlotBandsLabelAlign?

Background

Sets the background color behind the Y-axis plot band label text for enhanced visibility and professional presentation. Accepts any valid CSS color value including hex codes (#FFFFFF), RGB values (rgb(255,255,255)), or color names (white). Use background colors to ensure label readability over complex plot band areas or when labels need to stand out against value ranges. Consider using semi-transparent or contrasting colors that maintain readability while complementing the plot band design and value context.

Declaration

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

Property Value

string

ChildContent

The content of the ChartYAxisPlotBandLabel component. Children: ChartYAxisPlotBandLabelBorder, ChartYAxisPlotBandLabelMargin, ChartYAxisPlotBandLabelPadding.

Declaration

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

Property Value

RenderFragment

Color

Specifies the text color of the Y-axis plot band label for optimal readability and visual consistency with chart theming. Accepts any valid CSS color value including hex codes (#333333), RGB values (rgb(51,51,51)), or color names (black). Use colors that provide sufficient contrast against the plot band background and label background for accessibility. Consider the overall chart color scheme and value range highlighting to ensure labels integrate well with the visualization design.

Declaration

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

Property Value

string

Font

Defines the font styling for the Y-axis plot band label including size, family, and weight for professional typography. Accepts valid CSS font declarations such as "12px Arial", "bold 14px 'Segoe UI'", or "italic 11px sans-serif". Use appropriate font sizes that ensure readability within the plot band area and maintain visual hierarchy with other chart elements. Consider font consistency with chart design and ensure labels remain legible for value range identification and measurement context.

Declaration

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

Property Value

string

Position

Defines the vertical positioning of the Y-axis plot band label relative to the highlighted value range for optimal placement. Available options include top positioning above the range, bottom positioning below the range, and center positioning within the highlighted area. Use this property to ensure labels don't overlap with chart data or other elements while maintaining clear association with the value range. See ChartAxisPlotBandsLabelPosition for all available positioning options and their appropriate use cases for vertical axis labeling.

Declaration

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

Property Value

ChartAxisPlotBandsLabelPosition?

Rotation

Sets the rotation angle for the Y-axis plot band label in degrees to optimize space utilization and readability. Positive values rotate the label clockwise, negative values rotate counter-clockwise. Default is 0 (no rotation). Use rotation when vertical space is limited within the plot band area or to create distinctive label presentations for value ranges. Common angles include 45, 90, or -45 degrees to fit labels within narrow plot bands while maintaining text readability and value context.

Declaration

cs-api-definition
[Parameter]
public double? Rotation { get; set; }

Property Value

double?

Text

Sets the text content to display as the Y-axis plot band label for describing the highlighted value range or providing measurement context. Supports plain text strings that explain the significance of the highlighted Y-axis range or value threshold. Use descriptive text that helps users understand why this particular value range is highlighted or what it represents in terms of measurement or analysis. Clear plot band labels improve chart accessibility and make value interpretation more intuitive for data analysis and decision-making.

Declaration

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

Property Value

string

Visible

Controls whether the Y-axis plot band label is visible within the highlighted value range for clear identification and measurement context. Set to true (default) to display the label text that describes or identifies the plot band's purpose or value significance. Set to false to hide the label while maintaining the visual plot band highlighting for subtle value range emphasis. Use this property to balance between informative labeling and clean visual presentation based on your chart's measurement requirements.

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>