Class
ChartCategoryAxisPlotBandLabel

Configures the descriptive text label displayed within a plot band in ChartCategoryAxisPlotBand. Use this component to add explanatory text that describes what the highlighted plot band region represents, such as "Target Range", "Holiday Period", "High Season", or specific values. Labels can be positioned, styled, and rotated to provide clear context about the significance of the plot band without cluttering the chart visualization. Children: ChartCategoryAxisPlotBandLabelBorder, ChartCategoryAxisPlotBandLabelMargin, ChartCategoryAxisPlotBandLabelPadding.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class ChartCategoryAxisPlotBandLabel : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseDataVizChildComponentChartCategoryAxisPlotBandLabel

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members ComponentBase.OnInitializedAsync()ComponentBase.OnParametersSetAsync()ComponentBase.StateHasChanged()ComponentBase.ShouldRender()ComponentBase.OnAfterRenderAsync(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

ChartCategoryAxisPlotBandLabel()

Declaration

cs-api-definition
public ChartCategoryAxisPlotBandLabel()

Properties

Align

Controls the horizontal alignment of the plot band label using ChartAxisPlotBandsLabelAlign values. Choose Left to position the label at the beginning of the plot band, Right to position it at the end, or Center to position it in the middle. This determines where the label appears within the highlighted plot band region.

Declaration

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

Property Value

ChartAxisPlotBandsLabelAlign?

Background

Sets the background color behind the plot band label text. Accepts any valid CSS color including hex codes (#FFFFFF), RGB values (rgb(255,255,255)), named colors (white), or HSL values. Use background colors to improve label readability when the label overlaps with chart data or complex plot band colors.

Declaration

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

Property Value

string

ChildContent

The content of the ChartCategoryAxisPlotBandLabel component. Children: ChartCategoryAxisPlotBandLabelBorder, ChartCategoryAxisPlotBandLabelMargin, ChartCategoryAxisPlotBandLabelPadding.

Declaration

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

Property Value

RenderFragment

Color

Sets the text color of the plot band label. Accepts any valid CSS color including hex codes (#333333), RGB values (rgb(51,51,51)), named colors (darkgray), or HSL values. Choose colors that provide good contrast with the Background and underlying plot band for optimal readability.

Declaration

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

Property Value

string

Font

Defines the font styling for the plot band label text using CSS font notation. Specify properties like size, weight, and family in a single string, for example: "bold 14px Arial", "italic 12px 'Times New Roman'", or "normal 16px sans-serif". This controls the typography and visual emphasis of the label text.

Declaration

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

Property Value

string

Position

Controls the vertical positioning of the plot band label using ChartAxisPlotBandsLabelPosition values. Choose Top to position the label above the plot band, Bottom to position it below, or Center to position it in the middle of the plot band height. This determines the label's vertical placement relative to the highlighted region.

Declaration

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

Property Value

ChartAxisPlotBandsLabelPosition?

Rotation

Sets the rotation angle for the plot band label in degrees. Use positive values for clockwise rotation, negative values for counter-clockwise rotation, or 0 (default) for no rotation. Common angles include 45, 90, or -90 degrees. Rotation is useful for fitting long labels in tight spaces or creating visual effects.

Declaration

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

Property Value

double?

Text

Specifies the text content displayed in the plot band label. Use descriptive text to explain what the plot band represents, such as "Target Range", "Weekend Period", "High Season", or specific values. Clear, concise labels help users understand the significance of the highlighted region.

Declaration

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

Property Value

string

Visible

Controls whether the plot band label is displayed. Set to true (default) to show the label with its descriptive text, or false to hide it while keeping the plot band visible. Hidden labels can be useful when you want to highlight regions without adding text clutter to the chart.

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>