Skip to main content

Chart Legend

Chart Legend is a stand-alone utility that can be used to add a legend to chart components.

Live Editor
function ChartLegendExample() {
  return (
    <ChartLegend
      legendLabels={[
        {name: 'Likes'},
        {name: 'Replies'},
        {name: 'Comments'},
        {name: 'Link Clicks'}
      ]}
    />
  );
}

Properties

NameTypeDefaultDescriptionRequired?
stackedbooleanInline or stacked y plots
theme
| "compare"
| "contrast"
| "extended"
| "datavizRotation"
"datavizRotation"
legendLabelsTypeLegendLabels[]Array of names with optional color to display. If no color is specified, index of label will be used to determine color based on the theme.Yes
orientationstringOrientation of the legend
qaobject

Properties

System Props: COMMON, LAYOUT

info

Full property documentation will be added soon.