unstale

npm / recharts

recharts

What changed in recharts 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

2 breaking4 deprecations45 new APIs and options5 performance11 behavior and defaults3 tooling71 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

recharts 3141 changes

Breaking changes 2

  • The previous align prop is replaced by position and offset.

    3.10.0release notes

  • The previous verticalAlign prop is replaced by position and offset.

    3.10.0release notes

Deprecations 4

  • Cell is deprecated and will be removed in the next major version; migrate its usage to the shape prop of the respective chart elements.

    3.7.0release notes

  • Deprecates CartesianAxis.

    3.6.0release notes

  • Pie activeShape is deprecated; use shape and the isActive prop passed from its callback to create active Pie sectors.

    3.5.0release notes

  • Pie inactiveShape is deprecated in favor of the shape prop.

    3.5.0release notes

New APIs and options 45

  • Legend now supports offset for more convenient positioning.

    3.10.0release notes

  • Legend now supports position for more convenient positioning, replacing the previous align and verticalAlign props.

    3.10.0release notes

  • Sankey now supports the accessibilityLayer prop.

    3.10.0release notes

  • Sankey now supports the desc prop.

    3.10.0release notes

  • Sankey now supports the title prop.

    3.10.0release notes

  • XAxis supports height="auto" to size the axis to its tick labels.

    3.10.0release notes

  • Animations are now fully customizable, with new animation props and fixes to existing animation behavior.

    3.9.0release notes

  • The interpolate function is exported and documented for use with animations.

    3.9.0release notes

  • ResponsiveContainer now allows HTML attributes to be passed through.

    3.9.0release notes

  • Treemap adds nodeInset and nodeGap properties for layout control.

    3.9.0release notes

  • The hook is annotated as available since 3.9.

    3.9.0release notes

  • Chart layout hooks and layout types are exposed in the public API.

    3.9.0release notes

  • Adds the cursor prop type to BaseChartProps.

    3.8.1release notes

  • Area gains external generics.

    3.8.0release notes

  • Bar gains generic types.

    3.8.0release notes

  • The data prop supports generics, allowing chart data to be validated by TypeScript.

    3.8.0release notes

  • Chart props gain event throttling controls.

    3.8.0release notes

  • Graphical items and charts gain optional explicit generics.

    3.8.0release notes

  • Legend adds a label style prop.

    3.8.0release notes

  • A typed charts helper is added.

    3.8.0release notes

  • The new niceTIcks prop accepts 'none', 'auto', 'equidistant', or 'nice' to select tick behavior.

    3.8.0release notes

  • A new hook returns the current tooltip coordinate.

    3.7.0release notes

  • A new hook returns whether the tooltip is active.

    3.7.0release notes

  • The axis type can now be auto, which selects category for categorical axes and number for numeric axes.

    3.7.0release notes

  • Exports AxisInterval from the public API.

    3.6.0release notes

  • Enables ranged stacked bars.

    3.6.0release notes

  • Exports BarRectangleItem from the public API.

    3.6.0release notes

  • Adds a component for configuring settings, such as radius, for a whole stack of bars.

    3.6.0release notes

  • Exports DataKey from the public API.

    3.6.0release notes

  • Exports the type for the Pie shape function.

    3.6.0release notes

  • Adds graphicalItemId to the tooltip payload object.

    3.6.0release notes

  • Exports TooltipIndex from the public API.

    3.6.0release notes

  • Exports TreemapNode from the public API.

    3.6.0release notes

  • Adds the equidistantPreserveEnd interval option for XAxis and YAxis.

    3.6.0release notes

  • The ActiveDotProps type is now exported for use in TypeScript code.

    3.5.0release notes

  • The DotItemDotProps type is now exported for use in TypeScript code.

    3.5.0release notes

  • Stacked charts now support reverseStackOrder, fixing a regression between Recharts 2 and 3.

    3.5.0release notes

  • Pie now accepts shape to customize sector shapes in line with other chart elements; use the isActive prop passed to the callback to create active sectors.

    3.5.0release notes

  • Exported DefaultZIndexes so it can be imported by developers.

    3.4.1release notes

  • Exported ZIndexLayer so it can be imported by developers.

    3.4.1release notes

  • Line adds a shape property for custom shape implementations.

    3.4.0release notes

  • Sankey supports left-aligned nodes through the align prop.

    3.4.0release notes

  • Sankey supports top-aligned nodes through the verticalAlign prop.

    3.4.0release notes

  • Many chart components now support z-index ordering, allowing Recharts elements to be positioned like CSS elements.

    3.4.0release notes

  • Add the responsive prop to any chart with a height and width, avoiding the need to wrap it in ResponsiveContainer.

    3.3.0release notes

