ClassChartXAxisPlotBandLabel
Configures the text label displayed within or adjacent to an X-axis plot band. Provides comprehensive control over label appearance, positioning, and styling to clearly identify highlighted ranges and enhance chart understanding. Use this component to add descriptive text that explains the significance of plot band ranges and improves chart accessibility.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartXAxisPlotBandLabel : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartXAxisPlotBandLabel
Implements:
Inherited Members
Constructors
ChartXAxisPlotBandLabel()
Declaration
public ChartXAxisPlotBandLabel()
Properties
Align
Defines the horizontal alignment of the plot band label within the highlighted area for optimal text positioning. Available options include left alignment for labels at the start of the band, center alignment for balanced positioning, and right alignment for labels at the end of the band area. Use this property to ensure label readability and appropriate visual balance within the plot band's horizontal space. See ChartAxisPlotBandsLabelAlign for all available alignment options.
Declaration
[Parameter]
public ChartAxisPlotBandsLabelAlign? Align { get; set; }
Property Value
Background
Sets the background color behind the 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 clearly. Consider using semi-transparent or contrasting colors that maintain readability while complementing the plot band design.
Declaration
[Parameter]
public string Background { get; set; }
Property Value
ChildContent
The content of the ChartXAxisPlotBandLabel component. Children: ChartXAxisPlotBandLabelBorder, ChartXAxisPlotBandLabelMargin, ChartXAxisPlotBandLabelPadding.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Specifies the text color of the 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 to ensure labels integrate well with the visualization design and remain legible.
Font
Defines the font styling for the 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. Consider font consistency with other chart elements and ensure labels remain legible at different chart scales and viewing distances.
Position
Defines the vertical positioning of the plot band label relative to the X-axis for optimal placement and readability. Available options include top positioning above the axis, bottom positioning below the axis, and center positioning within the axis area. Use this property to ensure labels don't overlap with chart data or other elements while maintaining clear association with the plot band. See ChartAxisPlotBandsLabelPosition for all available positioning options and their appropriate use cases.
Declaration
[Parameter]
public ChartAxisPlotBandsLabelPosition? Position { get; set; }
Property Value
Rotation
Sets the rotation angle for the 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 horizontal space is limited within the plot band area or to create distinctive label presentations. Common angles include 45, 90, or -45 degrees to fit labels within narrow plot bands while maintaining text readability.
Declaration
[Parameter]
public double? Rotation { get; set; }
Property Value
Text
Sets the text content to display as the plot band label for describing the highlighted range or providing context. Supports plain text strings that explain the significance of the highlighted X-axis range or category grouping. Use descriptive text that helps users understand why this particular range is highlighted or what it represents. Clear plot band labels improve chart accessibility and make data interpretation more intuitive for analysis and decision-making.
Visible
Controls whether the plot band label is visible within the highlighted X-axis range for clear identification and context. Set to true (default) to display the label text that describes or identifies the plot band's purpose or significance. Set to false to hide the label while maintaining the visual plot band highlighting for subtle range emphasis. Use this property to balance between informative labeling and clean visual presentation based on your chart's requirements.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
OnAfterRender(bool)
Declaration
protected override void OnAfterRender(bool firstRender)
Parameters
firstRender
Overrides
OnInitialized()
Declaration
protected override void OnInitialized()
Overrides
OnParametersSet()
Declaration
protected override void OnParametersSet()
Overrides
Serialize()
Declaration
public Dictionary<string, object> Serialize()
Returns