Skip to content
Coltin Kifer edited this page Feb 1, 2023 · 10 revisions

Welcome to the recharts wiki!

Storybook (WIP)

We are attempting to use Storybook as a place to deploy and update Recharts documentation - Storybook link

FAQ

Why is my build breaking in 2.1.13 and 2.1.14?

  • d3 upgraded their libraries to be ESM only - this means that any consumer of recharts that upgraded to these patch versions of recharts that used jest or next in their projects also broke as those libraries don't support ESM. We reverted this change in 2.1.15+ due to breaking our consumers.

Why do I have a security vulnerability from d3-color?

  • Due to reverting the above, we have been on d3-color@2 which includes a ReDos security vulnerability - issue link
  • A non-breaking change is being worked on by replacing d3 libraries with victory-vendor/d3-*. Please see this blogpost from victory about them facing this issue and open sources a cjs solution to the problem.
    • victory-vendor takes some select d3 libraries at their latest -> converts them from ESM to CJS -> then adds them back to npm. This is what we are using to prevent breaking our consumers.
  • PR for vulnerability fix

Why did you remove d3 from your package.json? What is victory-vendor?

  • recharts is still very much built on d3 libraries. Please see the two questions above this one. We had to be able to upgrade d3 to avoid security vulnerabilities without breaking our consumers.
  • victory-vendor is a commonjs proxy to d3@latest published by the victory team. This allowed us to upgrade d3 without breaking those using jest or next.
  • what is next? Recharts must monitor victory-vendor as well as the d3 libraries. Recharts (and the ecosystem) may get to a point where we will have to require support for ESM. In that case we will use d3@latest and release a new major version.

Is recharts actively maintained?

  • The original creators of recharts have been extremely busy and haven't had time to spend on this library which has grown increasingly popular. As of December 2022 some contributors have come on board and started making changes. Most members are contributing out of their own time and effort, we ask that you please be mindful of that while we try to solve some of the pressing issues in the library.