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

@sixtyfold/line

v1.0.1

Published

High-performance Canvas2D line and multi-series charts for very large datasets.

Readme

@sixtyfold/line

Canvas2D line and multi-series charts built for interactive, very large time-series datasets. Worker rendering uses OffscreenCanvas when available and falls back to the main thread.

pnpm add @sixtyfold/line

Million-point quickstart

import { LineChart } from "@sixtyfold/line";

function createSignals(count = 1_000_000) {
  const x = new Float64Array(count);
  const throughput = new Float64Array(count);
  const tailLatency = new Float64Array(count);
  const saturation = new Float64Array(count);
  const start = Date.UTC(2026, 0, 1);

  for (let index = 0; index < count; index++) {
    x[index] = start + index * 1_000;
    throughput[index] = 42_000 + Math.sin(index / 4_000) * 8_000;
    tailLatency[index] = 38 + Math.sin(index / 1_100) * 7 + Math.sin(index / 29_000) * 12;
    saturation[index] = 62 + Math.sin(index / 7_500) * 14;
  }

  return {
    x,
    series: [throughput, tailLatency, saturation],
    length: count,
    seriesCount: 3,
  };
}

const chart = new LineChart(document.querySelector<HTMLCanvasElement>("canvas")!, {
  series: [
    { name: "Throughput", color: "#7ce7ff" },
    { name: "p99 latency", color: "#ffcf7a" },
    { name: "Saturation", color: "#ff5ca8" },
  ],
  lod: { mode: "adaptive", density: 0.75 },
});

await chart.initialize();
chart.setMultiSeriesData(createSignals());

// Release the worker, observers, and event handlers when the view unmounts.
// chart.destroy();

This installs one million timestamps and three million generated series values. The default auto render mode prefers an OffscreenCanvas worker and falls back to the main thread when necessary. Worker rendering transfers the typed-array buffers, so generate fresh arrays before installing the same workload into another chart.

The package is ESM-only. The renderer engine is also available from @sixtyfold/line/engine for SSR and advanced integrations.

Provide a localized canvas name and an adjacent summary or table for production charts. Keyboard semantics and framework-specific attributes are documented in the accessibility integration guide.

For live dashboards that must not rescale as new extrema arrive, construct the chart with yDomain: { min: 0, max: 100 }. Either edge may be omitted to keep that side auto-scaled; omitting yDomain preserves the default visible-data auto-scaling.

Streaming

After initialize(), call initStreaming(seriesCount, maxPoints) with positive integer dimensions. addVector(timestamp, values) requires a finite timestamp and one value per configured series. It snapshots values, so the caller may reuse the scalar array immediately.

addVectors(timestamps, valuesBySeries) requires aligned Float64Array columns and finite timestamps. It validates the complete input before flushing queued scalar samples or transferring buffers; rejected input leaves those buffers attached and queued samples unchanged. Valid scalar and bulk calls retain their order, and ring-buffer wrap preserves chronological display. Use NaN in a Y column for a gap, never in the timestamp column.

initStreaming discards queued samples from the previous stream. Resetting streaming or replacing data cancels a pending viewport animation for the old dataset so it cannot restore an obsolete X range.

Coding-agent guidance

For version-aware coding-agent guidance, connect the optional local @sixtyfold/mcp server. It is installed separately and never enters the chart runtime or browser bundle.

Third-party notices

Notices for generated runtime helper portions are in THIRD_PARTY_NOTICES.md.

Licensing

This package is source-available under the PolyForm Noncommercial License 1.0.0.

For current licensing, commercial terms, and prices, see Licensing and Commercial Terms and Pricing.