SBIN2010 opened a new pull request, #45908:
URL: https://github.com/apache/superset/pull/45908

   <!---
   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 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.
   - **Link.** Filters the source column and the target column together (`IN`, 
or `IS NULL` when 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.
   - **Node.** A Sankey node is one label, even when that label appears in both 
columns. The filter uses the column of the first row that introduced the label, 
so an intermediate stage filters only that side (`source` or `target`). Flows 
on the other side dim. Drill by replaces that same control (`source` or 
`target`). Which column is chosen follows the query order, including 
sort-by-metric.
   - **Values.** `NULL` is `IS NULL` and the chip shows `<NULL>`. An empty 
string stays `IN ['']` and the chip shows `<empty string>`. `bigint` is 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.
   - **Scope.** The emitting chart is excluded from its own dashboard filter. 
`filterState` still 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
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Create a Sankey chart with source, target, and a metric. Put it on a 
dashboard next to a table or another chart on the same dataset. In the chart's 
dashboard scope, include the other chart and leave the Sankey itself out.
   2. Click a link. The other chart should show only rows for that source and 
that target. The clicked link and its two nodes stay bright, and the other 
flows dim. The cursor is a pointer.
   3. Click the same link again. The filter clears and every flow is bright 
again.
   4. Click a node that appears only as a source, then one that appears only as 
a target. The filter column should match that role.
   5. Click a node that appears in both columns. The filter uses whichever 
column occurred first in the query result. Flows on the other side of that node 
dim. With "Sort by metric" enabled, confirm which side is selected still 
matches the first row that contains the label.
   6. Right-click a node. Drill to detail and Drill by should use that node's 
column (`source` or `target`). Right-click a link. Drill to detail should 
include both columns, and Drill by should be absent.
   7. Include a null and an empty string in the source or target column. The 
null filter is `IS NULL` with chip `<NULL>`. The empty string filter is `IN 
['']` with chip `<empty string>`.
   8. Turn cross-filtering off for the chart (or open it outside a dashboard 
scope). Clicks do not emit a filter, and the cursor is the default arrow. If a 
selection is already in `filterState`, nodes and links outside it still dim.
   
   ### 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]

  • [PR] feat(p... SBIN2010 (via GitHub) via notifications
    • Re: [P... netlify[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications
    • Re: [P... SBIN2010 (via GitHub) via notifications
    • Re: [P... SBIN2010 (via GitHub) via notifications
    • Re: [P... SBIN2010 (via GitHub) via notifications
    • Re: [P... Copilot (via GitHub) via notifications
    • Re: [P... codecov[bot] (via GitHub) via notifications

Reply via email to