Performance 5

  • Avoids exponential depth traversal on dense graphs, improving Sankey graph processing.

    3.9.2release notes

  • ScatterChart hover reduces re-renders from O(n) to O(1).

    3.9.1release notes

  • Tree-shaking improvements and removal of unnecessary loops reduce the final bundle size.

    3.9.0release notes

  • Pie charts skip minAngle redistribution when no segment needs it.

    3.8.1release notes

  • This release includes performance improvements, including optimizing SetTooltipEntrySettings to break an infinite rendering loop.

    3.5.0release notes

Behavior and default changes 11

  • PieChart adds dataKey to the Legend payload.

    3.9.0release notes

  • Updates tick calculation and domain extension.

    3.8.1release notes

  • Bar supports CSS transitions.

    3.8.0release notes

  • Primitive animations are automatically disabled based on user system preferences.

    3.8.0release notes

  • Tooltip closes on blur.

    3.8.0release notes

  • Bar stack radius is now applied to active bars.

    3.7.0release notes

  • The offset prop now accepts a Coordinate object.

    3.7.0release notes

  • The Tooltip activeLabel type is now string | number; this may break code that relied on it being a string.

    3.5.1release notes

  • The immutable check is disabled in production, removing console warnings.

    3.5.0release notes

  • Stacked bar animations are improved.

    3.4.0release notes

  • ResponsiveContainer now shrinks only in the dimensions where shrinking is needed.

    3.3.0release notes

Tooling 3

  • The dataKey prop supports generics, allowing chart data to be validated by TypeScript.

    3.8.0release notes

  • Type definitions for LabelList and Area are enhanced.

    3.8.0release notes

  • Area.label now has a specific type instead of any.

    3.5.0release notes

Fixes and other changes 71

  • Tooltip search falls back to index-based search when label-based search returns undefined with allowDuplicatedCategory=false.

    3.10.1release notes

  • Pie passes computed innerRadius and outerRadius to Label children via PolarLabelContextProvider.

    3.10.1release notes

  • Keeps barGap correct when maxBarSize clamps the bar width.

    3.10.1release notes

  • Stale active bar layer state is cleared.

    3.10.0release notes

  • connectNulls no longer connects across stacked points where every series is null.

    3.10.0release notes

  • Floating-point tick gaps no longer cause getBandSizeOfAxis to collapse band size.

    3.10.0release notes

  • Controlled startIndex and endIndex no longer cause the brush to snap back on mouseup or be lost on data updates.

    3.10.0release notes

  • Custom label content now receives computed position attributes.

    3.10.0release notes

  • The Legend type is fixed.

    3.10.0release notes

  • Tooltip now finds the active sector in the angle-axis wrap-around gap.

    3.10.0release notes

  • The legend icon aria-label omits empty values.

    3.9.1release notes

  • Fixes the formatter prop for individual graphical items.

    3.9.1release notes

  • Removes a trailing duplicate tick when allowDecimals is false.

    3.9.1release notes

  • Sankey nodes no longer overlap links that skip depths.

    3.9.1release notes

  • Explicit ticks render when a non-literal domain cannot resolve on empty data.

    3.9.1release notes

  • Tooltip dispatch in Bar now uses originalDataIndex.

    3.9.0release notes

  • Stacked bars now render when all values are zero.

    3.9.0release notes

  • Prevents a NaN coordinate layout crash when all values are zero.

    3.9.0release notes

  • Legend no longer overlaps the chart when the container is resized.

    3.9.0release notes

  • Fixes an erroneous console warning during initialization.

    3.9.0release notes

  • Prevents NaN node positions when link values sum to zero.

    3.9.0release notes

  • Tooltips now preserve valid falsy custom names such as 0 and the empty string.

    3.9.0release notes

  • Axis padding is no longer ignored by the clipping mask when allowDataOverflow is enabled with a restricted domain.

    3.9.0release notes

  • Uses entry.value for the aria-label when a formatter returns a React element.

    3.8.1release notes

  • Restores arrow key navigation when the active index is outside the zoomed range.

    3.8.1release notes

  • Resolves keyboard navigation and tooltip issues for Pie charts.

    3.8.1release notes

  • Fixes a double padding gap when a data item has value 0.

    3.8.1release notes

  • Updates the ticks prop type for PolarRadiusAxis.

    3.8.1release notes

  • Prevents tooltip flicker with syncMethod="value" when data arrays have mismatched lengths.

    3.8.1release notes

  • Prevents crashes when payload entries are sparse or undefined.

    3.8.1release notes

  • Prevents stackOffset="expand" from overriding the numerical XAxis domain.

    3.8.1release notes

  • Elements no longer disappear during dynamic zIndex transitions.

    3.8.1release notes

  • Active bar highlighting works with missing or null data.

    3.8.0release notes

  • Prevents animated line flicker with round or square strokeLinecap.

    3.8.0release notes

  • Mouse event typing is fixed.

    3.8.0release notes

  • Charts no longer error when onMouseEnter or onMouseLeave is undefined.

    3.8.0release notes

  • Tooltip and legend colors now synchronize with per-sector fill.

    3.8.0release notes

  • Event types for Pie and RadialBar are fixed.

    3.8.0release notes

  • Pie event handler types are fixed.

    3.8.0release notes

  • Tooltip synchronization is enabled for PieChart.

    3.8.0release notes

  • PolarAngleAxis event types are fixed.

    3.8.0release notes

  • XAxis and YAxis now respect a user-provided textAnchor prop.

    3.8.0release notes

  • Tooltip payload typing is corrected from any.

    3.8.0release notes

  • Event types for XAxis and YAxis are updated.

    3.8.0release notes

  • Fixes stackOffset=sign for charts with three or more positive values in one series.

    3.7.0release notes

  • A new type fixes the TypeScript type for Bar.shape.

    3.7.0release notes

  • Fixes a circular dependency that occurred when building with Vite.

    3.7.0release notes

  • Fixes BarStack clipPath in charts using stackOffset=sign.

    3.7.0release notes

  • The tick type is now explicit instead of any.

    3.7.0release notes

  • Rounds numbers before putting them to the DOM.

    3.6.0release notes

  • Fixes a crash when a Label is passed as content to LabelList.

    3.6.0release notes

  • Fixes duplicated or unrelated tooltip payload data when multiple Scatter elements are used in one ScatterChart.

    3.6.0release notes

  • Stores refs instead of IDs to unblock shadow DOM use cases.

    3.6.0release notes

  • The accidental eslint dependency was removed from main dependencies, so it should no longer be installed with recharts.

    3.5.1release notes

  • The Pie shape prop includes the Sector index, enabling customization of specific slices similar to activeIndex in 2.x.

    3.5.1release notes

  • In multi-Pie PieCharts with shared dataKeys, only the hovered Sector is marked active, preventing cross-Pie highlighting.

    3.5.1release notes

  • Recharts ZIndex SVG portal g tags receive tabIndex -1 to prevent extraneous focusable surfaces.

    3.5.1release notes

  • ErrorBar no longer emits a duplicate key warning when an error range has identical values.

    3.5.0release notes

  • A Legend with a portal no longer adjusts the chart margin and leaves empty space.

    3.5.0release notes

  • Line animation now works correctly when interrupted by changes unrelated to data.

    3.5.0release notes

  • Active dots no longer appear outside the graph.

    3.5.0release notes

  • Overlapping 0 and 360 ticks are prevented.

    3.5.0release notes

  • Fixes a regression that prevented Area event handlers from firing correctly.

    3.4.0release notes

  • Fixes stacked bar charts with a brush removing elements from the wrong side of the chart.

    3.4.0release notes

  • Fixes Funnel label positioning issues from the previous release.

    3.4.0release notes

  • Fixes Funnel margin calculations.

    3.4.0release notes

  • Label now allows overwriting the textAnchor prop.

    3.4.0release notes

  • Label and Text types are corrected to include only what they can actually render.

    3.4.0release notes

  • Fixes a unique key error in Sankey.

    3.3.0release notes

  • Fixes animation stutters in Treemap.

    3.3.0release notes

  • The width="auto" oscillation detection now applies only when the difference is greater than 1 pixel.

    3.3.0release notes