Class Crosshair
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.Crosshair
-
- All Implemented Interfaces:
Serializable
public class Crosshair extends AbstractConfigurationObject
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-thinor.highcharts-xaxis-categoryclasses.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Crosshair()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClassName()ColorgetColor()DashStylegetDashStyle()CrosshairLabelgetLabel()BooleangetSnap()NumbergetWidth()NumbergetZIndex()voidsetClassName(String className)A class name for the crosshair, especially as a hook for styling.voidsetColor(Color color)The color of the crosshair.voidsetDashStyle(DashStyle dashStyle)The dash style for the crosshair.voidsetLabel(CrosshairLabel label)A label on the axis next to the crosshair.voidsetSnap(Boolean snap)Whether the crosshair should snap to the point or follow the pointer independent of points.voidsetWidth(Number width)The pixel width of the crosshair.voidsetZIndex(Number zIndex)The Z index of the crosshair.
-
-
-
Method Detail
-
getClassName
public String getClassName()
- See Also:
setClassName(String)
-
setClassName
public void setClassName(String className)
A class name for the crosshair, especially as a hook for styling.
-
getColor
public Color getColor()
- See Also:
setColor(Color)
-
setColor
public void setColor(Color color)
The color of the crosshair. Defaults to#ccccccfor numeric and datetime axes, andrgba(204,214,235,0.25)for category axes, where the crosshair by default highlights the whole category.
-
getDashStyle
public DashStyle getDashStyle()
- See Also:
setDashStyle(DashStyle)
-
setDashStyle
public void setDashStyle(DashStyle dashStyle)
The dash style for the crosshair. See series.dashStyle for possible values.Defaults to: Solid
-
getSnap
public Boolean getSnap()
- See Also:
setSnap(Boolean)
-
setSnap
public void setSnap(Boolean snap)
Whether the crosshair should snap to the point or follow the pointer independent of points.Defaults to: true
-
getWidth
public Number getWidth()
- See Also:
setWidth(Number)
-
setWidth
public void setWidth(Number width)
The pixel width of the crosshair. Defaults to 1 for numeric or datetime axes, and for one category width for category axes.
-
getZIndex
public Number getZIndex()
- See Also:
setZIndex(Number)
-
setZIndex
public void setZIndex(Number zIndex)
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
public CrosshairLabel getLabel()
- See Also:
setLabel(CrosshairLabel)
-
setLabel
public void setLabel(CrosshairLabel label)
A label on the axis next to the crosshair.
In styled mode, the label is styled with the
.highcharts-crosshair-labelclass.
-
-