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

feat: Adds the ECharts Sankey chart #29329

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Jun 21, 2024

SUMMARY

This PR creates the ECharts Sankey chart which visually tracks the movement and transformation of values across system stages. It also adds the chart migration logic (legacy ➡️ ECharts). Users can execute this migration using the CLI command and disable the legacy version with the VIZ_TYPE_DENYLIST configuration.

I added the minimum required controls to allow the migration but many more controls can be added in the future to improve the chart's customizability.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2024-06-24 at 16 14 19 Screenshot 2024-06-21 at 15 17 26

TESTING INSTRUCTIONS

Check all features.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 12.28070% with 50 lines in your changes missing coverage. Please review.

Project coverage is 70.32%. Comparing base (76d897e) to head (a69e9de).
Report is 356 commits behind head on master.

Files Patch % Lines
.../plugin-chart-echarts/src/Sankey/transformProps.ts 0.00% 38 Missing ⚠️
...gins/plugin-chart-echarts/src/Sankey/buildQuery.ts 0.00% 4 Missing ⚠️
...perset/migrations/shared/migrate_viz/processors.py 55.55% 4 Missing ⚠️
...plugins/plugin-chart-echarts/src/Sankey/Sankey.tsx 0.00% 2 Missing ⚠️
...d/plugins/plugin-chart-echarts/src/Sankey/index.ts 50.00% 1 Missing ⚠️
superset/cli/viz_migrations.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #29329      +/-   ##
==========================================
+ Coverage   60.48%   70.32%   +9.83%     
==========================================
  Files        1931     1961      +30     
  Lines       76236    78431    +2195     
  Branches     8568     8951     +383     
==========================================
+ Hits        46114    55159    +9045     
+ Misses      28017    21078    -6939     
- Partials     2105     2194      +89     
Flag Coverage Δ
hive 48.90% <50.00%> (-0.26%) ⬇️
javascript 57.95% <4.25%> (+0.24%) ⬆️
mysql 77.28% <50.00%> (?)
postgres 77.39% <50.00%> (?)
presto 53.51% <50.00%> (-0.30%) ⬇️
python 83.74% <50.00%> (+20.25%) ⬆️
sqlite 76.85% <50.00%> (?)
unit 59.20% <50.00%> (+1.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added risk:db-migration PRs that require a DB migration and removed packages labels Jun 24, 2024
@michael-s-molina michael-s-molina marked this pull request as ready for review June 24, 2024 19:18
@michael-s-molina michael-s-molina requested a review from a team as a code owner June 24, 2024 19:18
@michael-s-molina michael-s-molina removed the risk:db-migration PRs that require a DB migration label Jun 24, 2024
@dosubot dosubot bot added change:frontend Requires changing the frontend viz:charts:echarts Related to Echarts viz:charts:sankey Related to the Sankey chart labels Jun 24, 2024
Copy link
Member

@justinpark justinpark left a comment

Choose a reason for hiding this comment

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

LGTM!

@villebro
Copy link
Member

/testenv up

Copy link
Contributor

@villebro Ephemeral environment spinning up at http://35.161.245.38:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.


def _pre_action(self) -> None:
groupby = self.data.get("groupby")
if groupby and len(groupby) > 1:
Copy link
Member

@john-bodley john-bodley Jun 25, 2024

Choose a reason for hiding this comment

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

Should this be:

Suggested change
if groupby and len(groupby) > 1:
if groupby and len(groupby) == 2:

The answer seems to be no as the form-data could actually be corrupted with three or more groupings even though only the first two are used in legacy chart.

@michael-s-molina michael-s-molina merged commit c83d5b8 into apache:master Jun 26, 2024
57 of 70 checks passed
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

eschutho pushed a commit that referenced this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:frontend Requires changing the frontend plugins size/L viz:charts:echarts Related to Echarts viz:charts:sankey Related to the Sankey chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants