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

Fix stacked plots legend #6199

Merged
merged 53 commits into from
Feb 1, 2023
Merged

Fix stacked plots legend #6199

merged 53 commits into from
Feb 1, 2023

Conversation

shefalijoshi
Copy link
Contributor

@shefalijoshi shefalijoshi commented Jan 26, 2023

Closes #6176 #6158 #6209 #6231 #6159 #6176

Describe your changes:

  • Remove plot legend from mct plot component, add a slot for it instead
  • Remove reactivity for plot legend from stacked plots view
  • Add plot legend to the Plot component
  • Handle addition and removal of series with the PlotLegend
  • Add listener for series color changes to the y axis component
  • Remove composition watchers for stacked plots from the SeriesCollection - this is necessary in order to ensure the plot configuration for series within the stacked plot (that are not overlay plots) are added only once (from the StackedPlotItem)
  • Fix a bug where moving from an overlay plot to a simple plot and back would cause an error in the elements pool.
  • Removed extra redraws of plots happening when calculating limit lines
  • Fixed annotation editing for telemetry objects
  • Fixed annotation editing for Stacked Plots
  • Fixed annotation editing in Display Layouts containing Stacked Plots
  • Fixed e2e test for annotations with CouchDB

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

scottbell and others added 26 commits November 30, 2022 15:04
…stacked-plot-will-not-remove-them-from-the-legend
…stacked-plot-will-not-remove-them-from-the-legend
…stacked-plot-will-not-remove-them-from-the-legend
… series moves from one y axis to another

Optimize initialization of Plot configuration
Ensure the the y axis form correctly saves any changes to the configuration
Fix excluded limits test
…m/nasa/openmct into 5834-stacked-plot-removing-objects-from-a-stacked-plot-will-not-remove-them-from-the-legend
Also make sure that plot selection inside a stacked plot works - this had regressed due to plot annotations
…s to empty

Ensure color in the y axis swatch updates correctly
@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Merging #6199 (1673aa3) into master (393c801) will increase coverage by 0.50%.
The diff coverage is 68.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6199      +/-   ##
==========================================
+ Coverage   54.86%   55.36%   +0.50%     
==========================================
  Files         607      607              
  Lines       25951    26036      +85     
  Branches     2350     2370      +20     
==========================================
+ Hits        14238    14416     +178     
+ Misses      11045    10960      -85     
+ Partials      668      660       -8     
Flag Coverage Δ *Carryforward flag
e2e-ci 39.49% <100.00%> (ø) Carriedforward from 6d63339
e2e-full 51.23% <100.00%> (ø) Carriedforward from 6d63339
e2e-stable 53.89% <85.71%> (+0.97%) ⬆️
unit 50.16% <68.75%> (+0.62%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
src/plugins/notebook/components/Notebook.vue 20.93% <0.00%> (ø)
src/plugins/notebook/components/NotebookEntry.vue 16.93% <ø> (ø)
src/plugins/plot/chart/MctChart.vue 44.64% <ø> (+3.67%) ⬆️
src/plugins/plot/stackedPlot/StackedPlotItem.vue 60.60% <ø> (-0.73%) ⬇️
...lugins/plot/stackedPlot/StackedPlotViewProvider.js 72.22% <ø> (-20.64%) ⬇️
src/ui/inspector/PlotElementsPool.vue 0.95% <0.00%> (-0.01%) ⬇️
src/ui/layout/search/AnnotationSearchResult.vue 35.13% <ø> (ø)
src/plugins/plot/MctPlot.vue 37.55% <3.57%> (-1.44%) ⬇️
...inspector/annotations/AnnotationsInspectorView.vue 27.14% <45.45%> (-0.13%) ⬇️
src/plugins/plot/inspector/PlotOptionsEdit.vue 58.00% <66.66%> (-1.19%) ⬇️
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 393c801...1673aa3. Read the comment docs.

@ozyx ozyx modified the milestone: Target:2.1.6 Jan 30, 2023
@scottbell scottbell linked an issue Jan 31, 2023 that may be closed by this pull request
shefalijoshi and others added 3 commits January 31, 2023 13:57
…that identifies that an annotation selection is coming from a search result.

Try to simplify handling of selection in Mct Plots
@scottbell
Copy link
Contributor

Annotation testing instructions:
#5853 (comment)

@shefalijoshi shefalijoshi merged commit f570424 into master Feb 1, 2023
@shefalijoshi shefalijoshi deleted the fix-stacked-plots-legend branch February 1, 2023 18:14
shefalijoshi added a commit that referenced this pull request Feb 1, 2023
* Add listeners to remove stacked plot series and make keys unique

* don't add overlay plots to stacked plot legends

* Ensure series colors are drawn correctly in the plot legend

* Remove legend from mct plot. Remove series reactivity from stackd plot and add them to the legend instead.

* Clean up stacked plots so that the plot legend needs fewer props
Also make sure that plot selection inside a stacked plot works - this had regressed due to plot annotations

* Fix console error in plot elements pool and plot legend - reset arrays to empty
* Ensure color in the y axis swatch updates correctly

* Fix small issues with removing objects from STacked plots

* Fix selection for annotations and also select stacked plot child items

* fix notebook tagging

* remove unused annotation editor and change selection to single object

* remove reference to deleted css

* fix e2e tests

* Fix small typos into the selection context for Notebooks.

* Add a typ that identifies that an annotation selection is coming from a search result

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
ozyx pushed a commit that referenced this pull request Feb 1, 2023
* Add listeners to remove stacked plot series and make keys unique

* don't add overlay plots to stacked plot legends

* Ensure series colors are drawn correctly in the plot legend

* Remove legend from mct plot. Remove series reactivity from stackd plot and add them to the legend instead.

* Clean up stacked plots so that the plot legend needs fewer props
Also make sure that plot selection inside a stacked plot works - this had regressed due to plot annotations

* Fix console error in plot elements pool and plot legend - reset arrays to empty
* Ensure color in the y axis swatch updates correctly

* Fix small issues with removing objects from STacked plots

* Fix selection for annotations and also select stacked plot child items

* fix notebook tagging

* remove unused annotation editor and change selection to single object

* remove reference to deleted css

* fix e2e tests

* Fix small typos into the selection context for Notebooks.

* Add a typ that identifies that an annotation selection is coming from a search result

---------

Co-authored-by: Scott Bell <scott@traclabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants