Skip to content

GemChartLegend

GemChartLegend displays a legend mapping a list of labels to their corresponding colors, typically used alongside another chart component. For example, it can be placed next to a GemPieChart or GemSunburstChart to explain which color represents which category.

GUI Model

component GemChartLegend(
  List<String> labels,
  List<String> colors,
  Boolean displayLegend
)
Name Type Description Default value
labels List<String> Labels shown in the legend.
colors List<String> Colors corresponding to each label, in the same order.
displayLegend Boolean Whether the legend is displayed.