alex-poor opened a new pull request, #41104: URL: https://github.com/apache/superset/pull/41104
### SUMMARY Cross-filtering by X-axis value on bar charts **without dimensions** (added in #37407 for #25334) is broken when the chart's **orientation is horizontal**: clicking a bar filters every connected chart down to zero rows. The click/context-menu handlers read the clicked category from `data[0]`. For a horizontal bar the ECharts data tuple is value-first (`[value, category]`), so `data[0]` is the **metric value**, not the category. The emitted filter becomes e.g. `category_col IN [54886]`, which matches nothing. This PR uses the orientation-independent category value (`name`) in both the `click` and `contextmenu` cross-filter paths — matching what the drill-to-detail logic in the same file already does (`eventParams.name`). Fixes #41102. ### BEFORE/AFTER **Before:** clicking a bar in a horizontal, dimensionless categorical bar chart applies a cross-filter on the metric value → all other charts show no data. **After:** the cross-filter is applied on the clicked category (e.g. `category_col IN ['Product A']`) regardless of orientation. Vertical bars are unaffected. ### TESTING INSTRUCTIONS 1. Create a Bar Chart (`echarts_timeseries_bar`) with a categorical column as the X-axis, a `COUNT(*)` metric, **no Dimensions**, and **Orientation: Horizontal**. 2. Add it to a dashboard with another chart sharing the column, cross-filters enabled. 3. Click a bar → connected charts now filter to the clicked category instead of going blank. Unit test added in `EchartsTimeseries.test.tsx` covering a horizontal bar (value-first data tuple `[100, 'Product A']`), asserting the filter uses the category (`['Product A']`) and not the metric (`100`). The existing vertical test continues to pass. ### ADDITIONAL INFORMATION - [ ] Has associated issue: Fixes #41102 - [x] Required feature flags: n/a - [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 - [ ] 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]
