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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anvme/nanocharts

v1.0.3

Published

Lightweight SVG+HTML hybrid charts (line + bar + pie). Zero dependencies, typed.

Downloads

360

Readme

nanocharts

Lightweight SVG+HTML hybrid charts. Zero dependencies, typed. Line, bar & pie.

  • ~4.4 KB brotli (JS ~3.7 KB + CSS ~0.7 KB), ~12 KB minified
  • < 0.5 ms render time — innerHTML single-write, zero reflows
  • Zero dependencies
  • TypeScript declarations included
  • Dark mode via prefers-color-scheme, Bootstrap, Tailwind, or standalone
  • CSS custom properties for full theming control
  • Int16Array/Float64Array typed arrays for cache-friendly math
  • Lazy hover — tooltip & indicator DOM created only on first interaction

Live Examples

Install

npm install @anvme/nanocharts
import { NanoLineChart, NanoBarChart, NanoPieChart } from '@anvme/nanocharts';
import '@anvme/nanocharts/style.css';

CDN

<link href="https://cdn.jsdelivr.net/npm/@anvme/[email protected]/dist/style.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/@anvme/[email protected]/dist/nanocharts.min.global.js"></script>

Usage

<div id="chart" style="max-width: 600px"></div>

<script>
NanoLineChart('chart', {
  data: [[5, 12, 8, 20, 15, 25, 18]],
  labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  xLabel: 'Day',
  yLabel: 'Sales'
});
</script>
NanoBarChart('chart', {
  data: [[40, 65, 30, 80, 55]],
  labels: ['Chrome', 'Firefox', 'Safari', 'Edge', 'Other'],
  xLabel: 'Browser',
  yLabel: 'Users'
});
NanoPieChart('chart', {
  data: [40, 25, 20, 15],
  labels: ['Desktop', 'Mobile', 'Tablet', 'Other'],
  donut: true,
  donutWidth: 50
});

API

NanoLineChart(containerId, config)

| Option | Type | Default | Description | |---|---|---|---| | data | number[][] | -- | Array of series | | labels | string[] | -- | X-axis labels | | xLabel | string | '' | X-axis title | | yLabel | string | '' | Y-axis title | | colors | string[] | brand palette | Color per series | | width | number | container width | Chart width in px | | height | number | 350 | Chart height in px | | smooth | boolean | false | Catmull-Rom spline smoothing | | areaFill | boolean | false | Fill under lines | | areaOpacity | number | 0.1 | Area fill opacity | | strokeWidth | number | 2.5 | Line stroke width | | showTicks | boolean | true | Show tick labels | | showGrid | boolean | true | Show grid lines | | gridDashed | boolean | false | Dashed grid lines | | hover | boolean | true | Enable hover tooltip |

NanoBarChart(containerId, config)

| Option | Type | Default | Description | |---|---|---|---| | data | number[][] | -- | Array of series | | labels | string[] | -- | Category labels | | xLabel | string | '' | X-axis title | | yLabel | string | '' | Y-axis title | | colors | string[] | brand palette | Color per series | | width | number | container width | Chart width in px | | height | number | 350 | Chart height in px | | stacked | boolean | false | Stack series | | horizontal | boolean | false | Horizontal bars | | barGap | number | 0.2 | Gap between groups (0-1) | | showTicks | boolean | true | Show tick labels | | showGrid | boolean | true | Show grid lines | | gridDashed | boolean | false | Dashed grid lines | | hover | boolean | true | Enable hover tooltip |

NanoPieChart(containerId, config)

| Option | Type | Default | Description | |---|---|---|---| | data | number[] | -- | Value per slice | | labels | string[] | -- | Label per slice | | colors | string[] | brand palette | Color per slice | | width | number | container width | Chart width in px | | height | number | = width | Chart height in px | | donut | boolean | false | Donut mode | | donutWidth | number | 60 | Ring thickness in px | | showLabels | boolean | true | Show labels outside slices | | hover | boolean | true | Enable hover tooltip |

Dark Mode

Charts auto-adapt via prefers-color-scheme. Force dark mode with:

<html data-bs-theme="dark">   <!-- Bootstrap 5.3 -->
<html class="dark">            <!-- Tailwind -->
<div class="chart-dark">       <!-- Standalone -->

License

MIT