Gets the current legend configuration options.
The current legend options including position, styling, and items
Sets the legend configuration options. Updates all visual properties and redraws the legend.
The configuration options to apply
Gets whether the legend is currently visible.
True if the legend is visible, false otherwise
Sets the visibility of the legend. Shows or hides the legend and triggers necessary updates.
True to show the legend, false to hide it
Gets the current background opacity of the legend.
The opacity value between 0.0 and 1.0
Sets the background opacity of the legend.
Opacity value between 0.0 (transparent) and 1.0 (opaque)
Gets the current background color of the legend.
The background color as a CSS color string
Sets the background color of the legend.
The background color as a CSS color string
Gets the current text color for legend labels.
The text color as a CSS color string
Sets the text color for all legend labels.
The text color as a CSS color string
Gets the current font family for legend text.
The font family name
Sets the font family for all legend text.
The font family name
Gets the current font size for legend text.
The font size in pixels
Sets the font size for all legend text.
The font size in pixels
Gets the current size of legend icons.
The icon size in pixels (width and height)
Sets the size of all legend icons.
The icon size in pixels (applies to both width and height)
Gets the current rotation angle of the legend.
The rotation angle in radians
Sets the rotation angle of the legend.
The rotation angle in radians
Gets the current canvas/screen position of the legend.
Object containing x and y coordinates in canvas space
Gets the current world/3D position of the legend.
Object containing x, y, and z coordinates in world space
Gets the event dispatcher for legend options changes. Subscribe to this event to be notified when legend options are modified.
Event that fires when legend options change
Adds a new item to the legend display.
The legend item to add
Sets the legend position using canvas/screen coordinates. Automatically calculates the corresponding world position.
The X coordinate in canvas/screen space
The Y coordinate in canvas/screen space
Sets the legend position using world/3D coordinates. Automatically calculates the corresponding canvas position.
The X coordinate in world space
The Y coordinate in world space
The Z coordinate in world space
Class managing legend on a canvas.