Skip to content

Commit 178238d

Browse files
author
Nils Bars
committed
Replace Chart.js with Apache ECharts in scoreboard charts
- Swap chart.js, chartjs-adapter-date-fns, chartjs-plugin-annotation, and chartjs-plugin-zoom for echarts v6 in the SPA dependencies. - Reimplement PointsOverTimeChart and ChallengePlot against the echarts API (line charts, markLine boundaries, built-in dataZoom slider). - Read axis, grid, legend, tooltip, slider, and data palette colors from Vuetify --v-theme-* tokens and re-render via a MutationObserver when the body theme class flips. - Give .term-chart-wrap an explicit height and use a flex child so the chart container reports a non-zero size to echarts.init(). - Extend the x-axis range to include assignment boundary markers so the dashed guide lines stay inside the viewport. - Rotate assignment labels 90 degrees and center them along each vertical boundary line; center the baseline label on the horizontal markLine.
1 parent 969346b commit 178238d

7 files changed

Lines changed: 517 additions & 351 deletions

File tree

docs/SCOREBOARD.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,11 @@ endpoints and hands the data to the components under
172172
(regressions are filtered out).
173173
- `Countdown.vue` — timer for the currently-running assignment's deadline.
174174

175-
All charts use Chart.js with `chartjs-plugin-zoom` for pan/zoom
176-
(drag-pan, wheel/pinch zoom, shift-drag box zoom) and cap the x-axis at
177-
the earliest data point so users can't drag into empty pre-data space.
178-
Chart data updates on each poll preserve the user's zoom state.
175+
All charts use Apache ECharts with native `dataZoom` on the time axis.
176+
The default interaction model is wheel/pinch zoom plus drag-to-pan on the
177+
x-axis, with a slider scrubber below the chart for coarse navigation.
178+
The x-axis is capped at the earliest data point so users can't pan into
179+
empty pre-data space.
179180

180181
Badges are a visual consequence of crossing a scoring threshold — no
181182
dedicated backend. Badge assets are static SVG files at

spa-frontend/package-lock.json

Lines changed: 26 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spa-frontend/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@
1111
},
1212
"dependencies": {
1313
"@mdi/font": "^7.4.47",
14-
"chart.js": "^4.4.7",
15-
"chartjs-adapter-date-fns": "^3.0.0",
16-
"chartjs-plugin-annotation": "^3.1.0",
17-
"chartjs-plugin-zoom": "^2.2.0",
1814
"date-fns": "^4.1.0",
15+
"echarts": "^6.0.0",
1916
"pinia": "^2.3.0",
2017
"vue": "^3.5.13",
2118
"vue-router": "^4.5.0",

0 commit comments

Comments
 (0)