Move the graph page to Chart.js
维护者通常 2 天内回复
评估
这个 Issue 还没有评估数据。
描述
What
Finish moving the graph page to Chart.js, building on the spike branch 877-try-chartjs-for-the-clients-graph-page (draft PR #887). That branch already draws the page with Chart.js. What's left is CSV export, which ApexCharts' menu gives today, fixing the hover quirks, and checking it stays smooth on long ranges.
Requirements
- The graph page draws with Chart.js, keeping live, run and historical modes, hover, zoom, pan, pause, Clear Graph, the legend toggle, multiple y-axes and day lines
- The graph's data can be downloaded as CSV, and the chart saved as an image
- Hover shows each line's value at the pointer's time, with its dot on the line
- A historical range near the 7-day cap, and five live topics, stay smooth to hover, zoom and pan
- verify-graph passes
Notes
- Spike #877, draft PR #887; decision: https://github.com/Northeastern-Electric-Racing/Argos/issues/865#issuecomment-6430776779
- Dropped approaches:
- uPlot (#872, PR #882): just as light, but no export, a small ecosystem and no pie chart; its floating tooltip and wheel zoom are demo code to copy in.
- webgl-plot (#878, PR #888): nothing is built in; the branch wrote axes, hover and legend itself.
- dygraphs (#876, PR #886): too little out of the box; see #876.
- ECharts (#873, PR #883): the most built in, but about 100 MB more memory and the noisiest measurement.
- lightweight-charts (#875, PR #885): built around finance charts, with no legend.
- Plotly (#874, PR #884): nearly double the memory of the rest.
- Open question: whether Chart.js's min-max decimation keeps a 7-day range smooth; the spikes didn't measure frame rate or long ranges.
Context transfer
SUMMARY
The spike branch replaces ApexCharts on the graph page only. It merges cleanly into develop (22 commits behind as of 2026-10-27). 195/195 unit tests pass; verify-graph passed 6/6 (UTC and New York) before the hover change and hasn't been rerun since.
CONTEXT
- Files: angular-client/src/pages/graph-page/graph/graph.component.{ts,html,css,spec.ts}, graph-chart.utils.ts (+ spec), graph-page.component.css, package.json.
- Registers only the line chart's parts in the component's providers (LineController, LineElement, PointElement, LinearScale, Tooltip, Legend, Decimation, zoom and annotation plugins).
- X is a linear epoch-ms scale with our own clock-aligned ticks; no date adapter.
- Values are pushed onto per-series sorted arrays (binary-search insert when out of order), trimmed to the time or point window, and redrawn once per animation frame with update('none').
- Hover (commit d40aaac4): a custom nearest-per-series interaction mode, a cursor tooltip positioner and a crosshair plugin, about 200 lines.
- Hover quirks: dots sit a few pixels off the line; a series with no nearby data shows its first or last sample; the tooltip's edge flip uses the previous frame's size.
- Zoom plugin gives drag zoom, pan, zoom buttons; Save PNG is chart.toBase64Image(). CSV export isn't ported; on develop it comes from ApexCharts' default toolbar menu.
- SERIES_COLORS has 10 colours (ApexCharts' 5 first, violet lightened for contrast), so colours repeat from the 11th series.
- 主要语言
- TypeScript
- 星标
- 5
- 派生
- 1
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 48
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Northeastern-Electric-Racing/Argos 的其他 Issue
-
Remove the landing page可能已有人在做 @Idontknow0487 于 8 天前认领。 未关闭by: ai-assisted frontend good-for: new-member spike
难度 2/5 1-3 小时 新手友好度 68/100
Northeastern-Electric-Racing/Argos#847 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Keep drag-box zoom smooth on long graph ranges可能已有人在做 @bracyw 于 2 天前认领。 未关闭by: ai dev work frontend
Northeastern-Electric-Racing/Argos#940 · 已指派 1 人 ·
维护者通常 2 天内回复
-
quick-view-content: Generic quick-view components that hold caller-defined data可能已有人在做 @bracyw 于 2 天前认领。 未关闭by: ai frontend spike
Northeastern-Electric-Racing/Argos#937 · 已指派 1 人 ·
维护者通常 2 天内回复
-
quick-view-content: The quick view loads components defined elsewhere可能已有人在做 @bracyw 于 2 天前认领。 未关闭by: ai frontend spike
Northeastern-Electric-Racing/Argos#936 · 已指派 1 人 ·
维护者通常 2 天内回复
-
quick-view-content: Pages pass their own components to the quick view可能已有人在做 @bracyw 于 2 天前认领。 未关闭by: ai frontend spike
Northeastern-Electric-Racing/Argos#935 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 Northeastern-Electric-Racing/Argos 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P1
难度 2/5 1-3 小时 新手友好度 70/100
steipete/oracle#614 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Koenkk/zigbee-herdsman-converters#13656 ·
维护者通常 2 天内回复
-
check:passed streams:remove
难度 1/5 1 小时以内 新手友好度 62/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 62/100
actions/setup-node#1659 ·
维护者通常 1 天内回复