Class DataPointTooltip


  • public class DataPointTooltip
    extends AbstractDataFormattingPlugin
    A tool tip label appearing next to the mouse cursor when placed over a data point's symbol. If symbols are not created/shown for given plot, the tool tip is shown for the closest data point that is within the pickingDistanceProperty() from the mouse cursor.

    CSS style class name: "chart-datapoint-tooltip-label"

    Author:
    Grzegorz Kruk TODO: extend so that label = new Label(); is a generic object and can also be overwritten with another implementation (<-> advanced interactor) additional add/remove listener are needed to edit/update the custom object based on DataPoint (for the time being private class)
    • Field Detail

      • STYLE_CLASS_LABEL

        public static final java.lang.String STYLE_CLASS_LABEL
        Name of the CSS class of the tool tip label.
        See Also:
        Constant Field Values
      • DEFAULT_PICKING_DISTANCE

        public static final int DEFAULT_PICKING_DISTANCE
        The default distance between the data point coordinates and mouse cursor that triggers showing the tool tip label.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataPointTooltip

        public DataPointTooltip()
        Creates a new instance of DataPointTooltip class with {picking distance initialized to 5.
      • DataPointTooltip

        public DataPointTooltip​(double pickingDistance)
        Creates a new instance of DataPointTooltip class.
        Parameters:
        pickingDistance - the initial value for the pickingDistance property
    • Method Detail

      • pickingDistanceProperty

        public final javafx.beans.property.DoubleProperty pickingDistanceProperty()
        Distance of the mouse cursor from the data point (expressed in display units) that should trigger showing the tool tip. By default initialized to 5.
        Returns:
        the picking distance property
      • getPickingDistance

        public final double getPickingDistance()
        Returns the value of the pickingDistanceProperty().
        Returns:
        the current picking distance
      • setPickingDistance

        public final void setPickingDistance​(double distance)
        Sets the value of pickingDistanceProperty().
        Parameters:
        distance - the new picking distance