Type Tooltip

type Tooltip struct {
	// contains filtered or unexported fields
}

Tooltip is one noninteractive Vega tooltip declaration.

Constructors

BeginTooltip#

func BeginTooltip(canvas *ui.Canvas, theme ui.Theme, viewport, anchor ui.Rect, options TooltipOptions) Tooltip

BeginTooltip creates a tooltip declaration.

Methods

Disabled#

func (tooltip Tooltip) Disabled() Tooltip

Disabled suppresses the popup for a disabled trigger.

Paint#

func (tooltip Tooltip) Paint(label string) ui.Rect

Paint renders the label and arrow on the caller-provided layer. A label wider than MaxWidth wraps. The tooltip opens on the opposite side when the requested one has no room, and its arrow follows.