SBIN2010 opened a new pull request, #45680: URL: https://github.com/apache/superset/pull/45680
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> The ECharts Waterfall chart can now drive dashboard cross-filters. Clicking a bar filters other charts on the same dataset. Clicking the same bar again clears the filter. Bars outside the selection are dimmed, and the pointer cursor appears only while cross-filtering is enabled. What a click filters depends on the bar: - A chart without a breakdown filters the X-axis column (`IN`). - A breakdown bar filters the X-axis column and the breakdown column. - A period total filters the X-axis column only, and every bar of that period stays highlighted. - The grand total at the end of a chart without a breakdown is not a category. Clicking it does not emit a filter and does not clear the current one. It dims while another bar is selected. An empty value is sent as `IS NULL`. An empty string stays an empty string and is shown on the chip as `<empty string>`. Numeric labels such as years are not abbreviated. `bigint` values are stringified so the data mask stays JSON-serializable. A temporal X value is formatted on the chip with the axis time format. The filter itself matches the raw cell value (`IN` for cross-filters, `==` for drill). A time grain does not expand that value into a `TEMPORAL_RANGE`. Right-click opens Drill to detail and Drill by. Drill by puts the breakdown in the series filters and the X-axis value in the X-axis filters. Both actions are registered because the chart has a metric. An empty query result renders an empty chart instead of failing. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> 1. Create a Waterfall chart and add it to a dashboard that has cross-filtering enabled, next to another chart on the same dataset. Leave Show total on. 2. Click a period bar. The other chart should filter to that X value, the filter chip should show the raw category, and the other bars — including the grand total — should dim. The Waterfall itself should keep all of its bars. 3. Click the same bar again. The filter and the dimming should clear. 4. Click the grand total. Nothing should change. 5. Add a breakdown and click one of its bars. The filter should include both the period and the breakdown value. Click that period's total bar. The filter should keep only the period, and every bar of that period should stay bright. 6. Right-click a breakdown bar. Drill to detail should carry both columns. Drill by should offer the breakdown as the series filter and the period as the X-axis filter. 7. Turn cross-filtering off for the dashboard. Clicks should no longer emit a filter, and the cursor should stay the default. 8. Filter the Waterfall down to no rows. The chart should render empty instead of breaking. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [x] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
