Files
kits/packages/chartkit/demo/explore.html
CatoandClaude Opus 5.5 aa1eb85f6c feat(chartkit): LineExplorer — a chart the reader works; numbers shown with every value a link (#5)
* feat(chartkit): LineExplorer — a chart the reader works; numbers shown with every value a link

- @bitbaum/chartkit/explore: LineExplorer ("use client") over LineChart.
  Toggle series (never the last), narrow periods, figures or change since
  the first period; the view is data the app keeps in its URL
  (initial / onViewChange). Every control 44px, every word from the app.
- LineChart `numbers`: the table behind the chart shown behind a
  disclosure, each value a link to its source. Hidden table stays text.
- TableCell can be { text, href }. LineSeries.colour keeps a colour stable.
- Browser test works the explorer at 390/1280, light/dark: toggles,
  range, change from 0, table links, 44px targets, no overflow, audit.

First of Solon's "every number clickable, slice and dice" phases; upstream
so every product gets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(chatkit): the reader's place is where it was when history loads, not a fixed 240px

The Messenger check failed on main every run (325px): loading starts 200px
before the top (the observer's margin), so where the reader stands when the
page arrives varies. Measure the first message before and after the load;
a lost place still fails (it would jump down a whole page, off screen).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(chartkit): the explorer's figures/change switch reads as a choice, not as switched off

The unchosen option was drawn muted, like a series switched off. It is a
choice of two: the chosen one is filled, the other reads as any button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(chartkit): LineExplorer defaultView — the app's own start, what Reset returns to

A product that keeps a series off until asked for (a second grey median)
showed Reset on first load. defaultView is the starting view: Reset returns
to it and only a departure from it counts as a change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:41:36 +01:00

45 lines
1.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>chartkit explorer</title>
<link rel="stylesheet" href="../node_modules/@bitbaum/design-tokens/tokens.css" />
<link rel="stylesheet" href="../styles.css" />
<style>
/* Page chrome only — the charts' look comes from styles.css + tokens. */
body {
margin: 0;
font-family: var(--font-sans, system-ui, sans-serif);
background: hsl(var(--surface-page, 0 0% 98%));
color: hsl(var(--text-primary, 0 0% 10%));
}
main {
max-width: 56rem;
margin: 0 auto;
padding: 24px 16px 64px;
}
section + section {
margin-top: 40px;
}
h2 {
margin: 0 0 12px;
font-size: 14px;
font-weight: 500;
opacity: 0.6;
}
.inline {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 16px;
font-size: 14px;
}
</style>
</head>
<body>
<main id="demo"></main>
<script src="./dist/explore.js"></script>
</body>
</html>