ClassChartXAxisLine
Configures the main horizontal line of the chart X-axis that serves as the foundation for category positioning and visual reference. Provides comprehensive control over axis line appearance including color, style, thickness, and visibility to create professional chart presentations. Use this component to customize the primary horizontal axis line that defines the bottom or top boundary of your chart's data area.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartXAxisLine : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartXAxisLine
Implements:
Inherited Members
Constructors
ChartXAxisLine()
Declaration
public ChartXAxisLine()
Properties
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Sets the color of the main X-axis line that runs horizontally across the chart. Accepts any valid CSS color value including hex codes (#333333), RGB values (rgb(51,51,51)), or color names (black). Use this to ensure the axis line has appropriate contrast and visibility against your chart's background and complements the overall design. Example: Set to "#666666" for a professional gray axis line, or "#2c3e50" for a darker, more prominent horizontal reference.
DashType
Sets the dash pattern style for the main X-axis line. Controls the visual appearance of the horizontal axis line, allowing for solid lines or various dashed patterns to create different design effects. Use this to create distinctive axis styles that complement your chart design or match your application's visual language. Accepts values from the DashType enumeration including solid, dash, dot, and various dash-dot combinations.
Declaration
[Parameter]
public DashType? DashType { get; set; }
Property Value
Visible
Controls whether the main X-axis line is displayed on the chart. When set to true, the horizontal axis line appears to provide visual reference for category positioning. When false, the line is hidden. Use this to show or hide the axis line based on chart design preferences and the need for visual reference elements. Example: Set to true for charts requiring clear axis definition, or false for minimal designs where the axis line might be unnecessary.
Width
Sets the thickness of the main X-axis line in pixels. Controls how prominent the horizontal axis line appears and also affects the visual weight of associated major and minor ticks. Use this to create subtle axis lines with thin widths or bold axis definitions with thicker lines based on your chart's visual hierarchy. Example: Set to 1 for standard axis lines, 2 for more prominent axis definition, or 0.5 for subtle axis references.
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