-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor plots to use plotly.js instead of chart.js (part of DSEGOG-57) #564
Conversation
- WIP, still need to migrate traces
- also remove some chart.js references
Also update CDN url for plotly to more optimised version
- fix some issues with the plotting code & styling - also use better screenshot command & make webkit snapshots not as large
- mostly just accounting for the webkit change & switching to better screenshot method
- Had to change some layout stuff to make things resize properly/show the right size in tests
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #564 +/- ##
===========================================
- Coverage 97.64% 97.64% -0.01%
===========================================
Files 97 97
Lines 12463 12426 -37
Branches 2043 2071 +28
===========================================
- Hits 12170 12133 -37
Misses 287 287
Partials 6 6 ☔ View full report in Codecov by Sentry. |
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.
Works really well. Just some minor comments
I expected the data to be cleared when the user selects the XY
as this is the current functionality on dev.
bug_1.mp4
DEV
dev_bug_1.mp4
....spec.ts-snapshots/user-can-customize-both-left-and-right-y-axis-labels-1-chromium-linux.png
Show resolved
Hide resolved
...g.spec.ts-snapshots/user-can-customize-both-left-and-right-y-axis-labels-1-firefox-linux.png
Show resolved
Hide resolved
...ng.spec.ts-snapshots/user-can-customize-both-left-and-right-y-axis-labels-1-webkit-linux.png
Show resolved
Hide resolved
- bug was that when switching from timeseries plot to XY plot, the plot assumed it was still a timeseries plot instead of drawing a blank plot until the user selects an XAxis
@joshuadkitenge good catch! Should be fixed now - I wasn't handling the case of |
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.
LGTM
ff9731e
to
00fd021
Compare
Description
Motivation for this change is DSEGOG-57 - Plotly has the
rangebreaks
feature which can implement the skip non-working hours feature. That change will be in a follow up PR to try and keep this PR smaller as it's already a behemoth!Overall the plots should work identically to before - the only difference I can note is that we can't easily properly limit the zoom/pan range to the range of the data anymore. But since that only affects zoom/panning I decided it's not that big of a deal as the user can just choose to keep within bounds or not.
I had to rearrange some of the styling in the windows to accomodate Plotly to ensure the plot is correctly responsive and fills up the container as it is supposed to.
Also, some minor improvements in the playwright tests - we now use a better screenshot method (it takes two screenshots and if they're not the same it will continue taking subsequent screenshots until the page is stable before comparing). Also changed it so that Webkit screenshots are no longer huge - this is due to the default DPI of Webkit being 2 instead of 1.
Testing instructions
Agile board tracking
connected to DSEGOG-57