npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

noteiqareachart

v1.0.7

Published

A reusable AreaChart component built with Recharts for React (works in Vite and supports React 16.8+)

Readme

noteiqareachart

A flexible React AreaChart component built with Recharts. Supports multiple areas, stacked charts, tooltips, legends, grids, reference lines, and full customization.


Installation

npm install noteiqareachart

or

yarn add noteiqareachart

Usage

import React from "react";
import AreaChart from "noteiqareachart";

const data = [
  { name: "Jan", uv: 400, pv: 240 },
  { name: "Feb", uv: 300, pv: 456 },
  { name: "Mar", uv: 200, pv: 139 },
];

const MyAreaChart = () => (
  <AreaChart
    data={data}
    xKey="name"
    width={700}
    height={300}
    areas={[
      { dataKey: "uv", stroke: "#8884d8", fill: "#8884d8", type: "monotone" },
      { dataKey: "pv", stroke: "#82ca9d", fill: "#82ca9d", type: "monotone" },
    ]}
    showTooltip
    showLegend
  />
);

export default MyAreaChart;

Props

| Prop | Type | Default | Description | | ---------------- | ------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | | data | Array (required) | [] | Data array for the chart | | width | string \| number | "100%" | Chart width | | height | number | 250 | Chart height | | xKey | string | "name" | Key for X-axis values | | areas | Array<Object> | [ { dataKey: "value", stroke: "#8884d8", fill: "#8884d8", type: "monotone" } ] | Array of area configurations. Each object maps to a <Area> in Recharts | | showGrid | boolean | true | Show Cartesian grid | | gridProps | Object | { strokeDasharray: "3 3", stroke: "#ccc" } | Props for <CartesianGrid> | | showTooltip | boolean | true | Show tooltip on hover | | tooltipProps | Object | {} | Props for <Tooltip> | | showLegend | boolean | false | Show chart legend | | legendProps | Object | {} | Props for <Legend> | | referenceLines | Array<Object> | [] | Array of reference line objects (<ReferenceLine> props) | | xAxisProps | Object | {} | Props for <XAxis> | | yAxisProps | Object | {} | Props for <YAxis> | | chartProps | Object | {} | Props for <AreaChart> |


Area Config Props

Each object in the areas array supports all <Area> props from Recharts, including:

  • Data & curve

    • dataKey (string, required)
    • type ("monotone", "linear", "step", "natural", etc.)
    • stackId (string, for stacked charts)
    • connectNulls (bool)
  • Style

    • stroke, fill, strokeWidth, strokeOpacity, fillOpacity
    • strokeDasharray, strokeLinecap, strokeLinejoin
    • legendType ("line", "square", "circle", etc.)
  • Dots & Labels

    • dot (bool, object, function, or React element)
    • activeDot (bool, object, function, or React element)
    • label (bool, object, function, or React element)
  • Animation

    • isAnimationActive, animationBegin, animationDuration, animationEasing, animationId
  • Visibility & Baseline

    • hide (bool)
    • baseLine (number, array, or function)
  • Events

    • onClick, onMouseEnter, onMouseLeave, onMouseOver, onMouseOut

Features

  • Multiple <Area> series
  • Stacked charts with stackId
  • Fully customizable X/Y axes
  • Tooltips, legends, and grid lines
  • Reference lines for thresholds
  • Full pass-through for Recharts props

Example with Stacked Areas

<AreaChart
  data={[
    { name: "Jan", uv: 400, pv: 240 },
    { name: "Feb", uv: 300, pv: 456 },
    { name: "Mar", uv: 200, pv: 139 },
  ]}
  xKey="name"
  width={700}
  height={300}
  areas={[
    { dataKey: "uv", stackId: "1", stroke: "#8884d8", fill: "#8884d8" },
    { dataKey: "pv", stackId: "1", stroke: "#82ca9d", fill: "#82ca9d" },
  ]}
  showTooltip
  showLegend
/>