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

@zimjs/chart

v1.0.2

Published

Chart module for ZIM JavaScript Canvas Framework

Readme

Chart is a helper module for the ZIM JavaScript Canvas Framework at https://zimjs.com. Chart includes a base Graph class that BarGraph, LineGraph, LiveGraph, and PlotGraph classes use. There is also a Legend class that works with these. Other charts include PieChart, GrowthChart (with an associated GrowthWidget), and RadarGraph. A Championship class is provided for round robin tournaments. A WordCloud class makes word clounds from text copy - or from data created by the prepareWordData method.

// CHART
// A bar graph
// https://zimjs.com/020/bargraph.html
// must import zim_chart
const graph = new zim.BarGraph({
   title:"Sales of Vegetables",
   width: 700,
   // comment these out to see with light background
   backgroundColor: black,
   axisColor: light,
   gridColor: grey,
   color: lighter,
   dataColor: silver,
   // end of comment for light background
   info: {
      labelH: "Days",
      labelV: "Sales",
      dataH: {start: 1, end: 7, step: 1},
      dataV: {start: 0, end: 100, step: 10}
   },
   colors: series(purple, yellow, blue),
   data: [
      {item: "Cucumber", icon: null, dataH: [2, 3, 4, 5, 6], dataV: [10, 40, 50, 60, 20]},
      {item: "Lettuce", icon: null, dataH: [2, 3, 4, 5, 6], dataV: [70, 50, 20, 20, 40]},
      {item: "Cilantro", icon: null, dataH: [2, 3, 4, 5, 6], dataV: [20, 50, 80, 90, 50]},
   ],
   // gradients:false
});

// optionally put graph in Panel
STYLE = {infoicon: {size: 12, color: white}, onTop: false, collapse: true, titleBar: "Bar Graph", draggable: true};
new Panel(graph.width, graph.height + 30, graph).center();

// optionally put legend in Panel
const legend = new zim.Legend(graph);
STYLE = {infoicon: {size: 12, color: white}, collapse: true, titleBar: "Legend", draggable: true};
new Panel(legend.width + 20, legend.height + 30, legend).pos(60, 50, RIGHT, BOTTOM);
STYLE = {}
import zim from "https://zimjs.org/cdn/016/zim_chart";
  • https://zimjs.com/020/linegraph.html - Line Graph
  • https://zimjs.com/020/bargraph.html - Bar Graph
  • https://zimjs.com/020/plotgraph.html - Plot Graph
  • https://zimjs.com/020/piechart.html - Pie Chart
  • https://zimjs.com/020/radargraph.html - Radar Graph
  • https://zimjs.com/020/livegraph.html - Live Graph
  • https://zimjs.com/020/growthchart.html - Growth Chart
  • https://zimjs.com/020/wordcloud.html - Word Cloud
  • https://zimjs.com/020/championship.html - Championship Round Robin Tournament
import zim from "zimjs"
import { BarGraph } from "@zimjs/chart"