charton API / @chart-on/ui / index / placePointerTooltip
Function: placePointerTooltip()
placePointerTooltip(
bar,y,size,area):object
Defined in: ui/src/pointer-tooltip.ts:41
Where to put a tooltip of size beside the hovered bar inside area (plot css px). It goes right of the bar's slot, or left when only that side has room, so it never covers the bar; vertically it is centred on y, or at the top when y is null, and kept inside the area. Only when neither side has room does it take the roomier side, clamped into the area.
Parameters
bar
halfWidth
number
x
number
y
number | null
size
height
number
width
number
area
height
number
width
number
Returns
object
x
x:
number
y
y:
number