Class ChartAxisMajorTickLines
Represents the options to customize the major tick lines of a chart axis in the Syncfusion Blazor chart.
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartAxisMajorTickLines : ChartSubComponent, ISubcomponentTracker
Constructors
ChartAxisMajorTickLines()
Declaration
public ChartAxisMajorTickLines()
Properties
Color
Gets or sets the color of the major tick line.
Declaration
public string Color { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the color of the major tick line. The default major tick line color is determined by the chart's theme. By default, the theme is set to Material with a major tick line color of #b5b5b5. |
Remarks
Use valid hex or rgba CSS color strings for the color value.
Examples
// The following code demonstrates setting a customize color for the axis major tick lines.
<SfChart>
<ChartPrimaryXAxis>
<ChartAxisMajorTickLines Color="red" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis>
<ChartAxisMajorTickLines Color="blue" />
</ChartPrimaryYAxis>
</SfChart>
Height
Gets or sets the height of the major tick line in pixels.
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The double value representing the height of the major tick line in pixels. The default value is 5. |
Remarks
The height defines the length of the tick line extending from the axis line.
Examples
// The following code demonstrates setting a customize height for the axis major tick lines.
<SfChart>
<ChartPrimaryXAxis>
<ChartAxisMajorTickLines Height="10" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis>
<ChartAxisMajorTickLines Height="10" />
</ChartPrimaryYAxis>
</SfChart>
Width
Gets or sets the width of the major tick line in pixels.
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The double value representing the width of the major tick line in pixels. The default value is 1. |
Remarks
The width determines the thickness of the tick line on the chart.
Examples
// The following code demonstrates setting a customize width for the axis major tick lines.
<SfChart>
<ChartPrimaryXAxis>
<ChartAxisMajorTickLines Width="3" />
</ChartPrimaryXAxis>
<ChartPrimaryYAxis>
<ChartAxisMajorTickLines Width="3" />
</ChartPrimaryYAxis>
</SfChart>