superset icon indicating copy to clipboard operation
superset copied to clipboard

dist_bar row_limit doesn't work well with series and breakdown

Open michellethomas opened this issue 7 years ago • 2 comments

The distribution bar chart uses row limit that applies a limit to the end of a single query grouping by series and breakdown. Ideally there should be a limit on a subquery for the series groupby.

Here's an example using contribution, the results are limited to 10 rows so it looks like some states have all boys and 0 girls, showing incorrect data because it's getting truncated by the limit. image

When the fix is in, add a cypress test for the dist bar chart with series, breakdown, and limit 10.

  • [x] I have checked the superset logs for python stacktraces and included it here as text if any
  • [x] I have reproduced the issue with at least the latest released version of superset
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

master

Expected results

The limit applies to the number of series results that show up, and the breakdown of that series shows up and does not get limited.

Actual results

The limit applies to all rows returned series and breakdown

Steps to reproduce

Create a dist bar with a series and breakdown and add a low row limit

michellethomas avatar Sep 14 '18 22:09 michellethomas

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '19 15:04 stale[bot]

looks like this is still an issue and the bar chart doesn't have a series limit. will reopen

bkyryliuk avatar Nov 16 '22 20:11 bkyryliuk

@bkyryliuk have you tried the ECharts bar chart with the GENERIC_CHART_AXES flag turned on? It seems to work splendidly in that situation, and when we default that flag to true soon, I'm hoping it kills this antique issue :)

rusackas avatar Jan 23 '23 16:01 rusackas

This is still an issue I think (with both ECharts and legacy). I've checked the GENERIC_CHART_AXES flag, but it's already set to True and there is a comment showing it's deprecated, so I don't think this solved the problem.

See my screenshots (for ECharts bar chart). I have topics on my X-axis and sentiment labels as dimension. What I want is a total of 10 stacked bars that contain all sentiments of the breakdown dimension.

With row limit of 10000: Screenshot 2023-11-07 at 10 03 59

With row limit of 10: Screenshot 2023-11-07 at 10 04 17

ninaviereckel avatar Nov 07 '23 09:11 ninaviereckel

This issue has gone stale (again). I would believe we might indeed still have some issues with these limit controls in current Superset (3.x and newer, with echarts plugins), but we should file a new issue with updated context and a reproducible test case using example data. Closing this one since the plugin it was reported on no longer exists.

rusackas avatar Apr 04 '24 17:04 rusackas