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 🙏

© 2025 – Pkg Stats / Ryan Hefner

isotype-js

v0.2.0

Published

Data visualization library inspired by Otto Neurath

Downloads

54

Readme

Isotype JS

Visualize numbers with meaningful icons – inspired by Otto Neurath’s ISOTYPE system.

npm bundle license


✨ Features

  • Built with TypeScript – includes full typings out-of-the-box
  • Fluent builder API (IsotypeChart.create(container))
  • SVG/HTML renderer – export as inline SVG or plain DOM icons
  • 12+ chart flavours (bar, comparative, timeline, matrix, proportional, population-pyramid, …)
  • Built-in responsive & accessibility utilities
  • Flexible theming & animation engine (GSAP / CSS)
  • Plugin API for custom projections, symbol packs, data transforms

📦 Installation

# npm
npm install isotype-js
# yarn
yarn add isotype-js
# pnpm
pnpm add isotype-js

If you prefer a direct <script> tag, grab the UMD build:

<script src="https://unpkg.com/isotype-js/dist/index.umd.js"></script>

The UMD build auto-registers window.Isotype.


🏗️ Quick Start (Vanilla JS)

<div id="chart"></div>
<script type="module">
  import { IsotypeChart } from 'isotype-js';

  const data = [
    { label: 'Cats', value: 36 },
    { label: 'Dogs', value: 24 },
    { label: 'Rabbits', value: 12 },
  ];

  // Classic constructor
  new IsotypeChart({
    container: '#chart',
    data,
    type: 'pictorial-unit',
    symbols: {
      primary: '🐾'
    }
  });
</script>

<!-- Or with the fluent builder API -->
<script type="module">
  import { IsotypeChart } from 'isotype-js';
  import { animals } from 'isotype-js/symbols';

  IsotypeChart.create('#chart')
    .data(data)
    .type('pictorial-unit')
    .symbols(animals.paw, { scale: 1 })
    .tooltip('<b>{label}</b><br/>{value} animals')
    .animate('fade-up')
    .render();
</script>

📚 API Docs

IsotypeChart(config: IsotypeChartConfig)

Creates a new chart instance. Key config groups:

| Key | Purpose | |-----|---------| | container | CSS selector, HTMLElement or ShadowRoot target | | data | DataPoint[] or DataSet[] | | type | Chart flavour ('bar' | 'pictorial-unit' | …) | | symbols | Primary/secondary icons, arrangement, custom library | | layout | Fixed / adaptive / fluid sizing & padding | | theme | Color & typography tokens | | interactions | Hover & click behaviour, tooltips | | animation | Durations, easings, stagger values | | accessibility | Alt-text, live region announcements |

Events (EventManager)

chart.on('hover',  (e) => { /* … */ });
chart.on('click',  (e) => { /* … */ });
chart.on('drillDown', (e) => { /* … */ });

e.type is a union of 'hover' | 'hoverOut' | 'click' | 'drillDown'.

chart.off(type, callback) removes listeners. Calling with only type clears all for that type.

Methods

| Method | Description | |--------|-------------| | updateConfig(part) | Merge-update config & re-render | | updateData(data) | Replace data & re-render | | destroy() | Remove event listeners & DOM nodes |


🧩 Extending

  • Plugins – implement PluginInterface and call chart.use(MyPlugin).
  • Custom Symbols – supply raw SVG string (<path> allowed) or element.
  • Render Targets – use the low-level SymbolRenderer class to export to canvas/PDF.

🗺️ Roadmap

  • [ ] Treemap & radial symbol layouts
  • [ ] Data‐driven theming (ColorSchemes)
  • [ ] Official Vue wrapper

📝 License

MIT © 2025 Luca Mack & contributors