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.
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.propertyorientationOrientation configuration for Legend.propertyspacingSpacing configuration for Legend.propertymarker_sizeMarker size configuration for Legend.propertywidthWidth configuration for Legend.propertyheightHeight configuration for Legend.propertybackgroundBackground configuration for Legend.propertyforegroundForeground configuration for Legend.propertymutedMuted configuration for Legend.propertyfont_familyFont family configuration for Legend.propertyfont_sizeFont size configuration for Legend.propertyinteractiveInteractive configuration for Legend.propertyselectedSelected configuration for Legend.propertyvisibleVisible configuration for Legend.propertyShow 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