ClassChartValueAxisMajorGridLines
Configures the major grid lines that extend horizontally across the chart from value axis major tick marks. Provides comprehensive control over grid line appearance including color, style, spacing, and visibility to enhance chart readability and data interpretation. Use this component to create visual guides that help users read values from the chart and track data points across the plot area.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartValueAxisMajorGridLines : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartValueAxisMajorGridLines
Implements:
Inherited Members
Constructors
ChartValueAxisMajorGridLines()
Declaration
public ChartValueAxisMajorGridLines()
Properties
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Sets the color of the major grid lines extending from the value axis. Accepts any valid CSS color value including hex codes (#e0e0e0), RGB values (rgb(224,224,224)), or color names (lightgray). Use this to create subtle visual guides that enhance chart readability without overwhelming the data visualization. Example: Set to "#f0f0f0" for subtle gray grid lines, or "rgba(0,0,0,0.1)" for very light transparent lines that don't distract from data.
DashType
Sets the dash pattern style for the major value axis grid lines. Controls the visual appearance of grid lines, allowing for solid lines or various dashed patterns to create different visual effects and emphasis levels. Use this to create distinctive grid styles that complement your chart design without overwhelming the data presentation. Accepts values from the DashType enumeration including solid, dash, dot, and various dash-dot combinations.
Declaration
[Parameter]
public DashType? DashType { get; set; }
Property Value
Skip
Sets the number of major grid lines to skip from the beginning of the value axis. Controls which grid lines are displayed by skipping a specified number from the start, useful for custom grid patterns. Use this to fine-tune grid line positioning and create specific visual patterns that enhance chart readability. Example: Set to 1 to skip the first grid line, or 2 to start grid lines from the third major value interval.
Step
Sets the interval step for displaying major grid lines on the value axis. Controls how frequently grid lines appear by specifying the interval between them, allowing for custom grid density. Use this to control grid line frequency independent of the major unit setting, creating optimal visual guides for your data range. Example: Set to 2 to show grid lines every other major unit, or 5 for sparser grid lines in dense value ranges.
Visible
Controls whether the major grid lines from the value axis are displayed on the chart. When set to true, horizontal grid lines appear at major value intervals. When false, no major grid lines are shown. Use this to show or hide grid lines based on chart complexity and user preferences for visual guides versus clean presentation. Example: Set to true for data-heavy charts where grid lines aid in value reading, or false for artistic or simplified chart presentations.
Width
Sets the thickness of the major value axis grid lines in pixels. Controls how prominent the grid lines appear, affecting the overall visual emphasis and chart readability. Use this to create subtle guides with thin lines or more prominent grids with thicker lines based on your design requirements. Example: Set to 1 for standard grid lines, 0.5 for very subtle guides, or 2 for more prominent grid visualization.
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