Chart Legend
Sage charts legend are used primarily in React-based Recharts bar charts when multiple bars are used for a given data point.
Default
- Last year
- This year
Sage Component
SageChartLegend
<h3>Default</h3>
<%= sage_component SageChartLegend, {
items: [
{
title: 'Last year',
color: SageTokens::COLOR_PALETTE[:YELLOW_200],
},
{
title: 'This year',
color: SageTokens::COLOR_PALETTE[:SAGE_200],
}
]
} %>
Property | Description | Type | Default |
---|---|---|---|
|
Items to show in the legend |
|
|
Do
Don't