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

Chart width not refreshed properly while tab switch #21852

Closed
PrabuSarvesan opened this issue Oct 18, 2022 · 1 comment
Closed

Chart width not refreshed properly while tab switch #21852

PrabuSarvesan opened this issue Oct 18, 2022 · 1 comment
Labels
#bug Bug report

Comments

@PrabuSarvesan
Copy link

PrabuSarvesan commented Oct 18, 2022

How to reproduce the bug

  1. Open Sales dashboard in Superset application.
  2. Go to Exploratory tab and toggle(expand/collapse) the dashboard filter.
  3. Switch back again to Sales Overview tab.

Expected results

Total revenue chart should be resized based on modified size.

Actual results

Total revenue chart was not resized with modified size. This issue occurs for all charts.

Screenshots

image

Environment

  • browser type and version: Chrome
  • superset version: Latest source from GitHub

Checklist

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

Additional context

shouldComponentUpdate returns false in superset-frontend/src/dashboard/components/gridComponents/Chart.jsx while tab switch. Following condition was not met,
if (
nextProps.width !== this.props.width ||
nextProps.height !== this.props.height
) {
clearTimeout(this.resizeTimeout);
this.resizeTimeout = setTimeout(this.resize, RESIZE_TIMEOUT);
}

@Shazad-khan
Copy link

image

It is working as expected please recheck it and close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants