vibehyper.media

Plate 001 · hyperplot

← All projects

Project page · Plate 001 Class I · ExtensionsPre-release · 0.2.0First tenant · added 26 Nov 2026

hyperplot

Live charts your server draws as SVG. No client chart library.

  1. The server drew this. Each poll returns a whole new <svg id="latency">, rendered by the Go library. innerMorph patches the node already on the page; it is never replaced.
  2. The window slides. Each frame moves the x domain ten seconds. hx-plot compares the old and new data-hp-x and slides the chart across instead of redrawing it.
  3. Read it without a mouse. Hover for a tooltip, or Tab into a chart and step with ← → Home End. Each step is announced, and your place survives the next swap. The table under 1a comes in the same response as each frame and keeps its rows by id.
  4. Gestures are requests. Click a bar in 1b, or press Enter on one: hx-plot adds hp-chart, hp-x and hp-series to an ordinary GET, and the answer is fig. 1c. A drag across 1a sends hp-x0 and hp-x1; the answer is the zoomed chart.

1aGET /demo/p-hyperplot/latencyevery 2s · innerMorph · brush to zoomzoom by minute

Drag across the chart: the drag is an htmx request, and the response is the zoomed chart.Tap a minute: the tap is an htmx request, and the response is the zoomed chart.

Live: the last five minutes, at 10 s buckets.

Zooms snap: a brush zooms to the one-minute window nearest the middle of your range, at 2 s buckets, from nine pre-rendered windows. Any range you mark comes back as one minute.

x: time · live, a 5 min window sliding 10 s a frame; zoomed, one minute Tab←→HomeEnd · brush: Shift+←→ then Enter, Esc cancels

1bGET /demo/hyperplot/throughputstacked bar · select a bar

1cselect in 1b → #detaildrill-down

Title
hyperplot
Drawn by
Go reference server
Source
commit 09fcfc0
Frames on file
141 SVG · 39 tables
Renders
360 · 640 · 1040 px
Channels
CH1 · CH2 · CH3
Fig. 1 a–c. Two live charts, each polled from its own URL, and a drill-down that only a select fills. Real frames, real hx-plot; the server is played by the demo responder (see the † note below). awaiting first swap
Kind
extension
Language
JS + Goextension · reference server
htmx
4.0.2
Status
pre-releaseextension 0.2.0
Licence
MIT
Wire spec
version 1three levels

§1Description

§2Source

Maintainers
ironystock
Repository
github.com/ironystock/hyperplotReal project · pre-release, nothing tagged yet
Register
projects.jsonNo. 001
Skin
skin-hyperplot.cssworn inside fig. 1, plus its tooltip file
Frame
Signalthe house frame; a skin dresses only the demo window
Install labelNo. 001
Extension
hx-plot.js 0.2.0 + hx-plot.css, copied from client/ in the repo
npm
htmx-ext-plot, not yet published
Registers
as plot, on script load; no hx-ext
Needs
htmx 4.0.2
Go
go get github.com/ironystock/hyperplot/plot
Go needs
1.24+, standard library only; no version tagged yet
Licence
MIT

Why it exists

The response is the hypermedia.

  1. The server sends the chart, not the data.

    The htmx chart extensions we know of ship JSON to a client charting library. hyperplot ships the chart. The server already has the data, so units, time zones and number formats are decided once, there, and the tooltip says exactly what the axis does.

  2. No client chart library.

    No bundle, no spinner, no layout shift: the chart is in the first response. It renders with JavaScript off, in a bare .svg file and under a strict Content Security Policy. The browser never receives a data API and never formats a number.

  3. One wire spec, any server.

    The contract between server and extension is a short wire spec in three cumulative levels, with language-neutral conformance fixtures. Go is the reference server; the server guide builds a Level 3 one in about 320 lines of standard-library Python.

  4. Accessible by construction.

    The Go renderer draws Line, Area, Bar, Dot, RuleY and Sparkline marks. Every chart has an accessible name and description, takes keyboard focus, steps with the arrow keys, Home and End, and announces each step. An equivalent data table stays in sync across swaps.

Fig. 2 · GET /demo/hyperplot/throughput, shown as textevery 3s

… of SVG markup per poll, and nothing else: every label and number in it was formatted by the server, down to <title>cache · /feed: 295 req/s</title>.

When to use something else. If readers need to pan and zoom through very large datasets, or filter in the browser without a round trip, a client-side library fits better. hyperplot says so in its own README.

Quick start

Three tags and a div.

Plain script tags, no build step, no hx-ext: htmx 4 activates an extension when its script loads.

  1. Load htmx 4 and the extension.

    The config keeps proxy error pages from being swapped over your charts.

    <meta name="htmx-config" content='{"noSwap":[204,304,"4xx","5xx"]}'>
    <link rel="stylesheet" href="/static/hx-plot.css">
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/htmx.min.js"></script>
    <script src="/static/hx-plot.js"></script>
  2. Wrap a chart your server rendered.

    Poll it, morph it. hx-plot:autosize sends the container's width as hp-w, so the server draws at the size the page has.

    <div hx-get="/charts/latency" hx-trigger="every 2s, htmx:plot:resize"
         hx-swap="innerMorph" hx-plot:autosize>
      <svg id="latency" class="hp hp-anim" data-hp="1" …>…</svg>
    </div>
  3. Draw it on the server.

    The Go reference server, package plot, uses only the standard library and renders deterministic, escaped, accessible SVG. plot.Stylesheet() is the stylesheet the page links.

    import "github.com/ironystock/hyperplot/plot"
    
    chart := plot.Chart{
        Title: "Latency",
        Y:     plot.Axis{Label: "ms", Unit: " ms"},
        Marks: []plot.Mark{
            plot.Line{Name: "p50", X: plot.Times(times), Y: p50},
            plot.Line{Name: "p99", X: plot.Times(times), Y: p99},
        },
    }
    svg, err := chart.Render() // []byte of well-formed, deterministic SVG

Not Go? Implement the spec.

LevelYour serverThe page gets
1 Staticemits chart markup with a JSON hover payloadnative tooltips without script; with the extension, tooltips, a crosshair and keyboard reading
2 Liveadds stable ids, three geometry attributes and row keys; serves frames over polling or SSEmorph updates that keep their place, sliding windows, live tables, 304s for unchanged polls
3 Interactivereads the gesture parametersdrill-down on click or Enter, brush-to-zoom with history

Before you install

Known gaps

Pre-release, stated plainly. Names may still change before the first publish, and until v1.0.0 minor versions may change the API and the markup.

WorksExtension 0.2.0 with its brush and tween companions; spec version 1 with fixtures; the Go reference server at Level 3.
PendingNothing is on npm and no Go version is tagged.
UntestedFirefox and Safari. The extension is tested in Node against a fake DOM and in Chrome; the Safari tween companion has never run in Safari.
Over budgetCore script about 18 KiB minified and 7.6 KiB gzipped, against a 13 KiB and 5.5 KiB budget.
GapsTouch readers can't brush; mobile screen-reader users can't select or brush in spec 1. The Go renderer has no horizontal bars, log scale, small multiples or locale option.
github.com/ironystock/hyperplot