Tooltip Component
Description:
Tooltip is a functional component used to display tooltip content at a specified position relative to its target.
Props:
x: X-coordinate position of the tooltip.
y: Y-coordinate position of the tooltip.
children (optional): The content to be displayed within the tooltip.
style (optional): Additional CSS styles for the tooltip.
horizontalAnchor (optional): Horizontal anchor position of the tooltip: 'start' | 'center' | 'end'. Default is 'center'.
verticalAnchor (optional): Vertical anchor position of the tooltip: 'start' | 'center' | 'end'. Default is 'center'.
horizontalSpacing (optional): Horizontal spacing between the tooltip and its target.
verticalSpacing (optional): Vertical spacing between the tooltip and its target.
Example:
<Tooltip
x={100}
y={100}
horizontalAnchor="start"
verticalAnchor="end"
horizontalSpacing={10}
verticalSpacing={5}
>
{/* Tooltip content */}
</Tooltip>
Tooltip Component
Description:
Tooltip is a functional component used to display tooltip content at a specified position relative to its target.
Props:
x: X-coordinate position of the tooltip.
y: Y-coordinate position of the tooltip.
children (optional): The content to be displayed within the tooltip.
style (optional): Additional CSS styles for the tooltip.
horizontalAnchor (optional): Horizontal anchor position of the tooltip: 'start' | 'center' | 'end'. Default is 'center'.
verticalAnchor (optional): Vertical anchor position of the tooltip: 'start' | 'center' | 'end'. Default is 'center'.
horizontalSpacing (optional): Horizontal spacing between the tooltip and its target.
verticalSpacing (optional): Vertical spacing between the tooltip and its target.
Example: