# What changed in recharts

> 141 changes in recharts 3 from its official release notes, upgrade guides and advisories: 2 breaking, 4 deprecations, 45 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/recharts/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## recharts 3

### Breaking changes

- The previous align prop is replaced by position and offset. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- The previous verticalAlign prop is replaced by position and offset. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)

### Deprecations

- 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.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- Deprecates CartesianAxis. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Pie activeShape is deprecated; use shape and the isActive prop passed from its callback to create active Pie sectors. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Pie inactiveShape is deprecated in favor of the shape prop. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)

### New APIs and options

- Legend now supports offset for more convenient positioning. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Legend now supports position for more convenient positioning, replacing the previous align and verticalAlign props. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Sankey now supports the accessibilityLayer prop. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Sankey now supports the desc prop. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Sankey now supports the title prop. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- XAxis supports height="auto" to size the axis to its tick labels. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Animations are now fully customizable, with new animation props and fixes to existing animation behavior. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- The interpolate function is exported and documented for use with animations. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- ResponsiveContainer now allows HTML attributes to be passed through. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Treemap adds nodeInset and nodeGap properties for layout control. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- The hook is annotated as available since 3.9. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Chart layout hooks and layout types are exposed in the public API. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Adds the cursor prop type to BaseChartProps. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Area gains external generics. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Bar gains generic types. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- The data prop supports generics, allowing chart data to be validated by TypeScript. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Chart props gain event throttling controls. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Graphical items and charts gain optional explicit generics. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Legend adds a label style prop. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- A typed charts helper is added. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- The new niceTIcks prop accepts 'none', 'auto', 'equidistant', or 'nice' to select tick behavior. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- A new hook returns the current tooltip coordinate. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- A new hook returns whether the tooltip is active. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- The axis type can now be auto, which selects category for categorical axes and number for numeric axes. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- Exports AxisInterval from the public API. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Enables ranged stacked bars. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Exports BarRectangleItem from the public API. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Adds a component for configuring settings, such as radius, for a whole stack of bars. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Exports DataKey from the public API. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Exports the type for the Pie shape function. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Adds `graphicalItemId` to the tooltip payload object. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Exports TooltipIndex from the public API. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Exports TreemapNode from the public API. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Adds the `equidistantPreserveEnd` interval option for XAxis and YAxis. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- The ActiveDotProps type is now exported for use in TypeScript code. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- The DotItemDotProps type is now exported for use in TypeScript code. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Stacked charts now support reverseStackOrder, fixing a regression between Recharts 2 and 3. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- 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.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Exported DefaultZIndexes so it can be imported by developers. (3.4.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.1)
- Exported ZIndexLayer so it can be imported by developers. (3.4.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.1)
- Line adds a shape property for custom shape implementations. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Sankey supports left-aligned nodes through the align prop. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Sankey supports top-aligned nodes through the verticalAlign prop. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Many chart components now support z-index ordering, allowing Recharts elements to be positioned like CSS elements. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Add the responsive prop to any chart with a height and width, avoiding the need to wrap it in ResponsiveContainer. (3.3.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.3.0)

### Performance

- Avoids exponential depth traversal on dense graphs, improving Sankey graph processing. (3.9.2) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.2)
- ScatterChart hover reduces re-renders from O(n) to O(1). (3.9.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.1)
- Tree-shaking improvements and removal of unnecessary loops reduce the final bundle size. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Pie charts skip minAngle redistribution when no segment needs it. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- This release includes performance improvements, including optimizing SetTooltipEntrySettings to break an infinite rendering loop. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)

### Behavior and default changes

- PieChart adds dataKey to the Legend payload. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Updates tick calculation and domain extension. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Bar supports CSS transitions. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Primitive animations are automatically disabled based on user system preferences. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Tooltip closes on blur. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Bar stack radius is now applied to active bars. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- The offset prop now accepts a Coordinate object. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- The Tooltip activeLabel type is now string | number; this may break code that relied on it being a string. (3.5.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.1)
- The immutable check is disabled in production, removing console warnings. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Stacked bar animations are improved. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- ResponsiveContainer now shrinks only in the dimensions where shrinking is needed. (3.3.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.3.0)

### Tooling

- The dataKey prop supports generics, allowing chart data to be validated by TypeScript. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Type definitions for LabelList and Area are enhanced. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Area.label now has a specific type instead of any. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)

### Fixes and other changes

- Tooltip search falls back to index-based search when label-based search returns undefined with allowDuplicatedCategory=false. (3.10.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.1)
- Pie passes computed innerRadius and outerRadius to Label children via PolarLabelContextProvider. (3.10.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.1)
- Keeps barGap correct when maxBarSize clamps the bar width. (3.10.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.1)
- Stale active bar layer state is cleared. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- connectNulls no longer connects across stacked points where every series is null. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Floating-point tick gaps no longer cause getBandSizeOfAxis to collapse band size. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Controlled startIndex and endIndex no longer cause the brush to snap back on mouseup or be lost on data updates. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Custom label content now receives computed position attributes. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- The Legend type is fixed. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- Tooltip now finds the active sector in the angle-axis wrap-around gap. (3.10.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.10.0)
- The legend icon aria-label omits empty values. (3.9.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.1)
- Fixes the formatter prop for individual graphical items. (3.9.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.1)
- Removes a trailing duplicate tick when allowDecimals is false. (3.9.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.1)
- Sankey nodes no longer overlap links that skip depths. (3.9.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.1)
- Explicit ticks render when a non-literal domain cannot resolve on empty data. (3.9.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.1)
- Tooltip dispatch in Bar now uses originalDataIndex. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Stacked bars now render when all values are zero. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Prevents a NaN coordinate layout crash when all values are zero. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Legend no longer overlaps the chart when the container is resized. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Fixes an erroneous console warning during initialization. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Prevents NaN node positions when link values sum to zero. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Tooltips now preserve valid falsy custom names such as 0 and the empty string. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Axis padding is no longer ignored by the clipping mask when allowDataOverflow is enabled with a restricted domain. (3.9.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.9.0)
- Uses entry.value for the aria-label when a formatter returns a React element. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Restores arrow key navigation when the active index is outside the zoomed range. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Resolves keyboard navigation and tooltip issues for Pie charts. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Fixes a double padding gap when a data item has value 0. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Updates the ticks prop type for PolarRadiusAxis. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Prevents tooltip flicker with syncMethod="value" when data arrays have mismatched lengths. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Prevents crashes when payload entries are sparse or undefined. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Prevents stackOffset="expand" from overriding the numerical XAxis domain. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Elements no longer disappear during dynamic zIndex transitions. (3.8.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.1)
- Active bar highlighting works with missing or null data. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Prevents animated line flicker with round or square strokeLinecap. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Mouse event typing is fixed. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Charts no longer error when onMouseEnter or onMouseLeave is undefined. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Tooltip and legend colors now synchronize with per-sector fill. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Event types for Pie and RadialBar are fixed. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Pie event handler types are fixed. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Tooltip synchronization is enabled for PieChart. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- PolarAngleAxis event types are fixed. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- XAxis and YAxis now respect a user-provided textAnchor prop. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Tooltip payload typing is corrected from any. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Event types for XAxis and YAxis are updated. (3.8.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.8.0)
- Fixes stackOffset=sign for charts with three or more positive values in one series. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- A new type fixes the TypeScript type for Bar.shape. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- Fixes a circular dependency that occurred when building with Vite. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- Fixes BarStack clipPath in charts using stackOffset=sign. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- The tick type is now explicit instead of any. (3.7.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.7.0)
- Rounds numbers before putting them to the DOM. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Fixes a crash when a Label is passed as content to LabelList. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Fixes duplicated or unrelated tooltip payload data when multiple Scatter elements are used in one ScatterChart. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- Stores refs instead of IDs to unblock shadow DOM use cases. (3.6.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.6.0)
- The accidental eslint dependency was removed from main dependencies, so it should no longer be installed with recharts. (3.5.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.1)
- The Pie shape prop includes the Sector index, enabling customization of specific slices similar to activeIndex in 2.x. (3.5.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.1)
- In multi-Pie PieCharts with shared dataKeys, only the hovered Sector is marked active, preventing cross-Pie highlighting. (3.5.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.1)
- Recharts ZIndex SVG portal g tags receive tabIndex -1 to prevent extraneous focusable surfaces. (3.5.1) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.1)
- ErrorBar no longer emits a duplicate key warning when an error range has identical values. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- A Legend with a portal no longer adjusts the chart margin and leaves empty space. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Line animation now works correctly when interrupted by changes unrelated to data. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Active dots no longer appear outside the graph. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Overlapping 0 and 360 ticks are prevented. (3.5.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.5.0)
- Fixes a regression that prevented Area event handlers from firing correctly. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Fixes stacked bar charts with a brush removing elements from the wrong side of the chart. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Fixes Funnel label positioning issues from the previous release. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Fixes Funnel margin calculations. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Label now allows overwriting the textAnchor prop. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Label and Text types are corrected to include only what they can actually render. (3.4.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.4.0)
- Fixes a unique key error in Sankey. (3.3.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.3.0)
- Fixes animation stutters in Treemap. (3.3.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.3.0)
- The width="auto" oscillation detection now applies only when the difference is greater than 1 pixel. (3.3.0) — [release notes](https://github.com/recharts/recharts/releases/tag/v3.3.0)
