Skip to content
DataInteractive playground

Chart

Recharts charts with Kivora colors and tooltips.

Preparing the playground…
Text and Markdown example
Chart · Example
1<ChartContainer config={{visits:{label:"Visits",color:"#6558e8"}}} style={{width:"100%",height:240}}><BarChart data={[{day:"Mon",visits:120},{day:"Tue",visits:180},{day:"Wed",visits:145},{day:"Thu",visits:240},{day:"Fri",visits:310}]}><XAxis dataKey="day" /><ChartTooltip content={<ChartTooltipContent />} /><Bar dataKey="visits" fill="var(--color-visits)" radius={6} /></BarChart></ChartContainer>
Read documentation in Markdown

How to use it

ChartContainer provides visual context; configure series using label and color. Give the chart an explicit height.

BarChart, Bar and XAxis come from recharts. Install recharts as a direct dependency if you import them in your application.

Import

React / Next.js
1import { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend } from "@kivora/nextjs";

Interactive examples run inside a component with "use client". The playground's Copy button includes the imports needed for the current example.

API reference 0.2.0

Types from the installed published version, including component properties and common HTML attributes. “Optional” does not imply a default value; omitting a property lets the component decide.

PropertyTypeDescription
aria-labelstringAccessible name of the control.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
configChartConfigAssociate chart series with labels and colors.
defaultCheckedbooleanInitial selection of the control.
defaultValuestring | number | readonly string[]Initial value when the component manages its own state.
idstringElement identifier; associates labels and descriptions.
onChangeChangeEventHandler<HTMLDivElement, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClickMouseEventHandler<HTMLDivElement>Action performed when the element is activated.
onSubmitSubmitEventHandler<HTMLDivElement>Form submission event.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
styleCSSPropertiesReact inline styles.
tabIndexnumberKeyboard focus order and availability.
titlestringTitle or supplementary information.

Subcomponents and composition

Review each component's properties and published declaration. Native and accessibility attributes are inherited from the element specified by its type.

