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

Ensure stacked plots show cumulative legend #7481

Conversation

scottbell
Copy link
Contributor

@scottbell scottbell commented Feb 6, 2024

Closes #7403

Describe your changes:

Listen to series models in the legend, and hide options that don't make sense if the cumulative legend isn't being used.

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?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Is this a breaking change to be called out in the release notes?
  • 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?

@scottbell scottbell added this to the Target:4.0.0 milestone Feb 6, 2024
@scottbell scottbell requested review from shefalijoshi and ozyx and removed request for shefalijoshi February 6, 2024 14:59
@scottbell
Copy link
Contributor Author

scottbell commented Feb 6, 2024

Note, composables would be really good here, but I'm a bit reluctant to refactor heavily in a bug fix.
Also note this currently contains the changes from the other legend PR I've got.

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b33a017) 55.37% compared to head (1e83ed3) 48.93%.
Report is 2 commits behind head on 7403-plot-legends-legends-not-expanding-when-requested.

Additional details and impacted files
@@                                    Coverage Diff                                     @@
##           7403-plot-legends-legends-not-expanding-when-requested    #7481      +/-   ##
==========================================================================================
- Coverage                                                   55.37%   48.93%   -6.44%     
==========================================================================================
  Files                                                         671      428     -243     
  Lines                                                       26935    13329   -13606     
  Branches                                                     2614        0    -2614     
==========================================================================================
- Hits                                                        14914     6522    -8392     
+ Misses                                                      11305     6807    -4498     
+ Partials                                                      716        0     -716     
Flag Coverage Δ *Carryforward flag
e2e-full 48.93% <ø> (ø) Carriedforward from fbaaad5
e2e-stable ?
unit ?

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

see 501 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@scottbell scottbell linked an issue Feb 6, 2024 that may be closed by this pull request
7 tasks
@scottbell scottbell marked this pull request as ready for review February 6, 2024 16:01
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 6, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 6, 2024
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Changes look and work great, just a small suggestion

src/plugins/plot/inspector/PlotOptionsBrowse.vue Outdated Show resolved Hide resolved
src/plugins/plot/inspector/forms/LegendForm.vue Outdated Show resolved Hide resolved
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 6, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 6, 2024
@unlikelyzero unlikelyzero merged commit 9799b04 into 7403-plot-legends-legends-not-expanding-when-requested Feb 6, 2024
19 checks passed
@unlikelyzero unlikelyzero deleted the 7386-stacked-plots-show-legend-per-plot-is-broken branch February 6, 2024 22:05
scottbell added a commit that referenced this pull request Feb 7, 2024
* expanded legend showing, but malformed

* fix legends

* add e2e test and aria labels for controls

* fix tests

* remove focused test

* make plot legend items dynamic

* expand legend immediately when changing default

* Ensure stacked plots show cumulative legend (#7481)

* simplify config loading logic

* wip

* fixed stacked plot legend issue

* fix legend

* remove console.debugs

* remove extraneous prop

* add test

* fix legend

* use props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Stacked Plots] "Show Legend Per Plot" is broken
3 participants