Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partition Chart renders subcategories incorrectly when using more than two dimensions #32042

Open
2 of 3 tasks
geido opened this issue Jan 30, 2025 · 3 comments
Open
2 of 3 tasks
Labels
preset:bounty:bug Bugs that have been selected by Preset and have a bounty attached. preset:bounty Issues that have been selected by Preset and have a bounty attached. viz:charts:partition Related to the Partition chart

Comments

@geido
Copy link
Member

geido commented Jan 30, 2025

Bug description

Description

When creating a Partition Chart with more than two dimensions (e.g., category, subcategory, sub_subcategory), the chart renders entries incorrectly. Specifically:

  • Entries that belong to specific subcategories (a.1.1) are being grouped under unrelated categories (a.a.2), which is incorrect.
  • This issue causes misleading chart visualizations.

How to reproduce the bug

  1. Use the following dataset or SQL query:

SELECT 'a' AS category, 'a.1' AS subcategory, 'a.1.1' AS sub_subcategory UNION SELECT 'a' AS category, 'a.2' AS subcategory, 'a.2.1' AS sub_subcategory UNION SELECT 'a' AS category, 'a.2' AS subcategory, 'a.2.2' AS sub_subcategory

  1. Create a Partition Chart with it suing the following configuration:
    1. Set COUNT(*) as the metric.
    2. Use category, subcategory, and sub_subcategory as dimensions.
  2. Generate the Partition Chart.

Expected results

Subcategories (a.1.1) should appear under their respective parent subcategory (e.g., a.1).

Actual results

  • The a.1.1 entry incorrectly shows up under a.a.2.
  • Entries from different subcategories overlap or are misattributed in the visualization.

Known Workarounds

No workarounds are currently known

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.9

Node version

18 or greater

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • 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.
@dosubot dosubot bot added the viz:charts:partition Related to the Partition chart label Jan 30, 2025
@geido geido added preset:bounty Issues that have been selected by Preset and have a bounty attached. preset:bounty:bug Bugs that have been selected by Preset and have a bounty attached. labels Jan 30, 2025
@geido
Copy link
Member Author

geido commented Jan 30, 2025


🎉 Preset Bounty Available: $250 USD 🎉

To claim this bounty, please carefully follow the steps below.


📋 Steps to Participate

  1. Review Guidelines:
    Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

  2. Show Your Interest:
    Complete the Preset Bounty Program Survey and comment this issue to express your interest.

  3. Join the Slack Channel:
    After completing the survey, you’ll receive an invitation to the dedicated Apache Superset Slack channel.

  4. Get Assigned:
    To officially start, ensure a Bounty Program Manager has assigned you to this issue.

  5. Submit Your Solution:
    When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

  6. Claim Your Bounty:
    Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/1053


💡 Additional Notes

  • Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
  • Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

Good luck, and happy coding! 🎉

@b4s36t4
Copy link

b4s36t4 commented Jan 30, 2025

Can I get assigned to this issue please?

@DamianPendrak
Copy link
Contributor

Hi, I am interested in working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preset:bounty:bug Bugs that have been selected by Preset and have a bounty attached. preset:bounty Issues that have been selected by Preset and have a bounty attached. viz:charts:partition Related to the Partition chart
Projects
None yet
Development

No branches or pull requests

4 participants
@DamianPendrak @b4s36t4 @geido and others