Skip to content

Replace plotly.js with uPlot - #586

Merged
agarny merged 33 commits into
opencor:mainfrom
agarny:issue578
Oct 22, 2026
Merged

agarny merged 33 commits into
opencor:mainfrom
agarny:issue578

Conversation

@agarny

@agarny agarny commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #578.

agarny added 30 commits October 22, 2026 22:20
This can help avoid some flickering when resizing them.
Note that `uplot` is added as a devDependency for its types only.
Note that a lot of things have been stripped. The idea is to use a bare uPlot and slowly build our way up to mimic what Plotly does.
We build an SVG document of what we currently show (i.e. our plot, axis titles, and legend, but not our hover label or zoom box), which we either export as-is or rasterise at our device pixel ratio (unlike Plotly, which rasterises at the size of its container), so that our raster images are as sharp as our plot. Our trace and marker paths are now shared between uPlot and our exports.
- Hover point selection.
- Double-clicking one end of an axis now does nothing.
- The mouse wheel over a corner now does nothing.
…hat its rounded text doesn't change our range).
Copilot AI balanced review requested due to automatic review settings October 22, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@agarny
agarny merged commit 53b5fa9 into opencor:main Oct 22, 2026
9 checks passed
@agarny
agarny deleted the issue578 branch October 22, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace plotly.js with uPlot

2 participants