Commit 30c7e72
feat: P2 viz + sidebar UX — log axis, smoothing, stats, chart types, combined view, annotations
Visualization (P2):
- Log Y axis: register LogarithmicScale; UI toggle (linear/log); buildYScale
helper handles both branches and respects manual yRange (positive only on log)
- Smoothing: utils/smoothing.js with trailing moving average and EMA
(alpha = 2/(N+1)); UI selects method + window size; applied before downsampling
- Statistics panel: utils/stats.js computes min/max/mean/std/last/count;
per-curve table rendered below charts when enabled
- Multi chart types: line/scatter/bar via <ReactChart type=>; registered Bar +
Line + Scatter controllers
- Combined view: single chart overlays all metrics with dual Y axis
(first metric → left, rest → right with dashed border); default height 720px
- Annotations: chartjs-plugin-annotation integration + AnnotationsPanel sidebar
UI to add/remove vertical event markers; rendered across all charts
Sidebar UX:
- useCollapsedSection hook persists each card's open/closed state to localStorage
- CollapsibleCardHeader component shared across RegexControls / FileList /
AnnotationsPanel / ComparisonControls (collapseId prop is opt-in, backward
compatible with existing tests)
- Display Options card refactored into 5 tabs (Chart / Smoothing / Stats /
Performance / Baseline); active tab persisted
Tests: +16 new cases (smoothing, stats); chart.js + react-chartjs-2 mocks
updated for new Chart.js scale/controller imports and annotation plugin.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 10dcbc6 commit 30c7e72
19 files changed
Lines changed: 1110 additions & 216 deletions
File tree
- public/locales
- en
- zh
- src
- components
- __tests__
- utils
- __tests__
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
63 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
64 | 99 | | |
65 | 100 | | |
66 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
63 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
64 | 99 | | |
65 | 100 | | |
66 | 101 | | |
| |||
0 commit comments