Function: ChartLegendContent()
@arolariu/components / ChartLegendContent
Function: ChartLegendContent()
ChartLegendContent(
__namedParameters):Element
Defined in: components/ui/chart.tsx:413
Renders shared legend content for charts configured with ChartContainer.
Parameters
__namedParameters
ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & object & DefaultLegendContentProps & Omit<PresentationAttributesAdaptChildEvent<any, ReactElement<unknown, string | JSXElementConstructor<any>>>, keyof DefaultLegendContentProps>
Returns
Element
Remarks
- Renders a
<div>element when legend payload exists - Built on
rechartslegend payloads and shared chart config context - Honors
payload,verticalAlign,className, and the customhideIconandnameKeyprops - Ignores Recharts presentational props such as
align,layout,iconSize,iconType,formatter, and item mouse handlers because it renders custom markup
Example
<ChartLegend content={<ChartLegendContent />} />
See
// was this page useful?