pankaj45 opened a new issue, #37882:
URL: https://github.com/apache/superset/issues/37882

   ### Bug description
   
   When clicking a stacked bar segment in Bar Chart, the emitted cross-filter 
incorrectly uses the metric label as the filter value instead of the groupby 
dimension value.
   
   As a result, downstream charts (e.g., Table) receive an invalid filter and 
return no rows.
   
   ### Expected Behavior
   When clicking a stacked segment representing:
   
   topics = 'cancellations'
   
   on day 2026-01-21
   
   The emitted filter should be:
   
   ```shell
   WHERE topics IN ('cancellations')
   ``` 
   
   ### Actual Behavior
   The emitted filter becomes:
   
   ```shell
   WHERE topics IN ('Intent')
   ``` 
   
   Where Intent is the metric label, not a valid value in the topics column.
   This causes dependent charts to return no results.
   
   
   ### Analysis
   
   The issue appears to originate from how the ECharts click event is mapped 
into the dashboard dataMask.
   
   For stacked bar charts:
   
   The ECharts seriesName appears to contain a concatenation of metric + group 
value.
   
   The cross-filter handler extracts the wrong token (metric label) when 
constructing the filter.
   
   The emitted filter is applied to the first groupby column (topics), but with 
the wrong value.
   
   This suggests the parsing logic in the cross-filter data mask builder is 
incorrectly using the metric label instead of the dimension value.
   
   Likely related to:
   
   - getCrossFilterDataMask
   - ECharts event handler for bar chart
   - seriesName parsing logic for stacked charts
   
   ### Impact
   
   This prevents stacked ECharts Bar Charts from being usable as cross-filter 
emitters when a dimension is used for stacking.
   
   It breaks a core dashboard interaction pattern.
   
   ### Screenshots/recordings
   
   <img width="1028" height="814" alt="Image" 
src="https://github.com/user-attachments/assets/38b4636d-222f-413a-bf5d-11b65537f820";
 />
   <img width="1677" height="858" alt="Image" 
src="https://github.com/user-attachments/assets/1e4b5ce5-f5c8-47f3-8e93-6727c988038f";
 />
   <img width="1692" height="892" alt="Image" 
src="https://github.com/user-attachments/assets/16a65751-6824-49d9-a2d6-211969addf56";
 />
   
   ### Superset version
   
   6.0.0
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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]

Reply via email to