类型 Tooltip

API 文档由 Go 源码生成,内容为英文。

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

Tooltip is one noninteractive Vega tooltip declaration.

构造函数

BeginTooltip#

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

BeginTooltip creates a tooltip declaration.

方法

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.