Skip to content

chore(deps): remove chart.js and render the results panel chart with uPlot #49

Description

@xe-nvdk

Context

chart.js is a dependency with exactly one use: src/lib/components/ResultsPanel.svelte:3. Everything else charts with uplot, which is smaller and faster. Carrying two charting libraries means two rendering models, two theming paths, and two bundle costs.

Small, self-contained cleanup. Part of #19.

Scope

  • Port the chart in ResultsPanel.svelte (line and bar) to uPlot
  • Remove chart.js from package.json and the lockfile
  • Confirm no other import survives: grep -rn "chart.js\|from 'chart" src/
  • Keep theme awareness — the chart must restyle on light/dark switch

Where to look

  • src/lib/components/MetricChart.svelte is the smallest existing uPlot wrapper; copy its options shape
  • src/lib/components/logs/LogHistogram.svelte shows uPlot bars
  • Theme detection today is document.documentElement.classList.contains('dark')

Notes

Best picked up after the units and colors modules land, so the port uses the shared formatter and palette instead of inventing a third one. It can be done before them, but then expect a follow-up.

Acceptance criteria

  • The results-panel chart renders line and bar the same as before
  • chart.js is gone from package.json, the lockfile, and node_modules
  • The production bundle is measurably smaller
  • npm run check and npm run build both pass

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions