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

grafit-charts

v0.3.0

Published

Declarative charting library for the browser: one serializable options object describes the whole chart. Canvas 2D via a custom scene graph, zero dependencies, TypeScript. 29 series types, 6 axis types, tooltips, legend, zoom, annotations, themes, animati

Readme

Grafit charts

npm license docs

Declarative charting library for the browser: a single serializable options object describes the whole chart — data, series, axes, legend, interactivity. Rendering is done on Canvas 2D through a custom scene graph, with zero runtime dependencies. Written in TypeScript, types ship with the package.

  • 29 series types — from line/bar/area to heatmap, candlestick, treemap, sankey and gauges; 6 axis types.
  • Interactivity out of the box: tooltips, highlighting, legend with series toggling, zoom + navigator, crosshair, data selection, chart synchronization, annotations, context menu, PNG export.
  • Modular architecture: chart widgets, series, axes and features are registerable modules; your bundle contains only what you use (a line chart is ~18 KB gzip instead of ~43 KB for the whole library).
  • Themes (light/dark/custom), animations, localization, accessibility (keyboard navigation, ARIA), serializable state.

Installation

npm install grafit-charts

The package is ESM-only, with three entry points:

// 1. Batteries included — least code, the whole library in your bundle (~43 KB gzip)
import { Charts } from 'grafit-charts';
// 2. Minimal bundle — register only the modules you need (~18–20 KB gzip)
import { Charts, register } from 'grafit-charts/core';
import {
  cartesianChartModule, // chart widget (polar/standalone are separate modules)
  barSeriesModule,
  categoryAxisModule,
  numberAxisModule,
  tooltipModule, // features are modular too: legend, navigator, crosshair, ...
} from 'grafit-charts/modules';

register(cartesianChartModule, barSeriesModule, categoryAxisModule, numberAxisModule, tooltipModule);
<!-- 3. CDN without a bundler: a single file, all modules included, global Grafit -->
<script src="https://cdn.jsdelivr.net/npm/grafit-charts/dist/grafit.min.js"></script>
<script>
  Grafit.Charts.create({ ... });
</script>

More on entry points, tree-shaking and the series → module mapping in the Installation and bundle size guide; full documentation: https://plixplox.github.io/grafit-charts/

Example: bar chart

<div id="chart" style="width: 100%; height: 360px"></div>
import { Charts } from 'grafit-charts';

const chart = Charts.create({
  container: document.getElementById('chart')!,
  data: [
    { city: 'Moscow', population: 13.1 },
    { city: 'Saint Petersburg', population: 5.6 },
    { city: 'Novosibirsk', population: 1.6 },
    { city: 'Yekaterinburg', population: 1.5 },
    { city: 'Kazan', population: 1.3 },
  ],
  series: [{ type: 'bar', xField: 'city', yField: 'population', name: 'Population', cornerRadius: 4 }],
  title: { text: 'City population' },
  subtitle: { text: 'millions of people' },
});

Axes, tooltip and entrance animation are enabled automatically; the chart takes its size from the container and tracks it with a ResizeObserver. Updates go through instance methods:

await chart.updateDelta({ theme: 'dark' }); // partial update
await chart.update({ ...options, data: freshData }); // full replace (animated)
chart.destroy(); // when done

Features

  • Series: line, bar, area, scatter, bubble, histogram, heatmap, range-bar/area, box-plot, waterfall, funnel, cone-funnel, candlestick, ohlc, pie, donut, radar, nightingale, radial-column, radial-bar, treemap, sunburst, pyramid, sankey, chord, gauges
  • Axes: number, category, time, log, ordinal-time, grouped-category; crossLines, interval, label thinning
  • Interactivity: tooltips, highlighting, legend with series toggling, zoom + navigator, crosshair, chart synchronization, context menu, declarative annotations
  • More: themes (default/dark/custom), entrance animation, state (getState/setState), PNG export, keyboard navigation, localization
  • Presets: createFinancialChart, createGauge, createSparkline