nteract / semiotic

A data visualization framework combining React & D3
https://semioticv1.nteract.io/
Other
2.44k stars 133 forks source link

Option to modify tooltip position when exceeding viewport dimensions. #487

Closed ShadyStego closed 5 years ago

ShadyStego commented 5 years ago

Currently there is no special handling when custom tooltip content exceeds view port. Adding an option to allow that by setting a prop optimizeCustomTooltipPosition=true. In addition any resulted offset will be added as an argument to the custom tooltipContent function, in case that info is needed to further customize the tooltip position (e.g. add padding).

Current behavior:

image

New behavior: image

Currently I only enabled this for column-hover annotation type under OrFrame. If approved I can work on enabling this on all tooltip types & frames.