public final class Positioner extends Object
Modifier and Type | Method and Description |
---|---|
static Positioner |
get()
Singleton object to get the tooltip positioner instance
|
IsTooltipPosition |
getTooltipPosition(String name)
Returns the tooltip positioner implementation by tooltip position name.
|
boolean |
hasTooltipPosition(String name)
Returns
true if the custom positioner has been registered, otherwise false . |
void |
register(TooltipPositioner positioner)
Register the tooltips positioner to CHART.JS.
|
void |
unregister(CustomTooltipPosition position)
Unregister the tooltips positioner to CHART.JS.
Pay attention that when a tooltip positioner is unregistered, if any charts, which still have the tooltip position of the positioner, will fail. |
public static Positioner get()
public boolean hasTooltipPosition(String name)
true
if the custom positioner has been registered, otherwise false
.name
- the name of custom tooltip position to use in the tooltiptrue
if the custom positioner has been registered, otherwise false
public IsTooltipPosition getTooltipPosition(String name)
null
.name
- the name of custom tooltip position to use in the tooltipnull
.public void register(TooltipPositioner positioner)
positioner
- tooltip positioner instance to invokepublic void unregister(CustomTooltipPosition position)
position
- custom tooltip position instance