-
Notifications
You must be signed in to change notification settings - Fork 14k
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
feat(echarts): Implement stream graph for Echarts Timeseries #23410
Conversation
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.
First pass comments, code looks good at first glance, but would be good to add a simple test case for the wiggle algo
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #23410 +/- ##
==========================================
+ Coverage 67.49% 67.65% +0.15%
==========================================
Files 1907 1908 +1
Lines 73531 73716 +185
Branches 7981 7989 +8
==========================================
+ Hits 49633 49875 +242
+ Misses 21850 21793 -57
Partials 2048 2048
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
When I created a stream bar chart, then changed the chart type to line chart, the lines went completely missing:
I wonder if it's because the stacking control type changed from string to boolean based? Also, I think we may need to migrate all ECharts plugins that are using the boolean based stacking control to the new string based one to avoid clashes. Optionally, we may need to add one of those form data migrators that we're using when switching between some other charts to handle the control value conversions.
|
||
Base = declarative_base() | ||
|
||
CHART_TYPE = "echarts_timeseries_bar" |
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.
Thanks for comments @villebro, updated the PR. Now all timeseries echarts support stream graph :) |
@villebro For some reason the updated import paths (import from |
Oof, my bad, I totally forgot those tests want those relative imports.. Carry on! |
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.
Left three major comments that turned out to be incorrect upon closer inspection 😄 But I think that one naming nit still has merit, I think (unless it also turns out to be incorrect). Tested and works great, so LGTM with an optional nit.
@@ -116,6 +117,7 @@ const config: ControlPanelConfig = { | |||
}, | |||
], | |||
[onlyTotalControl], | |||
[percentageThresholdControl], |
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.
Oh nice bycatch
superset-frontend/plugins/plugin-chart-echarts/src/constants.ts
Outdated
Show resolved
Hide resolved
OMG. It's amazing! |
LOVE this :) Nice work! |
SUMMARY
Echarts don't support stream graph for area chart. This PR implements stream graph for Echarts Area and other Timeseries charts to achieve feature parity with legacy NVD3 charts.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Stream graph area chart:
Stream graph bar chart:
Stream graph area chart with categorical x axis:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
Current: 0.21 s
10+: 0.12 s
100+: 0.11 s
1000+: 0.12 s