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

@vanduo-oss/charts

v0.0.1

Published

Standalone SVG-first chart components for Vanduo dashboards and docs

Readme

@vanduo-oss/charts

Standalone SVG-first chart components for Vanduo dashboards and documentation.

Vanduo Charts is intentionally small: data in, accessible SVG out. It covers common 2D dashboard charts without adding data fetching, dashboards, Canvas rendering, animation timelines, or a grammar-of-graphics DSL.

Install

pnpm add @vanduo-oss/charts

Usage

import { DonutChart } from '@vanduo-oss/charts';
import '@vanduo-oss/charts/css';

const chart = DonutChart({
  target: '#revenue-mix',
  data: [
    { channel: 'Product', revenue: 420 },
    { channel: 'Services', revenue: 180 },
    { channel: 'Support', revenue: 90 }
  ],
  label: 'channel',
  value: 'revenue',
  title: 'Revenue mix',
  tooltip: d => `${d.channel}: ${d.revenue}`,
  onSliceClick: ({ datum }) => console.log(datum)
});

chart.update({ data: nextData });
chart.resize();
chart.destroy();

Chart Factories

  • BarChart({ target, data, x, y })
  • LineChart({ target, data, x, y })
  • AreaChart({ target, data, x, y })
  • ScatterChart({ target, data, x, y })
  • DonutChart({ target, data, label, value })
  • PieChart({ target, data, label, value })

Accessors can be field names, nested paths, or functions:

BarChart({ target: '#chart', data, x: 'month', y: d => d.sales });

Vanduo Auto Init

The browser bundle exposes window.VanduoCharts. If window.Vanduo is present, it self-registers as the charts component, so Vanduo v1.4 scoped lifecycle calls work:

<script type="application/json" id="revenue-data">
[
  { "channel": "Product", "revenue": 420 },
  { "channel": "Services", "revenue": 180 }
]
</script>

<div
  data-vd-chart="donut"
  data-vd-chart-data="#revenue-data"
  data-vd-label="channel"
  data-vd-value="revenue"
  data-vd-title="Revenue mix">
</div>
Vanduo.init(root);
Vanduo.destroy(root);
Vanduo.reinit('charts', root);

Auto-init supports field-name accessors. Use the imported JS API for callback accessors and event handlers.

Theme

The renderer reads Vanduo CSS tokens from the chart target:

  • --vd-text-primary
  • --vd-text-muted
  • --vd-border-color
  • --vd-bg-primary
  • --vd-chart-1 through --vd-chart-8

Compatibility aliases such as --text-primary and --border-color are used as fallbacks. Built-in colors are used if no Vanduo tokens are present.

API Notes

Every chart instance exposes:

  • update(options) - merge new options and render again
  • resize() - measure the target and render again
  • destroy() - remove SVG, tooltip, observers, and DOM state

Useful primitive exports:

  • createAccessor
  • scaleLinear
  • scaleBand
  • scalePoint
  • scaleTime
  • scaleOrdinal
  • resolveTheme

License

MIT