Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stacked Plot] Removing objects from a stacked plot, will not remove them from the legend #5834

Closed
2 of 7 tasks
jvigliotta opened this issue Oct 4, 2022 · 9 comments · Fixed by #6022
Closed
2 of 7 tasks

Comments

@jvigliotta
Copy link
Contributor

Summary

When you remove an item from a stacked plot, it will continue to be in the legend until you refresh or navigate away and come back. From cursory investigation, these event listeners are never triggered, because they are never fired from series collection.

Definitely needs further investigation.

Expected vs Current Behavior

Items should be removed from the legend, when removed from a stacked plot.

Steps to Reproduce

  1. view a stacked plot
  2. remove an item
  3. notice it has not been removed from the legend

Environment

  • Open MCT Version:
  • Deployment Type:
  • OS:
  • Browser:

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@shefalijoshi
Copy link
Contributor

Not a dupe - this is for stacked plots. That one is for overlay plots

@akhenry akhenry added this to the Target:2.1.2 milestone Oct 10, 2022
@unlikelyzero unlikelyzero removed this from the Target:2.1.2 milestone Nov 10, 2022
@scottbell scottbell self-assigned this Nov 22, 2022
@scottbell
Copy link
Contributor

scottbell commented Nov 30, 2022

The issue appears to be we're creating at least two versions of a SeriesCollection per StackedPlot - one for the StackedPlot itself, and one for each telemetry item added. The invocations are here and here.

We're listening to the StackedPlotItem version of the SeriesCollection, which never fires an add nor a remove event. I think we want to instead register with StackedPlot's own SeriesCollection, which actually does fire on add and remove.

@rukmini-bose
Copy link
Contributor

rukmini-bose commented Jan 24, 2023

Unverified Testathon 1/24/23

When I add plots to a stacked plot, then remove one from the elements pool, that element does get deleted, but the remaining plot gets duplicated in the canvas and legend.

Note the two pics below: I added enabledFlag and a Sine Wave Generator to a stacked plot. I then deleted enabledFlag, and in the second picture, notice that enabledFlag is deleted, but now there are 2 Sine Wave Generators in the canvas and legend, but there's only ONE element in the elements pool.

Do note though, refreshing fixes this problem.
Screen Shot 2023-01-24 at 3 33 20 PM

Screen Shot 2023-01-24 at 3 33 34 PM

@charlesh88
Copy link
Contributor

Verified fixed Testathon 2023-01-24.

@unlikelyzero
Copy link
Collaborator

Assigning to @rukmini-bose and @charlesh88 to determine what to do with the current state

@rukmini-bose
Copy link
Contributor

The behavior I commented on happens pretty often. I think we need to fix this. This could be considered data loss– especially if removing one plot is removing the wrong one.

@unlikelyzero unlikelyzero reopened this Jan 28, 2023
@charlesh88
Copy link
Contributor

This needs to be fixed if at all possible, it leads to very confusing and misleading states while editing a stacked plot.

@shefalijoshi
Copy link
Contributor

this should be fixed by #6206

@ozyx
Copy link
Member

ozyx commented Feb 2, 2023

Verified fixed 02-02-2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants