downloads-graph
: An NPM Package for Download StatsPublished on June 11, 2025
I recently published a reusable React component called downloads-graph
, available on NPM. It visualizes daily download counts for any NPM package using Chart.js and React ChartJS 2.
npm install downloads-graph
Also install the required peer dependencies:
npm install react react-dom chart.js react-chartjs-2
import DownloadsGraph from "downloads-graph"; export default function App() { return ( <div style={{ height: 400 }}> <DownloadsGraph packageName="react" borderColor="blue" backgroundColor="rgba(0, 0, 255, 0.2)" /> </div> ); }
Prop | Type | Required | Description |
---|---|---|---|
packageName | string | ✅ | NPM package to visualize downloads for |
borderColor | string | ❌ | Color of the chart line |
backgroundColor | string | ❌ | Area fill under the chart line |
Made with ❤️ by Tarun Sai Srinivas. Connect on LinkedIn or explore the package on npm.