Repository navigation
feat(plot): give each 1D curve a colour no other curve of its grid uses - #151
Merged
olivhoenen merged 5 commits intoOct 9, 2026
Merged
Conversation
A curve was added without a colour, so Plotly coloured it by its index in the grid, and SimplePlotly then wrote that colour back onto the stored trace. Removing a curve and adding it back gave it the colour of its new index, which another curve could already hold. The colour is now chosen when the curve is added: the first colour of Plotly's 10-colour palette no other curve of the grid uses, or the least used one once all are taken. Curves keep their colour as others come and go. Traces still without one, from older saved configurations, get theirs the same way when drawn, so error bands always match their curve. initPlotColors no longer reads colours back from the legend SVG, and "Reset plot colors" hands out distinct palette colours in trace order. Covered by unit tests (plotColors.test.ts) and an e2e spec (plot-colors.spec.ts) removing and re-adding curves and resetting colours in the customization panel. Assisted-by: Claude/opus-5
…name A curve's name is its node's last segment and its URI label, so constraints/diamagnetic_flux/measured and constraints/ip/measured of one entry are both measured_URI-0. The customization and metadata panels used that name as the tab value, so both tabs were selected together, and every edit (colour, mode, shape, smoothing, heatmap) went to the first of them. Tabs and edits now key on the curve's nodeUri, unique in a grid, as the data operations already did. Curves that share a name get the shortest end of their node path that tells them apart as tab label (diamagnetic_flux/measured_URI-0, ip/measured_URI-0); the others keep their name. Each tab shows a dot in its curve's colour and the full node URI on hover. Trace names and the legend are unchanged. Assisted-by: Claude/opus-5
…n on Legend text is purple for curves on the right axis and grey for the left one. The axis was found by looking up the curve by its legend text, so two curves sharing a name (diamagnetic_flux/measured in Wb and ip/measured in A, both measured_URI-0) both took the first one's colour, and the right axis curve was shown as a left axis one. Each entry now reads the axis of the trace Plotly bound to it. The plot div is held in state so the legend observer attaches once the plot mounts, the div being rendered only when there is data to draw. Assisted-by: Claude/opus-5
Contributor
Author
|
Two more fix/improvement:
|
Loading a state file or plotting a heavy node such as equilibrium/time_slice/profiles_2d/psi could take a second or more with no feedback. A loader next to the configuration selector now spins once work has been running for 300 ms: every backend request (except the 10 s server-status poll), and loading a configuration or checking a tree node until the resulting grids have been drawn. The busy counter lives outside the Zustand store so toggling it never re-runs store selectors. Assisted-by: Claude/opus-5
A trace in 'lines' mode with one drawable point showed nothing at all. buildTraces now draws such a trace as 'lines+markers'; the stored mode is left untouched, so the plain line comes back once there are more points. Closes iterorganization#114 Assisted-by: Claude/opus-5
olivhoenen
marked this pull request as ready for review
October 9, 2026 07:12
Documentation build overview
134 files changed ·
|
Contributor
Author
|
Last two updates on this PR:
|
paulotex
reviewed
Oct 9, 2026
paulotex
self-requested a review
October 9, 2026 09:44
paulotex
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #150
Issue:
A curve was added without a colour, so Plotly coloured it by its index in the grid, and SimplePlotly then wrote that colour back onto the stored trace. Removing a curve and adding it back gave it the colour of its new index, which another curve could already hold.
Fixed behaviour:
initPlotColorsno longer reads colours back from the legend SVG, and "Reset plot colors" hands out distinct palette colours in trace order