ClassChartYAxisMajorTicks
Configures the major tick marks displayed along the Y-axis at primary value positions. Provides comprehensive control over tick appearance including color, size, visibility, and spacing to enhance chart precision and value readability. Use this component to create clear reference points that help users identify exact value positions and improve data point alignment with the vertical scale.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class ChartYAxisMajorTicks : DataVizChildComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseDataVizChildComponentChartYAxisMajorTicks
Implements:
Inherited Members
Constructors
ChartYAxisMajorTicks()
Declaration
public ChartYAxisMajorTicks()
Properties
ChildContent
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Color
Specifies the color of major tick marks on the Y-axis. Accepts any valid CSS color value including hex codes (#333333), RGB values (rgb(51,51,51)), or color names (black). Use this property to ensure tick marks are clearly visible against the chart background and complement the overall design. Consider using darker colors for better visibility and professional appearance that enhances value precision.
Size
Defines the length of major tick marks extending from the Y-axis line in pixels. Longer ticks (8-12 pixels) provide more prominent value reference points, while shorter ticks (4-6 pixels) offer subtle markers. Consider chart size and value precision requirements when setting tick length - longer ticks work well for charts requiring exact value reading. Balance tick size with overall chart proportions for optimal visual hierarchy and professional appearance.
Skip
Specifies how many major tick marks to skip at the beginning of the axis. Use this property to align tick marks with specific value points or create custom tick patterns. For example, setting Skip to 2 will start tick marks from the third major position. Useful for fine-tuning tick alignment in charts with irregular value spacing or specific measurement requirements.
Step
Defines the interval between major tick marks in axis units. For numeric axes, specifies the value interval between ticks (e.g., 5 shows ticks every 5 units). For date axes, defines the time interval between ticks (e.g., weekly or monthly intervals). Use this property to control tick density and prevent overcrowding in charts with wide value ranges or detailed scales.
Visible
Controls whether major tick marks are displayed along the Y-axis. When set to true (default), tick marks appear at major value positions to provide precise reference points for data reading. Set to false to hide tick marks for cleaner chart presentation while maintaining axis labels and grid lines. Hidden tick marks can create a more streamlined appearance for charts emphasizing data trends over precise value positioning.
Width
Sets the thickness of major tick marks in pixels. Use thicker lines (2-3 pixels) for prominent tick marks that stand out or thinner lines (1 pixel) for subtle reference points. This property affects the visual weight of tick marks and should complement the overall chart line thickness and value precision needs. Consider chart scale and viewing distance when choosing tick width for optimal value reading accuracy.
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