PolicyEngine / PolicyEngine/policyengine-app-v2

Remove react-plotly.js once all migratable charts are done

Open
#669 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1
Forks
3
Avg merge
1d 50m
Merged PRs (30d)
39

Description

Summary

Once all feasible chart components are migrated away from Plotly (see #609, #663), remove react-plotly.js and plotly.js from the dependency tree to reduce bundle size significantly.

Prerequisites

  • #663 merged (16 charts migrated to Recharts)
  • Remaining Plotly-only charts either migrated to alternatives or confirmed as permanently needing Plotly
  • Blog/notebook Plotly JSON rendering evaluated for alternatives

Current Plotly footprint

plotly.js adds ~3MB to the bundle (minified). Even with code splitting, it's a significant chunk. If we can eliminate all Plotly usage, the savings are substantial.

What needs to happen

  1. Migrate or confirm each remaining Plotly chart (tracked separately)
  2. If blog/notebook Plotly JSON must stay, consider lazy-loading Plotly only for those routes
  3. Remove react-plotly.js and plotly.js from package.json
  4. Remove Plotly mock from test setup (vitest.setup.mjs)
  5. Update .claude/skills/chart-standards.md to remove Plotly references

Context

Related: #609, #663

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking prerequisites #663 and #609, then audit the remaining Plotly-only charts and the blog/notebook Plotly JSON rendering. Review package.json, vitest.setup.mjs, and .claude/skills/chart-standards.md. Done means remaining charts are migrated or confirmed, Plotly dependencies and mocks are removed, and Plotly references in the chart standards are updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
documentation, frontend, performance, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.