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

rough-plot

v0.0.1

Published

A tiny sketch-style visualization library.

Readme

rough-plot

A tiny sketch-style visualization library for creating hand-drawn looking charts and plots.

Installation

npm install rough-plot

Usage

Import and call rp.plot() with your data and configuration:

Bar Charts

Vertical bars:

import * as rp from "rough-plot";

const data = [
  { genre: 'Sports', sold: 275 },
  { genre: 'Strategy', sold: 115 },
  { genre: 'Action', sold: 120 },
  { genre: 'Shooter', sold: 350 },
  { genre: 'Other', sold: 150 },
];

const node = rp.plot({
  type: "barY",
  data,
  x: "genre",
  y: "sold"  
});

document.getElementById("container").append(node);

Horizontal bars:

const node = rp.plot({
  type: "barX",
  data,
  x: "sold",
  y: "genre"  
});

Stacked bars (add color field to group data):

const node = rp.plot({
  type: "barY",
  data,
  x: "month",
  y: "rainfall",
  color: "name",
});

Line Charts

Basic line:

const data = [
  { year: "1991", value: 3 },
  { year: "1992", value: 4 },
  { year: "1993", value: 3.5 },
];

const node = rp.plot({
  type: "lineY",
  data,
  x: "year",
  y: "value"
});

Multi-series with curves:

const node = rp.plot({
  type: "lineY",
  data,
  x: "month",
  y: "temperature",
  color: "city",
  curve: true,
});

Area Charts

Single series:

const node = rp.plot({
  type: "areaY",
  data,
  x: "year",
  y: "value"
});

Stacked:

const node = rp.plot({
  type: "areaY",
  data,
  x: "year",
  y: "value",
  color: "country",
  curve: true,
});

Scatter Plot

const data = [
  [10.0, 8.04],
  [8.07, 6.95],
  [13.0, 7.58],
];

const node = rp.plot({
  type: "point",
  data,
  x: d => d[0],
  y: d => d[1],
});

Pie & Donut Charts

Pie:

const node = rp.plot({
  type: "pie",
  data,
  theta: "sold",
  color: "genre"  
});

Donut:

const node = rp.plot({
  type: "pie",
  data,
  theta: "sold",
  color: "genre",
  innerRadius: 0.5  
});

Dimensions

Customize chart size and margins:

const node = rp.plot({
  type: "barY",
  width: 400,
  height: 300,
  marginLeft: 50,
  marginBottom: 50,
  marginRight: 50,
  marginTop: 5,
  data,
  x: "a",
  y: "b"
});

License

MIT