Class
ChartValueAxisMajorGridLines

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:

cs-api-definition
public class ChartValueAxisMajorGridLines : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseDataVizChildComponentChartValueAxisMajorGridLines

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members ComponentBase.OnInitializedAsync()ComponentBase.OnParametersSetAsync()ComponentBase.StateHasChanged()ComponentBase.ShouldRender()ComponentBase.OnAfterRenderAsync(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

ChartValueAxisMajorGridLines()

Declaration

cs-api-definition
public ChartValueAxisMajorGridLines()

Properties

ChildContent

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

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.

Declaration

cs-api-definition
[Parameter]
public string Color { get; set; }

Property Value

string

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

cs-api-definition
[Parameter]
public DashType? DashType { get; set; }

Property Value

DashType?

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.

Declaration

cs-api-definition
[Parameter]
public double? Skip { get; set; }

Property Value

double?

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.

Declaration

cs-api-definition
[Parameter]
public double? Step { get; set; }

Property Value

double?

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.

Declaration

cs-api-definition
[Parameter]
public bool? Visible { get; set; }

Property Value

bool?

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.

Declaration

cs-api-definition
[Parameter]
public double? Width { get; set; }

Property Value

double?

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRender(bool)

Declaration

cs-api-definition
protected override void OnAfterRender(bool firstRender)

Parameters

firstRender

bool

Overrides ComponentBase.OnAfterRender(bool)

OnInitialized()

Declaration

cs-api-definition
protected override void OnInitialized()

Overrides DataVizChildComponent.OnInitialized()

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

Serialize()

Declaration

cs-api-definition
public Dictionary<string, object> Serialize()

Returns

Dictionary<string, object>