Creating interactive and visually appealing charts is an essential skill for developers working on modern web applications.
In this article I've compiled some of the most useful React Data Visualization and graphics libraries that you could use to speed up your development.
1. Chart.js
Chart.js provides a set of frequently used chart types, plugins, and customization options. In addition to a reasonable set of built-in chart types, you can use additional community-maintained chart types.
Why Chart.js?
Chart.js is highly customizable with custom plugins to create annotations, zoom, or drag-and-drop functionalities to name a few things.
Chart.js is currently the most popular one according to GitHub stars (~60,000) and npm downloads (~2,400,000 weekly).
Source: https://www.chartjs.org/
2. D3
D3 (or D3.js) is a free, open-source JavaScript library for visualizing data.
Its low-level approach built on web standards offers unparalleled flexibility in authoring dynamic, data-driven graphics. For more than a decade D3 has powered groundbreaking and award-winning visualizations, become a foundational building block of higher-level chart libraries, and fostered a vibrant community of data practitioners around the world.
Looking for a good D3 example? : https://observablehq.com/@d3/gallery?utm_source=d3js-org&utm_medium=hero&utm_campaign=try-observable
Source: https://d3js.org/
3. Recharts
Recharts is a composable, reliable and powerful charting library built on React components and D3 submodules. It allows you to customize your chart by tweaking component props and passing in custom components.
Source: https://recharts.org/en-US/
4. Victory Charts
Victory Charts are composable React components for building interactive data visualizations.
Designed by Formidable, Victory provides an easy-to-use yet powerful interface for crafting sophisticated charts with React.
Crafting Your First Victory Component
<VictoryPie
data={[
{ x: "Cats", y: 35 },
{ x: "Dogs", y: 40 },
{ x: "Birds", y: 55 }
]}
/>
Top comments (4)
Nivo also good....
nivo.rocks/
I’ll check. Thanks.
Have you played around with Apache Echarts? echarts.apache.org
If so, what was your reason for not adding it. If not, why not?
I didn't know it before. I'll use it and update the article. Thanks for the suggestion.