zui docs v0.0.5
GitHub ↗
Charts and visualization Native Qt

Legend

Legend is a native Zui component in the charts and visualization catalog, with 14 component-specific properties.

Usage

Ruby example

Paste this complete Builder example inside the app surface from the Quickstart. Replace illustrative asset paths with files from your project.

Ruby
legend [{ label: "Ruby", color: "#b7ff5a" }, { label: "Qt", color: "#66e3ff" }, { label: "QML", color: "#a88bff" }], orientation: :horizontal, interactive: true
API

Component properties

14 component-specific values, plus shared item and layout properties.

itemsItems configuration for Legend.property
orientationOrientation configuration for Legend.property
spacingSpacing configuration for Legend.property
marker_sizeMarker size configuration for Legend.property
widthWidth configuration for Legend.property
heightHeight configuration for Legend.property
backgroundBackground configuration for Legend.property
foregroundForeground configuration for Legend.property
mutedMuted configuration for Legend.property
font_familyFont family configuration for Legend.property
font_sizeFont size configuration for Legend.property
interactiveInteractive configuration for Legend.property
selectedSelected configuration for Legend.property
visibleVisible configuration for Legend.property
Show 14 shared item properties
enabledopacityscalerotationzfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

Subscribe with on widget, :event and keep behavior in Ruby.

selectNative event payload
hoverNative event payload