LegendItem#

LegendItem#

Constructor#

LegendItem(graphic[, label, ...])

The legend representation of a graphic, created with Graphic.create_legend_item().

Properties#

LegendItem.cmap_transform_labels

get or set the label of each cmap_transform value of a qualitative colormap

LegendItem.colorbar

the colorbar of this item, set when the graphic uses a quantitative colormap

LegendItem.elements

the elements of this item, empty when it is shown as a colorbar

LegendItem.figure

the figure this container is drawn in

LegendItem.graphic

the graphic this item represents

LegendItem.label

get or set the label of this item, the graphic's name is used if it is not set

LegendItem.legend

the legend this item has been added to

Methods#

LegendItem.check_graphic_mode()

Make the item again if the graphic switched between uniform colors, per-vertex colors and a colormap, which replaces the feature instance and clears its handlers, so there is no event to follow.

LegendItem.draw()

pushes and pops the ID to keep identical containers unique within one frame

LegendItem.update()

Implement your GUI here and it will be drawn within the host window