Class
ChartYAxisMajorTicks

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

Constructors

ChartYAxisMajorTicks()

Declaration

cs-api-definition
public ChartYAxisMajorTicks()

Properties

ChildContent

Declaration

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

Property Value

RenderFragment

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.

Declaration

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

Property Value

string

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.

Declaration

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

Property Value

double?

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.

Declaration

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

Property Value

double?

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.

Declaration

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

Property Value

double?

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.

Declaration

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

Property Value

bool?

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.

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>