ChartContainer14 properties
ChartContainer · TypeScript
1ChartContainer: React.ForwardRefExoticComponent<ChartContainerProps & React.RefAttributes<HTMLDivElement>>
ChartTooltip29 properties
PropertyTypeDescription
activebooleanIf true, then Tooltip is always displayed, once an activeIndex is set by mouse over, or programmatically. If false, then Tooltip is never displayed. If undefined, Recharts will control when the Tooltip displays. This includes mouse and keyboard controls.
allowEscapeViewBoxAllowInDimensionThis option allows the tooltip to extend beyond the viewBox of the chart itself.
animationDurationnumberSpecifies the duration of animation, the unit of this option is ms.
animationEasingEasingInputThe type of easing function.
axisIdAxisIdTooltip always attaches itself to the "Tooltip" axis. Which axis is it? Depends on the layout: - horizontal layout -> X axis - vertical layout -> Y axis - radial layout -> radial axis - centric layout -> angle axis Tooltip will use the default axis for the layout, unless you specify an axisId.
contentContentType<ValueType, NameType>Renders the content of the tooltip. This should return HTML elements, not SVG elements. - If not set, the {@link DefaultTooltipContent } component is used. - If set to a React element, this element will be cloned and extra props will be passed in. - If set to a function, the function will be called and should return HTML elements.
contentStyleCSSPropertiesCSS styles to be applied to the wrapper `div` element.
cursorCursorDefinitionIf set false, no cursor will be drawn when tooltip is active. If set a object, the option is the configuration of cursor. If set a React element, the option is the custom react element of drawing cursor.
defaultIndexnumber | TooltipIndexConfigures defaultIndex. The type describes the supported values and structure.
filterNullbooleanWhen an item of the payload has value null or undefined, this item won't be displayed.
formatter(Formatter<ValueType, NameType> & ((value: ValueType, name: NameType, item: TooltipPayloadEntry, index: number, payload: TooltipPayload) => ReactNode | [ReactNode, ReactNode]))Function to customize the value in the tooltip. If you return an array, the first entry will be the formatted "value", and the second entry will be the formatted "name"
includeHiddenbooleanIf true, the tooltip will display information about hidden series. Defaults to false. Interacting with the hide property of Area, Bar, Line, Scatter.
isAnimationActiveboolean | "auto"If set false, animation of tooltip will be disabled. If set "auto", the animation will be disabled in SSR and will respect the user's prefers-reduced-motion system preference for accessibility.
itemSorter(TooltipItemSorter<ValueType, NameType> & TooltipItemSorter)Sorts tooltip items. Defaults to 'name' which means it sorts alphabetically by graphical item `name` property.
itemStyleCSSPropertiesStyle of individual items inside the tooltip, a `<li>` element. These show the data label (name, or dataKey) and value. If a chart has multiple graphical items then the Tooltip renders multiple item and each of them gets this itemStyle applied.
labelClassNamestringCSS classes for the specified element.
labelFormatter(((label: ReactNode, payload: readonly Payload<ValueType, NameType>[]) => ReactNode) & ((label: ReactNode, payload: TooltipPayload) => ReactNode))The formatter function of label in tooltip.
labelStyleCSSProperties"Label" is the tooltip title. Renders once on the top of tooltip and shows categorical axis value. Even if there are multiple graphical items in the chart, only one label gets rendered. Note that "Label" in tooltip is the header, which is different from {@link Legend } where "labelStyle" are the individual items.
offsetnumber | CoordinateThe offset size between the position of tooltip and the mouse cursor position. When a number is provided, the same offset is applied to both x and y axes. When a Coordinate object is provided, you can specify different offsets for each axis (x and y as numbers)
payloadUniqByUniqueOption<TooltipPayloadEntry>Configures payloadUniqBy. The type describes the supported values and structure.
portalHTMLElement | nullIf portal is defined, then Tooltip will use this element as a target for rendering using React Portal: https://react.dev/reference/react-dom/createPortal If this is undefined then Tooltip renders inside the recharts-wrapper element.
positionPartial<Coordinate>If this field is set, the tooltip will be displayed at the specified position regardless of the mouse position. You can set a single field (x or y) and let the other field be calculated automatically based on the mouse position.
reverseDirectionAllowInDimensionConfigures reverseDirection. The type describes the supported values and structure.
separatorstringThe separator between name and value.
sharedbooleanDefines whether the tooltip is reacting to the current data point, or to all data points at the current axis coordinate. - `true`: tooltip will appear on top of all bars on an axis tick. - `false`: tooltip will appear on individual bars. Different chart types allow different modes, and have different defaults.
trigger"hover" | "click"If `hover` then the Tooltip shows on mouse enter and hides on mouse leave. If `click` then the Tooltip shows after clicking and stays active.
useTranslate3dbooleanConfigures useTranslate3d. The type describes the supported values and structure.
wrapperClassNamestringCSS classes for the specified element.
wrapperStyleCSSPropertiesCSS styles to be applied to the wrapper `div` element.
ChartTooltip · TypeScript
1ChartTooltip: typeof RechartsPrimitive.Tooltip
ChartTooltipContent17 properties
PropertyTypeDescription
activebooleanConfigures active. The type describes the supported values and structure.
aria-labelstringAccessible name of the control.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
defaultCheckedbooleanInitial selection of the control.
defaultValuestring | number | readonly string[]Initial value when the component manages its own state.
formatter((value: unknown, name: string) => ReactNode)Configures formatter. The type describes the supported values and structure.
idstringElement identifier; associates labels and descriptions.
labelReactNodeText or accessible label.
onChangeChangeEventHandler<HTMLDivElement, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClickMouseEventHandler<HTMLDivElement>Action performed when the element is activated.
onSubmitSubmitEventHandler<HTMLDivElement>Form submission event.
payload{ color?: string; dataKey?: string | number; name?: string; value?: unknown; }[]Configures payload. The type describes the supported values and structure.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
styleCSSPropertiesReact inline styles.
tabIndexnumberKeyboard focus order and availability.
titlestringTitle or supplementary information.
ChartTooltipContent · TypeScript
1declare function ChartTooltipContent({ active, className, formatter, label, payload, ...props }: ChartTooltipContentProps): React.JSX.Element | null;
ChartLegend181 properties
PropertyTypeDescription
align"center" | "left" | "right"Content alignment.
aria-labelstringAccessible name of the control.
childrenReactNodeContent or child elements of the component.
contentContentTypeRenders the content of the legend. This should return HTML elements, not SVG elements. - If not set, the {@link DefaultLegendContent } component is used. - If set to a React element, this element will be cloned and extra props will be passed in. - If set to a function, the function will be called and should return HTML elements.
dangerouslySetInnerHTML{ __html: string; }Configures dangerouslySetInnerHTML. The type describes the supported values and structure.
formatterFormatterFunction to customize how content is serialized before rendering. This should return HTML elements, or strings.
heightstring | numberOutput height.
iconSizenumberThe size of icon in each legend item.
iconType"circle" | "line" | "rect" | "none" | "cross" | "diamond" | "plainline" | "square" | "star" | "triangle" | "wye"The type of icon in each legend item.
inactiveColorstringThe color of the icon when the item is inactive.
itemSorterLegendItemSorter | nullSorts Legend items. Defaults to `value` which means it will sort alphabetically by the label. If `null` is provided then the payload is not sorted. Be aware that without sort, the order of items may change between renders!
labelStyleCSSPropertiesStyle of individual items inside the Legend, a `<span>` element. These show the data label (name, or dataKey) and value. If a chart has multiple graphical items then the Legend renders multiple item and each of them gets this itemStyle applied. Pie charts render multiple labels from a single data series. Note that this is different from {@link Tooltip }: - in Tooltip: "labelStyle" styles the title / header - in Tooltip: "itemStyle" styles the individual data points - in Legend: "labelStyle" styles the individual data points Beware of the naming inconsistency!
layout"auto" | "horizontal" | "vertical"The layout of legend items inside the legend container. When `auto` then the layout is decided based on the `position` prop: - in `left`|`right` positions, the layout is vertical - otherwise horizontal - if position is undefined, also horizontal `auto` value is new since 3.10
offsetnumberThe offset to the specified `position`. Direction of the offset depends on the position.
onAbortAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAbortCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAnimationEndAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAnimationEndCaptureAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAnimationIterationAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAnimationIterationCaptureAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAnimationStartAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAnimationStartCaptureAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAuxClickAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onAuxClickCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onBBoxUpdate((box: ElementOffset | null) => void)Callback for this event. The signature describes its arguments.
onBeforeInputAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onBeforeInputCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onBlurAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onBlurCaptureAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCanPlayAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCanPlayCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCanPlayThroughAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCanPlayThroughCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onChangeAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Change event. Check the type: some controls return an object, others a DOM event.
onChangeCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onClick((data: LegendPayload, index: number, event: MouseEvent<HTMLElement, MouseEvent>) => void)Action performed when the element is activated.
onClickCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCompositionEndAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCompositionEndCaptureAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCompositionStartAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCompositionStartCaptureAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCompositionUpdateAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCompositionUpdateCaptureAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onContextMenuAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onContextMenuCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCopyAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCopyCaptureAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCutAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onCutCaptureAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDoubleClickAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDoubleClickCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragEndAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragEndCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragEnterAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragEnterCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragExitAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragExitCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragLeaveAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragLeaveCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragOverAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragOverCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragStartAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDragStartCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDropAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDropCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDurationChangeAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onDurationChangeCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onEmptiedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onEmptiedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onEncryptedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onEncryptedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onEndedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onEndedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onErrorAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Receives errors for the application to handle.
onErrorCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onFocusAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onFocusCaptureAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onGotPointerCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onGotPointerCaptureCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onInputAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onInputCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onInvalidAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onInvalidCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onKeyDownAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onKeyDownCaptureAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onKeyPressAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onKeyPressCaptureAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onKeyUpAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onKeyUpCaptureAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadedDataAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadedDataCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadedMetadataAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadedMetadataCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadStartAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLoadStartCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLostPointerCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onLostPointerCaptureCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseDownAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseDownCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseEnter((data: LegendPayload, index: number, event: MouseEvent<HTMLElement, MouseEvent>) => void)The customized event handler of mouseenter on the items in this group
onMouseLeave((data: LegendPayload, index: number, event: MouseEvent<HTMLElement, MouseEvent>) => void)The customized event handler of mouseleave on the items in this group
onMouseMoveAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseMoveCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseOutAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseOutCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseOverAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseOverCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseUpAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onMouseUpCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPasteAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPasteCaptureAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPauseAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPauseCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPlayAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPlayCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPlayingAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPlayingCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerCancelAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerCancelCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerDownAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerDownCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerEnterAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerEnterCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerLeaveAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerLeaveCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerMoveAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerMoveCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerOutAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerOutCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerOverAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerOverCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerUpAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onPointerUpCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onProgressAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onProgressCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onRateChangeAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onRateChangeCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onResetAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onResetCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onScrollAdaptChildUIEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onScrollCaptureAdaptChildUIEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSeekedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSeekedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSeekingAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSeekingCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSelectAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Action or selection made by the user.
onSelectCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onStalledAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onStalledCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSubmitAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Form submission event.
onSubmitCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSuspendAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onSuspendCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTimeUpdateAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTimeUpdateCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchCancelAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchCancelCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchEndAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchEndCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchMoveAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchMoveCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchStartAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTouchStartCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTransitionEndAdaptChildTransitionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onTransitionEndCaptureAdaptChildTransitionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onVolumeChangeAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onVolumeChangeCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onWaitingAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onWaitingCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onWheelAdaptChildWheelEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
onWheelCaptureAdaptChildWheelEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>Callback for this event. The signature describes its arguments.
payloadUniqByUniqueOption<LegendPayload>Configures payloadUniqBy. The type describes the supported values and structure.
portalHTMLElement | nullIf portal is defined, then Legend will use this element as a target for rendering using React Portal. If this is undefined then Legend renders inside the recharts-wrapper element.
positionCartesianPositionThe position of the legend relative to the chart. If this is defined, it overrides `align` and `verticalAlign`.
verticalAlign"top" | "bottom" | "middle"Configures verticalAlign. The type describes the supported values and structure.
widthstring | numberOutput width.
wrapperStyleCSSPropertiesCSS styles to be applied to the wrapper `div` element.
ChartLegend · TypeScript
1ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>
API generated from @kivora/nextjs 0.2.0View package