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

chartty

v0.1.1

Published

Pure JS library for making scatter plots in the terminal with braille dots

Readme

chartty

Pure JS library for making scatter plots in the terminal with braille dots

API

function plot(
    x: number[],
    y: number[],
    options?: Options,
): string;

interface Options {
    // minimum x value on plot
    xmin?: number;
    // maximum x value on plot
    xmax?: number;
    // minimum y value on plot
    ymin?: number;
    // maximum y value on plot
    ymax?: number;
    // width of plot in terminal characters [80]
    width?: number;
    // height of plot in terminal characters [24]
    height?: number;
    // whether to draw the x-axis as a line of hyphens [false]
    xaxis?: boolean;
    // whether to draw the y-axis as a line of bars [false]
    yaxis?: boolean; 
    // whether to draw the origin as a '+' [false]
    origin?: boolean; 
    // whether to draw a rectangle around the entire plot [false]
    border?: boolean;
    // number of x-axis labels to display (default 0)
    xlabels?: number;
    // number of y-axis labels to display (default 0)
    ylabels?: number; 
    // plot title centered on top line
    title?: string; 
    // name for x axis, printed on bottom of chart
    xname?: string;
    // name for y axis, printed vertically on left edge
    yname?: string
}

Vertical text is added as appropriate for x-tick labels or y-axis name by stacking characters on top of each other. Labels will all cut into the width/height dimensions of the chart, so it is recommended to use larger than the default if including labels.

Actually drawing the axes has the significant drawback that it will be impossible to draw dots on the same character as the axis lines.

The actual scatter plot is done with Braille characters, so that each character in the string can plot up to 8 different points, in a 4 (high) by 2 (wide) grid. If multiple points fall onto the same dot, it is still only drawn once - there is no way to represent more than one point in a single dot.