feat(signals): non-time plot widget, multi-axis normalization, export modal#205
Open
jacobjurek wants to merge 1 commit into
Open
feat(signals): non-time plot widget, multi-axis normalization, export modal#205jacobjurek wants to merge 1 commit into
jacobjurek wants to merge 1 commit into
Conversation
… modal
Three enhancements to the Signals page:
- Multi-axis normalization: every axis group now renders. Group 1 stays on the
left (unchanged for single-group queries); additional groups render on the
right with stepped offsets, color-matched to their traces, and the grid margin
grows so labels never clip.
- Export modal: replaces the two bare CSV/PNG icon-buttons with an Export dialog
offering PNG (light/dark/transparent background + 1x-4x scale), CSV + JSON data
(with include-hidden toggle), and copy-image-to-clipboard. Export helpers stay
pure in lib/export.ts.
- Custom plot widget: a new non-time PlotWidget alongside the time-series widget
("Add plot") supporting XY scatter, connected-line/path (GPS lat-lng), bar,
pie, and 3D scatter (echarts-gl). New POST /query/pairs endpoint returns
timestamp-aligned paired samples (merge_asof) via the query_signals/
merge_signals helpers; bar/pie reuse the existing /query/run aggregation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three enhancements to the Signals page, built as independent workstreams.
1. Multi-axis normalization fix (
QueryChart.tsx)When traces span multiple axis groups, only the first group's y-axis was drawn. Now every group renders: group 1 on the left (pixel-identical for single-group queries), additional groups on the right with stepped offsets, each axis color-matched to its traces. The grid margin grows dynamically so labels never clip. The hidden normalized
[0,1]axis and tooltip true-value recovery are unchanged.2. Export modal (
ExportDialog.tsx,export.ts,SignalWidget.tsx)The two bare CSV/PNG icon-buttons are replaced by a single Export dialog offering:
Export logic stays as pure functions in
lib/export.ts.3. Custom non-time plot widget (
PlotWidget/PlotChart,lib/pairs.ts, backend/query/pairs)A new plot widget sits alongside the time-series widget ("Add plot"), supporting:
/query/run)echarts-gl)New
POST /query/pairsendpoint returns timestamp-aligned paired samples via thequery_signals()+merge_signals()(merge_asof) helpers. Response is the bare{columns, rows}body (gateway adds the{data:...}envelope).Notes
query/query/service/query.pyandquery/query/model/query.pybecause the new/query/pairsroute imports them; andSignalTree.tsx, used byPlotWidget.echarts-glregistered via its tree-shakeable install modules (its ESM entrypoints are broken upstream); ambient types inecharts-gl.d.ts.Verification
tsc --noEmitclean;npm run buildsucceeds.POST /query/pairs→ 200 with{columns, rows}real merge-aligned ClickHouse data, reachable through the kerbecs gateway.echarts-glpresent in the container.🤖 Generated with Claude Code