Skip to content

Fix lingering y-axis when deselecting topic with multiple y-axes #630

@bracyw

Description

@bracyw

Observed Behavior

On the graph page with "Multiple Y-Axes" enabled, deselecting a topic from the sidebar removes its series line from the chart, but the corresponding y-axis stays on the plot. Y-axes accumulate as topics are toggled and never get pruned.

Expected Behavior

When a topic is deselected, its y-axis should be removed from the chart so the axes always match the currently selected topics.

Steps to Reproduce

  1. Open the graph page
  2. Enable "Multiple Y-Axes" in the graph config
  3. Select 2-3 topics from the sidebar — confirm each gets its own y-axis
  4. Deselect one of the topics
  5. The series disappears, but its y-axis label/scale remains rendered

Notes

The multi-y-axis effect in graph.component.ts (around the showMultipleYAxes block) rebuilds yaxis configs from this.data.keys(), but it only re-runs when the showMultipleYAxes signal flips — not when topics are added/removed. The yaxis config needs to also refresh when the selected topic set changes (same path that updates the series after valuesSubject changes).

Metadata

Metadata

Assignees

Labels

angular-clientDevelopment Focused in the FrontendbugSomething isn't workingstraightforwardA straightforward task

Type

No type
No fields configured for issues without a type.

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions