Class Crosshair

    • Constructor Detail

      • Crosshair

        public Crosshair()
    • Method Detail

      • getClassName

        public String getClassName()
        Returns the class name for the crosshair, especially as a hook for styling.

        Default: ""

        Since:
        11.2.0.0
      • setClassName

        public void setClassName​(String className)
        Sets the class name for the crosshair, especially as a hook for styling.
        Since:
        11.2.0.0
      • getColor

        public Color getColor()
        The color of the crosshair

        Default: #C0C0C0

        Since:
        2.1.1
      • setColor

        public void setColor​(Color color)
        The color of the crosshair
        Since:
        2.1.1
      • setColor

        public void setColor​(String color)
        The color of the crosshair
        Since:
        2.1.1
      • setColor

        public void setColor​(LinearGradient color)
        The color of the crosshair
        Since:
        2.1.1
      • setColor

        public void setColor​(RadialGradient color)
        The color of the crosshair
        Since:
        2.1.1
      • getDashStyle

        public String getDashStyle()
        Get the dash style for the crosshair.

        Defaults to "Solid"

        Returns:
        the dash style
        Since:
        2.1.1
      • setDashStyle

        public void setDashStyle​(String dashStyle)
        Set the dash style for the crosshair.

        Only the following values are allowed:

        • Solid
        • ShortDash
        • ShortDot
        • ShortDashDot
        • ShortDashDotDot
        • Dot
        • Dash
        • LongDash
        • DashDot
        • LongDashDot
        • LongDashDotDot
        Since:
        2.1.1
      • isEnabled

        public Boolean isEnabled()
        Returns enable or disable the crosshair.

        Default: null

        Since:
        11.2.0.0
      • setEnabled

        public void setEnabled​(Boolean enabled)
        Sets enable or disable the crosshair.

        Default: null

        Since:
        11.2.0.0
      • getSnap

        public boolean getSnap()
        Get whether the crosshair should snap to the point or follow the pointer independent of points.

        Defaults to true.

        Since:
        2.1.1
      • setSnap

        public void setSnap​(boolean snap)
        Set whether the crosshair should snap to the point or follow the pointer independent of points.
        Since:
        2.1.1
      • getWidth

        public Number getWidth()
        Get the pixel width of the crosshair.

        Defaults to 1

        Since:
        2.1.1
      • setWidth

        public void setWidth​(Number width)
        Set the pixel width of the crosshair.
        Since:
        2.1.1
      • getZIndex

        public Number getZIndex()
        Get 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.

        Since:
        2.1.1
      • setZIndex

        public void setZIndex​(Number zIndex)
        Set the Z index of the crosshair. Higher Z indices allow drawing the crosshair on top of the series or behind the grid lines.
        Since:
        2.1.1