Class ChartCrosshairSettings
Options to customize the crosshair for the charts.
Inherited Members
Namespace: Syncfusion.Blazor.Charts
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChartCrosshairSettings : ChartSubComponent, ISubcomponentTracker
Constructors
ChartCrosshairSettings()
Declaration
public ChartCrosshairSettings()
Properties
DashArray
Gets or sets the dasharray for the crosshair.
Declaration
public string DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string representing the dasharray for the crosshair. The default value is an empty string. |
Remarks
This property allows customization of the crosshair line by specifying a dash pattern.
Enable
Gets or sets a value indicating whether the crosshair is enabled.
Declaration
public bool Enable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the crosshair is enabled; otherwise, false. The default value is false. |
Line
Gets or sets an instance of ChartCrosshairLine which controls the customization of the crosshair line of the chart.
Declaration
public ChartCrosshairLine Line { get; set; }
Property Value
Type | Description |
---|---|
ChartCrosshairLine | The default value is an instance of ChartCrosshairLine. |
Remarks
Use this property to define specific styling attributes for the crosshair line, such as color and width.
LineType
Gets or sets the line type for the crosshair.
Declaration
public LineType LineType { get; set; }
Property Value
Type | Description |
---|---|
LineType | One of the LineType enumerations that specifies the type of the crosshair line. The options include:
|
SnapToData
Enables or disables snapping of the horizontal crosshair to the nearest data point.
Declaration
public bool SnapToData { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether snapping is enabled. The default is |
Remarks
Set to true
to align the horizontal crosshair with the nearest data point for better precision.
Methods
OnInitialized()
Declaration
protected override void OnInitialized()
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |