Interface TooltipPositioner

  • All Known Implementing Classes:
    AbstractTooltipPositioner

    public interface TooltipPositioner
    Interface to be implemented to create a custom tooltip positionier in order address where the tooltip must be showed on canvas.
    Author:
    Andrea "Stock" Stocchero
    • Method Detail

      • isValid

        static boolean isValid​(TooltipPositioner tooltipPositioner)
        Returns true if tooltip positioner passed as argument is not null and its name is not null as well.
        Parameters:
        tooltipPositioner - tooltip positioner to be checked
        Returns:
        true if tooltip positioner passed as argument is not null and its name is not null
      • computePosition

        Point computePosition​(IsChart chart,
                              List<DatasetReference> items,
                              Point eventPoint)
        Applies own logic to returns the point where the tooltip must be showed.
        Parameters:
        chart - chart instance
        items - list of dataset reference items
        eventPoint - the point of event when the method has been invoked
        Returns:
        the point where the tooltip must be showed. If null, the default tooltip positioner will be used to provide a consistent point where tooltip will be showed