Interface TooltipPositioner
-
- All Known Implementing Classes:
AbstractTooltipPositioner
public interface TooltipPositionerInterface 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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description PointcomputePosition(IsChart chart, List<DatasetReference> items, Point eventPoint)Applies own logic to returns the point where the tooltip must be showed.CustomTooltipPositiongetName()Returns the name of tooltip position which must be used in chart options.static booleanisValid(TooltipPositioner tooltipPositioner)Returnstrueif tooltip positioner passed as argument is notnulland its name is notnullas well.
-
-
-
Method Detail
-
isValid
static boolean isValid(TooltipPositioner tooltipPositioner)
Returnstrueif tooltip positioner passed as argument is notnulland its name is notnullas well.- Parameters:
tooltipPositioner- tooltip positioner to be checked- Returns:
trueif tooltip positioner passed as argument is notnulland its name is notnull
-
getName
CustomTooltipPosition getName()
Returns the name of tooltip position which must be used in chart options.- Returns:
- the name of tooltip position.
- See Also:
Tooltips.setPosition(org.pepstock.charba.client.enums.IsTooltipPosition)
-
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 instanceitems- list of dataset reference itemseventPoint- the point of event when the method has been invoked- Returns:
- the point where the tooltip must be showed. If
null, the tooltip will be closed.
-
-