Chart options for time series #25

Merged
Gilles merged 2 commits from feat/24-chart-options into master 2026-10-29 22:02:35 +00:00
Owner

Closes #24

Needed by Argus's metric charts and project dashboards (argus/frontend#30, argus/backend#46).

Changes

  • src/chartConfig.ts: ChartOptions (xAxis: "time", step, unit, color, table) and buildConfig(). Time axis = Chart.js linear scale over Date.parse values (no date-adapter dependency), ticks/tooltip formatted as dates; stepped: "after"; var(--x) colors resolved on the canvas element at render time; a single series has no legend, a 2px line, no point dots until hover, a 10 % wash for hex colors; interaction: nearest x.
  • No options → the exact previous config (existing dashboards unchanged; covered by a test).
  • ChartRenderer prop options + optional "Valeurs" table (<details>); BigbQueryResult prop chartOptions; BigbTile reads tile.options.chart. buildConfig, resolveColor and the ChartOptions type are exported.
  • Vitest (dev dependency, pnpm run test, new CI step) with src/__tests__/chartConfig.spec.ts.
  • README: chart options section.

Checks

pnpm run lint, pnpm run test (5 passed), pnpm run build (vite + vue-tsc).

🤖 Generated with Claude Code

https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA

Closes #24 Needed by Argus's metric charts and project dashboards (argus/frontend#30, argus/backend#46). ## Changes - `src/chartConfig.ts`: `ChartOptions` (`xAxis: "time"`, `step`, `unit`, `color`, `table`) and `buildConfig()`. Time axis = Chart.js linear scale over `Date.parse` values (no date-adapter dependency), ticks/tooltip formatted as dates; `stepped: "after"`; `var(--x)` colors resolved on the canvas element at render time; a single series has no legend, a 2px line, no point dots until hover, a 10 % wash for hex colors; `interaction: nearest x`. - **No options → the exact previous config** (existing dashboards unchanged; covered by a test). - `ChartRenderer` prop `options` + optional "Valeurs" table (`<details>`); `BigbQueryResult` prop `chartOptions`; `BigbTile` reads `tile.options.chart`. `buildConfig`, `resolveColor` and the `ChartOptions` type are exported. - Vitest (dev dependency, `pnpm run test`, new CI step) with `src/__tests__/chartConfig.spec.ts`. - README: chart options section. ## Checks `pnpm run lint`, `pnpm run test` (5 passed), `pnpm run build` (vite + vue-tsc). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
feature: chart options for time series
Some checks failed
ci / build (pull_request) Has been cancelled
ci / publish (pull_request) Has been cancelled
04d8955d42
Optional ChartRenderer options (also BigbQueryResult's chartOptions and
a tile's options.chart): time axis with dates placed proportionally
(linear scale, no date adapter), step line, unit, series color as a CSS
color or variable, and a values table under the chart. A single series
then has no legend, a 2px line and a 10% wash; the tooltip follows the
nearest x. Without options, charts render exactly as before. The config
lives in chartConfig.ts, unit-tested with vitest (new test script and
CI step).

Closes #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
fix: keep test declarations out of the published dist
All checks were successful
ci / build (pull_request) Successful in 30s
ci / publish (pull_request) Has been skipped
68f973cde5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
Gilles merged commit 2281fedbd9 into master 2026-10-29 22:02:35 +00:00
Gilles deleted branch feat/24-chart-options 2026-10-29 22:02:36 +00:00
Gilles referenced this pull request from a commit 2026-10-29 22:02:37 +00:00
Sign in to join this conversation.
No description provided.