Repository navigation
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🟡 Changes recommended
Display-based identity collisions can merge distinct nodes and break filter selection, while repeated link scans and inverted opacity cause performance and highlighting defects.
3 open issues
What changed in this PR
Adds cross-filtering and drill actions to Superset’s ECharts Sankey chart, allowing nodes and links to filter other dashboard charts.
Changes:
- Adds click-to-filter, repeat-click clearing, and context-menu drill actions.
- Tracks node ownership and raw values, with selection-based dimming and null/empty-string handling.
- Registers interactive capabilities and adds helper, transformation, and event-handler tests.
| File | Description |
|---|---|
superset-frontend/plugins/plugin-chart-echarts/test/Sankey/transformProps.test.ts |
Tests node ownership, dimming, labels, and cursor behavior. |
superset-frontend/plugins/plugin-chart-echarts/test/Sankey/Sankey.test.tsx |
Tests click filtering, clearing, and drill-menu payloads. |
superset-frontend/plugins/plugin-chart-echarts/test/Sankey/crossFilter.test.ts |
Tests filter construction, special values, and selection visibility. |
superset-frontend/plugins/plugin-chart-echarts/src/Sankey/transformProps.ts |
Adds node metadata, selection styling, and interaction props. |
superset-frontend/plugins/plugin-chart-echarts/src/Sankey/Sankey.tsx |
Handles filtering clicks and drill context menus. |
superset-frontend/plugins/plugin-chart-echarts/src/Sankey/index.ts |
Registers cross-filtering and drill capabilities. |
superset-frontend/plugins/plugin-chart-echarts/src/Sankey/crossFilter.ts |
Introduces selection, filter, label, and dimming helpers. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45908 +/- ##
==========================================
+ Coverage 84.73% 84.77% +0.03%
==========================================
Files 3069 3070 +1
Lines 205767 205979 +212
Branches 48388 48473 +85
==========================================
+ Hits 174350 174611 +261
+ Misses 28123 28074 -49
Partials 3294 3294
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|


SUMMARY
The Sankey chart can now cross-filter a dashboard, and it supports Drill to detail and Drill by. the dashboard enables cross-filtering the same way it does for the other ECharts.
A second click on the same node or link clears the selection.
IN, orIS NULLwhen the value is null). The selected link and its two endpoints stay bright. Drill to detail applies both columns. Drill by is not offered, because a link already fixes both dimensions.sourceortarget). Flows on the other side dim. Drill by replaces that same control (sourceortarget). Which column is chosen follows the query order, including sort-by-metric.NULLisIS NULLand the chip shows<NULL>. An empty string staysIN ['']and the chip shows<empty string>.bigintis sent as a string so it does not share a selection key with a plain number. Numeric labels are not passed through the smart number formatter, so an id or a year is not abbreviated.filterStatestill dims nodes and links that are outside the selection, including when the chart is not emitting. The pointer cursor is shown only while cross-filtering is emitted.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
sourceortarget). Right-click a link. Drill to detail should include both columns, and Drill by should be absent.IS NULLwith chip<NULL>. The empty string filter isIN ['']with chip<empty string>.filterState, nodes and links outside it still dim.ADDITIONAL INFORMATION