-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
UI updates to Y axis #6102
UI updates to Y axis #6102
Conversation
* Set yKey on each model * Add a test
* Update version for sprint 2.1.1 * Basic changes (very draft) for multiple y axis for plots * Generalize additional axes model handling * [Plot] Set yKey on each plot series (#5790) * Set yKey on each model * Add a test * Update yaxis to be independent of mctplot * Fix yAxis ticks * Fix yAxisModel label * Add multiple y axes option for overlay plot. UI changes to display 2 y-axes * Fix Chart bug * Bump version to `2.1.3` (#5973) * Preserve Gauge configuration changes on create/edit (#5986) * fix(#5985): deep merge on create/edit properties - Perform a deep merge of old and new properties on Create/Edit properties actions * refactor(e2e): improve selector in appActions * test(e2e): add tests for gauges - test creating a non-default gauge (checks only for console errors) - test updating a gauge (checks only for console errors) * fix(e2e): use pluginFixtures for gauge tests * fix(e2e): prevent fail if testNotes is undefined * Make the tree key unique (#5989) * Refactor iterating over all yAxis while drawing to the viewport * Refactor code to remove hardcoding of yAxisIds * style: auto-fix lint errors * Remove configurability of number of y axes. Use yAxisIds from Series to show/hide axes. Adds test for multiple y axis display * Add more tests for when only 1 axis needs to be displayed * Address code review comments: Move styles to computed properties Refactor yAxes rendering in MctPlot to also include main y axis. * Address review comments. Refactor plot configuration code for additiona y axes and reset the chart only for series that belong to the yaxis that has changed. * Fix bug where only the first series for a given yAxis was rendering * Refactor code to reuse method logic, move const and use cap case * Only draw highlights for the given yAxis * Only draw rectangles for the yAxis the series belongs to Co-authored-by: Khalid Adil <[email protected]> Co-authored-by: Jesse Mazzella <[email protected]> Co-authored-by: Jesse Mazzella <[email protected]>
…sa/openmct into feature/plots-multiple-y-axes
…sa/openmct into feature/plots-multiple-y-axes
Fix dropdown being obscured for the right y-axis
Codecov Report
@@ Coverage Diff @@
## feature/plots-multiple-y-axes #6102 +/- ##
================================================================
Coverage ? 55.04%
================================================================
Files ? 602
Lines ? 24223
Branches ? 2187
================================================================
Hits ? 13333
Misses ? 10271
Partials ? 619
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report at Codecov.
|
Testing Notes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Comments:
This looks great! Super duper impressive. Tested on regular overlay plots, as well as checked how it looks in a stacked plot.
Couple of things:
- 1. The visibility toggle button seems to be faulty. Check out the video– SWG C (purple plot) seems to be re-rendering even after we hide its respective Y Axis.
Multiple.Y.Axes.mov
- 2. Noticing that the Y Axis 2 (furthest from the left) is always cut off in the canvas. Can we fix this?
- 3. Something odd is happening over here with Y Axis 1 and 2. I think that the two axes are being overlapped over each other.
- 4. For Y-Axis 3, it would be nice if we could have the ticks closer to the canvas rather than the label. That way, there is less of a space between the plot and ticks, so it is easier for users to visualize the hash lines to the ticks. Plus, it'll be more consistent with the other axes, who have the ticks next to plot.
-
5. Dragging and dropping elements between axes in the elements pool is difficult and unintuitive at times– specifically when you are trying to drop a new element into an axis that is already populated by another axis. We need to work on making the highlights that appear on drag more clear. UPDATE: After talking with @ozyx , we have decided to create a separate and new element for objects in the elements pool for multiple y-axes. This change will remove the grippy element, which is causing the issues I encountered when dragging elements between axes.
-
6. Add instructions into the elements pool to make it clearer to users how to interact with it.
…not allowing for proper drag and drop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks super amazing. Everything looks great one the regular overlay plot object.
My only observation now is that the axes do not line up properly when there are multiple y axes plots being used in a stacked plot.
We would need to calculate which plot within the stacked plot has the maximum width, and make sure that the rest of the plots within the stacked plot take on that width as well. That'll ensure that the plots (and their x-axis) line up properly, which is important in a stacked plot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! There's a bug with how multiple y axes looks in stacked plots, but I'll file a bug for it. Approving now. 🥳
* Add color swatches for Y Axis * Allow showing and hiding plots for a given yaxis. Fix dropdown being obscured for the right y-axis * Show visibility icon only for non simple plots * Add instruction message to Elements Pool * Add grippy class to object label. Fixes issue where using grippy was not allowing for proper drag and drop * Fix clipping of text on left y axis. Fix positioning of ticks on right y axis * Fix arguments to filter that was causing hidden series to be drawn * test(e2e): fix test, better expect conditions Co-authored-by: Khalid Adil <[email protected]> Co-authored-by: Jesse Mazzella <[email protected]> Co-authored-by: Jesse Mazzella <[email protected]> Co-authored-by: Rukmini Bose <[email protected]>
Closes #5792
Describe your changes:
Known Issues:
Adding/Removing series to different Y axis buckets requires navigating away and back to the overlay plot.
Changes:
All Submissions:
Author Checklist
Reviewer Checklist