Class Crosshair
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.Crosshair
- All Implemented Interfaces:
Serializable
Configure a crosshair that follows either the mouse pointer or the hovered point. By default, the crosshair is enabled on the X axis and disabled on Y axis.
In
styled mode, the crosshairs are styled in the
.highcharts-crosshair
, .highcharts-crosshair-thin
or .highcharts-xaxis-category
classes.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetColor()
getLabel()
getSnap()
getWidth()
void
setClassName
(String className) A class name for the crosshair, especially as a hook for styling.void
The color of the crosshair.void
setDashStyle
(DashStyle dashStyle) The dash style for the crosshair.void
setLabel
(CrosshairLabel label) A label on the axis next to the crosshair.void
Whether the crosshair should snap to the point or follow the pointer independent of points.void
The pixel width of the crosshair.void
The Z index of the crosshair.
-
Constructor Details
-
Crosshair
public Crosshair()
-
-
Method Details
-
getClassName
- See Also:
-
setClassName
A class name for the crosshair, especially as a hook for styling. -
getColor
- See Also:
-
setColor
The color of the crosshair. Defaults to#cccccc
for numeric and datetime axes, andrgba(204,214,235,0.25)
for category axes, where the crosshair by default highlights the whole category. -
getDashStyle
- See Also:
-
setDashStyle
The dash style for the crosshair. See series.dashStyle for possible values.Defaults to: Solid
-
getSnap
- See Also:
-
setSnap
Whether the crosshair should snap to the point or follow the pointer independent of points.Defaults to: true
-
getWidth
- See Also:
-
setWidth
The pixel width of the crosshair. Defaults to 1 for numeric or datetime axes, and for one category width for category axes. -
getZIndex
- See Also:
-
setZIndex
The Z index of the crosshair. Higher Z indices allow drawing the crosshair on top of the series or behind the grid lines.Defaults to: 2
-
getLabel
- See Also:
-
setLabel
A label on the axis next to the crosshair.
In styled mode, the label is styled with the
.highcharts-crosshair-label
class.
-