ClassChartLegendBorder
Configures the border appearance around the chart legend in ChartLegend. Use this component to add visual emphasis and structure to the legend by defining border color, style pattern, and thickness. Borders help separate the legend from chart content, create professional styling, and improve overall chart organization. Essential for establishing clear visual hierarchy in complex charts with multiple series.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartLegendBorder : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartLegendBorder
Implements:
Inherited Members
Constructors
ChartLegendBorder()
Declaration
public ChartLegendBorder()
Properties
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Sets the border color around the chart legend. Accepts any valid CSS color including hex codes (#DDDDDD), RGB values (rgb(221,221,221)), named colors (lightgray), or HSL values. Use borders to visually separate the legend from the chart content, create professional styling, or match your application's design theme. Subtle colors work best to avoid overwhelming the legend content.
DashType
Defines the line style pattern for the legend border using DashType values. Choose from various patterns: Solid for continuous borders, Dash for dashed outlines, Dot for dotted borders, DashDot for alternating dashes and dots, LongDash for longer dash segments, LongDashDot for long dashes with dots, and LongDashDotDot for complex patterns. Different patterns help distinguish the legend from chart data and other elements.
Declaration
[Parameter]
public DashType? DashType { get; set; }
Property Value
Width
Controls the thickness of the legend border in pixels. Set to 0 (default) to hide the border completely, or use positive values like 1-2 pixels for subtle outlines that frame the legend content. Combine with Color and DashType to create custom legend styling that enhances chart organization and visual hierarchy.
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