Components
Chart Legend
Chart Legend is a stand-alone utility that can be used to add a legend to chart components.
import { ChartLegend } from '@sproutsocial/racine'
<ChartLegendlegendLabels={[{name: 'Likes'},{name: 'Replies'},{name: 'Comments'},{name: 'Link Clicks'}]}/>
Properties
Name | Type | Default | Description | Required? |
---|---|---|---|---|
stacked | boolean | Inline or stacked y plots | ||
theme | 'compare' 'contrast' 'extended' | |||
legendLabels | {
name: string,
color?: string,
} | 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. | ||
qa | Object |