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

feat(sunburst): Added some options to adjust Sunburst chart view: innerRadius, outerRadius, donut, showNulls #30987

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bwa84
Copy link

@bwa84 bwa84 commented Nov 20, 2024

SUMMARY

Added some options to adjust Sunburst chart:

  • showNulls: allow to show / hide slices with null value
  • donut: allow to switch between donut / circle view (donut was fixed before)
  • innerRadius: allow to adjust inner radius when donut is checked
  • outerRadius: allow to adjust outer radius

AFTER SCREENSHOT / VIDEO

obraz

sunburst_demo.mov

TESTING INSTRUCTIONS

  • create or edit sunburst chart
  • switch to Customize control page
  • play with "Donut", "Inner Radius", "Outer Radius" & "Show values" options

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@dosubot dosubot bot added the viz:charts:sunburst Related to the Sunburst chart label Nov 20, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@rusackas
Copy link
Member

After screenshots (or video) of the controls in effect might help. I've started CI, and will hopefully remember to come back and spin up a test deployment if it passes.

@bwa84
Copy link
Author

bwa84 commented Nov 20, 2024

After screenshots (or video) of the controls in effect might help. I've started CI, and will hopefully remember to come back and spin up a test deployment if it passes.

After screenshot was added previously, now I added video also.

@bwa84
Copy link
Author

bwa84 commented Nov 20, 2024

Found bug with cross-filtering. Converting to draft for now.

@bwa84 bwa84 marked this pull request as draft November 20, 2024 22:17
@bwa84
Copy link
Author

bwa84 commented Nov 21, 2024

Little hint for beginner needed.
Bug that I found is not connected with this PR (checked in master & v4.0.1 release).
Can I fix it in this PR or should I fix it in a separate one?

@villebro
Copy link
Member

Little hint for beginner needed. Bug that I found is not connected with this PR (checked in master & v4.0.1 release). Can I fix it in this PR or should I fix it in a separate one?

@bwa84 please feel free to address the bug in this PR if it seems doable as a bycatch fix. But if it's a substantial change, having a dedicated PR for it could be advisable.

Fixed bug when only 1st and top level of sunburst can emit cross-filter (when >2 levels). Selecting other ended with error.
Comment on lines +55 to +58
innerRadius: 30,
outerRadius: 70,
donut: true,
showNulls: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change how all current sunburst charts are rendered. While I'm not strongly against/for this, I'm not sure we want to forcefully change all current charts. For this reason I would recommend changing the defaults to align with the current behavior, and defer changing the defaults to a later date when there's been a decision to to change the defaults. Maybe we could discuss changing the defaults for the pie chart and sunburst chart in a forthcoming town hall? CC @rusackas @michael-s-molina

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default values were set with the same values that were hardcoded (innerRadius = 30, outerRadius = 70) or to keep current default behavior (donut = true, showNulls = true).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugins size/L viz:charts:sunburst Related to the Sunburst chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants