Radar chart components

FREE

Powerful and customizable React radar chart components built for modern applications and websites. These radar charts are built using Recharts and styled with Tailwind CSS.

Installation

You can add this radar chart component using our CLI or manually:

npx untitledui@latest add charts-base

Radar chart examples

Below are examples and variations of this radar chart component:

API reference

ChartLegendContent

Renders the legend content for a chart.

Import ChartLegendContent from @/components/application/charts/charts-base. Renders a <ul> element.

ChartLegendContent props
PropTypeDefaultDescription
reversedboolean—Whether the legend entries are listed in the reverse of the order Recharts supplies them, so a stacked chart's legend reads in the same order as its stack.
classNamestring—Additional classes for the legend list, merged after the layout and alignment classes derived from the Recharts Legend props.
Props from recharts (170)
ChartLegendContent inherited props
PropTypeDefaultDescription
align
"center""left""right"
centerDeprecated.—
childrenReactNode——
formatterFormatter—Function to customize how content is serialized before rendering.This should return HTML elements, or strings.
iconSizenumber14The size of icon in each legend item.
iconType
"circle""cross""diamond""line""plainline""rect""square""star""triangle""wye""none"
—The type of icon in each legend item.
inactiveColorstring#cccThe color of the icon when the item is inactive.
labelStyleCSSProperties{ }Style 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 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
"vertical""horizontal"
horizontalThe layout of legend items inside the legend container.
onClick((data: LegendPayload, index: number, event: MouseEvent<HTMLElement>) => void)—The customized event handler of click on the items in this group.
payloadreadonly LegendPayload[]—DefaultLegendContent.payload is omitted from Legend props. A custom payload can be passed here if desired, or it can be passed from the Legend "content" callback.
verticalAlign
"top""bottom""middle"
middleDeprecated.—
onAbortAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAbortCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAnimationEndAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAnimationEndCaptureAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAnimationIterationAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAnimationIterationCaptureAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAnimationStartAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAnimationStartCaptureAdaptChildAnimationEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAuxClickAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onAuxClickCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onBeforeInputAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onBeforeInputCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onBlurAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onBlurCaptureAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCanPlayAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCanPlayCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCanPlayThroughAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCanPlayThroughCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onChangeAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onChangeCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onClickCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCompositionEndAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCompositionEndCaptureAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCompositionStartAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCompositionStartCaptureAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCompositionUpdateAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCompositionUpdateCaptureAdaptChildCompositionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onContextMenuAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onContextMenuCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCopyAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCopyCaptureAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCutAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onCutCaptureAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDoubleClickAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDoubleClickCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragEndAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragEndCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragEnterAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragEnterCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragExitAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragExitCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragLeaveAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragLeaveCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragOverAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragOverCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragStartAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDragStartCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDropAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDropCaptureAdaptChildDragEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDurationChangeAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onDurationChangeCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onEmptiedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onEmptiedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onEncryptedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onEncryptedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onEndedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onEndedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onErrorAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onErrorCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onFocusAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onFocusCaptureAdaptChildFocusEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onGotPointerCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onGotPointerCaptureCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onInputAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onInputCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onInvalidAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onInvalidCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onKeyDownAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onKeyDownCaptureAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onKeyPressAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onKeyPressCaptureAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onKeyUpAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onKeyUpCaptureAdaptChildKeyboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadedDataAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadedDataCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadedMetadataAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadedMetadataCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadStartAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLoadStartCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLostPointerCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onLostPointerCaptureCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseDownAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseDownCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseEnter((data: LegendPayload, index: number, event: MouseEvent<HTMLElement>) => void)—The customized event handler of mouseenter on the items in this group.
onMouseLeave((data: LegendPayload, index: number, event: MouseEvent<HTMLElement>) => void)—The customized event handler of mouseleave on the items in this group.
onMouseMoveAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseMoveCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseOutAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseOutCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseOverAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseOverCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseUpAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onMouseUpCaptureAdaptChildMouseEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPasteAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPasteCaptureAdaptChildClipboardEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPauseAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPauseCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPlayAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPlayCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPlayingAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPlayingCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerCancelAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerCancelCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerDownAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerDownCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerEnterAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerEnterCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerLeaveAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerLeaveCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerMoveAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerMoveCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerOutAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerOutCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerOverAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerOverCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerUpAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onPointerUpCaptureAdaptChildPointerEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onProgressAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onProgressCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onRateChangeAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onRateChangeCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onResetAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onResetCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onScrollAdaptChildUIEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onScrollCaptureAdaptChildUIEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSeekedAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSeekedCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSeekingAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSeekingCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSelectAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSelectCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onStalledAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onStalledCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSubmitAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSubmitCaptureAdaptChildFormEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSuspendAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onSuspendCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTimeUpdateAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTimeUpdateCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchCancelAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchCancelCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchEndAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchEndCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchMoveAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchMoveCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchStartAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTouchStartCaptureAdaptChildTouchEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTransitionEndAdaptChildTransitionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onTransitionEndCaptureAdaptChildTransitionEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onVolumeChangeAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onVolumeChangeCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onWaitingAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onWaitingCaptureAdaptChildReactEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onWheelAdaptChildWheelEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——
onWheelCaptureAdaptChildWheelEventHandler<LegendPayload, ReactElement<unknown, string | JSXElementConstructor<any>>>——

Also accepts all aria-* attributes.

ChartTooltipContent

Import ChartTooltipContent from @/components/application/charts/charts-base. Renders a <div> element.

ChartTooltipContent props
PropTypeDefaultDescription
isRadialChartboolean—Whether the tooltip belongs to a Recharts RadialBarChart. When a single point is hovered, the supporting line is read from payload[0].payload.name instead of the axis label.
isPieChartboolean—Whether the tooltip belongs to a Recharts PieChart. When a single slice is hovered, the supporting line is the slice's name instead of the axis label.
labelstring—The category label Recharts passes for the hovered position. Used as the tooltip heading when several series are active, and as the supporting line otherwise.
payloadany—The active data points Recharts passes to the Tooltip content. Each entry supplies the series name and value rendered as a row in the tooltip.
Props from recharts (29)
ChartTooltipContent inherited props
PropTypeDefaultDescription
activeboolean—If 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.
allowEscapeViewBoxAllowInDimension{ x: false, y: false }This option allows the tooltip to extend beyond the viewBox of the chart itself.
animationDurationnumber400Specifies the duration of animation, the unit of this option is ms.
animationEasingEasingInputeaseThe type of easing function.
axisIdAxisId0Tooltip 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 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.
contentStyleCSSProperties——
cursorCursorDefinitiontrueIf 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 | TooltipIndex——
filterNullbooleantrueWhen an item of the payload has value null or undefined, this item won't be displayed.
formatterFormatter<TValue, TName>——
includeHiddenbooleanfalseIf true, the tooltip will display information about hidden series. Defaults to false. Interacting with the hide property of Area, Bar, Line, Scatter.
isAnimationActive
falsetrue"auto"
autoIf 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)——
itemStyleCSSProperties——
labelClassNamestring——
labelFormatter(label: ReactNode, payload: ReadonlyArray<Payload<TValue, TName>>) => ReactNode——
labelStyleCSSProperties——
offsetnumber | Coordinate10The 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>——
portalHTMLElement | null—If 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.
reverseDirectionAllowInDimension{ x: false, y: false }—
separatorstring——
sharedboolean—Defines 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"
hoverIf hover then the Tooltip shows on mouse enter and hides on mouse leave.If click then the Tooltip shows after clicking and stays active.
useTranslate3dbooleanfalse—
wrapperClassNamestring——
wrapperStyleCSSProperties—CSS styles to be applied to the wrapper div element.

FAQs

Please refer to our frequently asked questions page for more.

Pass an array of flat objects to the data prop of the Recharts RadarChart. Each object holds one category key that labels the spoke (for example subject: "Mon") plus one numeric key per series (A, B, C). PolarAngleAxis reads the category via dataKey="subject", and each <Radar> reads one numeric key through its own dataKey.

Each series is a single <Radar> element inside the chart. Add one by adding another numeric key to every data object and rendering another <Radar dataKey="D" name="Series 4" />; remove one by deleting its <Radar>. The name prop is what appears in the legend and tooltip, so set it to the human-readable series title.

Colors come from Tailwind text utilities rather than hard-coded hex values. Each <Radar> sets stroke="currentColor" and fill="currentColor" and takes its color from a class such as text-utility-brand-600, text-utility-pink-500, or text-utility-sky-500 on className. Tune the fill translucency with fillOpacity (the example uses 0.2) and the outline weight with strokeWidth.

Yes. The chart passes our styled ChartTooltipContent into the Recharts tooltip as <Tooltip content={<ChartTooltipContent />} />. ChartTooltipContent accepts the standard Recharts tooltip props, including formatter and labelFormatter, so you can reformat values and labels without rewriting the markup. It lives in charts-base.tsx alongside ChartLegendContent and ChartActiveDot.

Render the Recharts <Legend> with our ChartLegendContent as its content: <Legend verticalAlign="bottom" align="center" layout="horizontal" content={ChartLegendContent} />. Placement is set on the <Legend> element, not on ChartLegendContent. Recharts forwards align and layout to the content component, and ChartLegendContent reads only align and layout to decide its stacking and justification, and adds reversed to flip the payload order plus className for extra styling.

Set the domain prop on PolarRadiusAxis, for example domain={[0, 1000]}, to pin the minimum and maximum of the rings instead of letting Recharts infer them. The same component takes angle to choose which spoke the tick labels sit on, axisLine={false} to hide the axis line, and a tick render function for fully custom tick labels.

Wrap the chart in the Recharts <ResponsiveContainer> with width="100%" and a fixed height, then set the chart's cx, cy, and outerRadius in percentages ("50%", "50%", and "80%" in our example) so the plot scales with its container.