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

fix: Total calculation in stacked Timeseries charts #24477

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

This PR fixes the following bugs:

  • The totals where not correctly calculated in stacked Timeseries charts when interacting with the legend
  • Double clicking a series was not exclusively selecting it.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2023-06-21.at.19.07.26.mov
Screen.Recording.2023-06-21.at.18.56.50.mov

TESTING INSTRUCTIONS

1 - Make sure the totals are correctly calculated for Timeseries charts when interacting with the legend.
2 - Make sure that double clicking on a series exclusively selects it

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

@michael-s-molina michael-s-molina marked this pull request as ready for review June 22, 2023 21:10
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Thanks for the fix + cleanup. One concern about bloating ChartProps, but other than that LGTM. Let's try to find some time to hack on Plugin Arch v2 sometime!

Comment on lines +98 to +99
/** Legend state */
legendState?: LegendState;
Copy link
Member

Choose a reason for hiding this comment

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

I want to raise the concern of bloating the number of different states we have here: Would it make sense to introduce something more generic, like chartState that could be leveraged for transporting other info, too? I assume this isn't the last time we need to ship back info from the plugin to transformProps, and having to add a new property can become tedious at some point. Thoughts? Alternatively, let's not do this now, but do a full cleanup when we get around to building the new React-based plugin arch (v2).

Copy link
Member Author

Choose a reason for hiding this comment

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

I totally agree with your concern. I have many other concerns regarding the current plugin architecture but I think the best approach would be to stop amending the flawed design and think about a cleaner v2. One thing I think is really hard with the current structure is to properly test the plugin behaviors.

@michael-s-molina michael-s-molina merged commit c5b4ecd into apache:master Jun 23, 2023
26 checks passed
michael-s-molina added a commit to airbnb/superset-fork that referenced this pull request Jun 27, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants