ClassChartCategoryAxisMajorGridLines
Configures the major grid lines that extend from category axis major ticks across the chart plot area. Creates vertical reference lines that help users align data points with category values. Essential for improving chart readability by providing visual guides for data interpretation. Controls line styling, color, thickness, and visibility for professional chart presentation.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartCategoryAxisMajorGridLines : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartCategoryAxisMajorGridLines
Implements:
Inherited Members
Constructors
ChartCategoryAxisMajorGridLines()
Declaration
public ChartCategoryAxisMajorGridLines()
Properties
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Sets the color of major grid lines on the category axis. Accepts any valid CSS color including hex codes (#E0E0E0), RGB values (rgb(224,224,224)), named colors (lightgray), or HSL values. Use subtle colors like light gray to provide visual reference without overwhelming the chart data.
DashType
Defines the line style pattern for major grid lines using DashType values. Choose from various patterns: Solid for continuous lines, Dash for dashed lines, Dot for dotted lines, DashDot for alternating dashes and dots, LongDash for longer dash segments, LongDashDot for long dashes with dots, and LongDashDotDot for complex patterns. Different patterns can help distinguish grid lines from data series.
Declaration
[Parameter]
public DashType? DashType { get; set; }
Property Value
Skip
Sets how many major grid lines to skip from the beginning of the category axis. Use this to offset the grid line pattern, for example, Skip=1 starts grid lines from the second category instead of the first. Useful for aligning grid lines with specific data patterns or visual requirements.
Step
Controls the interval between major grid lines on the category axis. Set to 1 to show a grid line at every category, 2 for every other category, etc. This helps reduce visual clutter in charts with many categories while maintaining useful reference lines for data reading.
Visible
Controls whether major grid lines are displayed on the category axis. Set to true (default) to show grid lines for better data reading, or false to hide them for cleaner chart appearance. Major grid lines help users trace data points to their corresponding category values.
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