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

@texuli/charts

v0.18.0

Published

Chart math and every chart family, one lazy subpath per family.

Readme

@texuli/charts

Accessible Svelte 5 charts and the framework-free chart math behind them. Line, area, bar, pie, treemap, heatmap, Sankey, gauge, box plot and more: every family is its own lazy subpath, every chart renders an accessible summary and a data-table fallback, and the scales, shapes and layouts are plain TypeScript you can use without any component. It is part of Texuli, "Small pieces. Infinite possibilities.": an MIT Svelte 5 component library by Dailybot, Inc., for application developers and for agents that render charts from validated data.

In the stack: layer L4, a domain package on the @texuli/core texels, @texuli/primitives, the @texuli/tokens token engine and the texuli components. @texuli/blocks, the agent catalog, the player and @texuli/tools build on it.

Status: 0.x release. @texuli/charts is published on npm as 0.18.0, a pre-1.0 release (1.0.0 will be the first stable release). Under 0.x, a new minor (0.14.0) may contain breaking changes, so pin the exact version or use ^0.18.0, which accepts only 0.18.x.

Install

npm install @texuli/charts @texuli/tokens svelte
  • svelte (^5.57.2) is a peer dependency.
  • Charts style themselves with the Texuli --tx-* design tokens. Import the token stylesheet once in your app (installing @texuli/tokens directly lets your bundler resolve it); each chart imports its own component CSS.
@import '@texuli/tokens/base.css';

Quick start

<script lang="ts">
  import { LineChart, type CartesianSeries } from '@texuli/charts/cartesian';

  const series: CartesianSeries[] = [
    {
      id: 'signups',
      label: 'Sign-ups',
      points: [
        { x: 'Jan', y: 120 },
        { x: 'Feb', y: 180 },
        { x: 'Mar', y: 165 },
      ],
    },
  ];
</script>

<LineChart
  title="Monthly sign-ups"
  description="Sign-ups rose in February and held steady in March."
  {series}
/>

title and description are required: they become the chart's accessible name and summary. The math works on its own, with no Svelte:

import { linearScale, lttbIndices } from '@texuli/charts/math';

const y = linearScale({ domain: [0, 180], range: [320, 0], nice: true });
y(90); // pixel position
y.ticks(5); // tick values

const keep = lttbIndices(xs, ys, 500); // downsample a long series to 500 points

What's inside

Chart families (Svelte components):

| Import | What it gives you | | --- | --- | | @texuli/charts/cartesian | LineChart, AreaChart, BarChart, StackedBarChart, ComboChart and the shared CartesianChart | | @texuli/charts/part-whole | Pie, donut, sunburst and treemap charts | | @texuli/charts/matrix | Heatmap, scatter and bubble charts, and RampLegend (an accessible color-ramp legend for a heatmap) | | @texuli/charts/compact | Sparkline, BulletChart, Gauge and ProgressRing, each with an optional formatValue(value) callback | | @texuli/charts/sparkline-lite | A light Sparkline (same props): the drawing and its accessible description, without the data table, for first screens | | @texuli/charts/flow | Sankey, funnel and network charts | | @texuli/charts/geo | Schematic tile and point maps | | @texuli/charts/histogram | HistogramChart | | @texuli/charts/pack | PackChart (circle packing) | | @texuli/charts/calendar | CalendarHeatmap | | @texuli/charts/statistical | BoxPlotChart, ViolinChart and EcdfChart, with quantile, density and ECDF math |

Building blocks:

| Import | What it gives you | | --- | --- | | @texuli/charts/axis | Reusable SVG axes, the tick model and numeric and time tick formatters | | @texuli/charts/interaction | Tooltip, legend, data table and keyboard exploration pieces | | @texuli/charts/annotations | AnnotationLayer: reference lines, bands and point callouts | | @texuli/charts/canvas | A canvas renderer for dense series | | @texuli/charts/colors | Token-backed categorical, sequential and diverging color scales | | @texuli/charts/schemas | chartPropSchemas, the prop schema of every family, for builders and inspectors | | @texuli/charts/heading | setChartTitleLevel: the heading rank a host gives flow, geo and part-whole chart titles (h3 without one) |

Data and math (framework-free TypeScript):

| Import | What it gives you | | --- | --- | | @texuli/charts, @texuli/charts/math | Every math export below, from one entry | | @texuli/charts/math/scales | Linear, log, sqrt, time, band, point and ordinal scales; ticks and nice domains | | @texuli/charts/math/shapes | Line, area and arc paths, pie, stack, bin and symbols | | @texuli/charts/math/layout | Treemap, sunburst, pack, Sankey, funnel, gauge, calendar and matrix layouts | | @texuli/charts/math/downsample | LTTB and min-max downsampling, bisectX | | @texuli/charts/math/color | A sequential color fallback | | @texuli/charts/streaming | Immutable, bounded append helpers for live numeric series | | @texuli/charts/worker, @texuli/charts/worker/entry | Opt-in Web Worker offload for binning and downsampling very large series, with a main-thread fallback; load the entry with new Worker(new URL('@texuli/charts/worker/entry', import.meta.url), { type: 'module' }) |

New in 0.6.0

Ships in 0.6.0; the 0.5.0 release predates it: the chart components that render a data-table fallback share one stylesheet per table look, so the lazily loaded chart CSS fell from 34,528 to 29,731 B raw. No API change.

New in 0.5.0

Ships in 0.5.0; the 0.4.0 release predates it:

  • New subpath @texuli/charts/sparkline-lite: a light Sparkline with the same props, without the data table (charts-sparkline-lite).
  • RampLegend in @texuli/charts/matrix (charts-matrix).
  • formatValue(value) on the compact Sparkline, BulletChart, Gauge and ProgressRing; it wins over format (charts-compact).

Key guarantees

  • Accessible by default. Every chart has role="img", a title and a description, plus a data-table fallback: a Show data table button on the cartesian family and a details disclosure everywhere else (except the light Sparkline, which keeps the name and description and drops the table by design). Cartesian charts (and matrix charts with interactive) add a keyboard explorer: arrow keys, Home/End, Page Up/Down between series, Escape to dismiss.
  • Right-to-left ready. Captions, legends and tables follow the page direction; each plot keeps a left-to-right coordinate system.
  • Themeable. Series colors default to the --tx-chart-* tokens, so charts follow the active Texuli theme; the full-size families also take a mode of light or dark.
  • No third-party chart library. The scales, shapes and layouts are written in-house as plain TypeScript.
  • Bounded on large data. Sparkline draws at most 2,000 samples (longer series fall back to min-max buckets so spikes survive), bin makes at most 1,000 bins, and statistical charts cap groups, outliers and density points. The cartesian renderer="auto" mode switches to canvas at 5,000 points.

Documentation

Contributing

Contributions are welcome; start at the GitHub repository.

License

MIT © Dailybot, Inc. Powered by Dailybot.