Class ChartCrosshairSettings
Provides option 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. |
Remarks
This property determines if the crosshair will be displayed on the chart when hovering over data points.
HighlightCategory
Gets or sets a value indicating whether the entire category range is highlighted when hovered over.
Declaration
public bool HighlightCategory { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
This property is applicable only to category axes.
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:
|
Remarks
This property determines how the crosshair line is displayed on the chart, allowing for customization based on user preferences.
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
Setting this property to true
aligns the horizontal crosshair with the nearest data point for improved precision.
Methods
OnInitialized()
Declaration
protected override void OnInitialized()
OnParametersSetAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |