Skip to content

"View as Table" option for Mixed Charts causes first result set to overlap second result set #42000

Description

@MallikarjunaReddyN

Bug description

When viewing a Mixed Chart and selecting "View as Table", the table output is rendered incorrectly when multiple query result sets are returned.

The first result set overlaps the second result set, making the table difficult to read and causing data from different queries to appear on top of each other.

Steps to Reproduce

  • Create a Mixed Chart with multiple queries/metrics that generate more than one result set.
  • Run the chart and ensure it renders successfully.
  • Open the chart menu and select "View as Table".
  • Observe the rendered table output.

Current Behavior

  • The first result set overlaps the second result set.
  • Table sections are not properly separated.
  • Data from multiple result sets becomes difficult to read.

Expected Behavior

  • Each result set should be displayed in its own clearly separated table section.
  • Adequate spacing and layout should be applied between result sets.
  • No overlapping or visual corruption should occur.

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.11

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.

Activity

  1. dosubot commented on Jul 13, 2026

    @dosubot

    This bug was addressed in PR #37777, which was merged on June 29, 2026. The fix adds logic to properly unmount inactive result table tabs so they don't remain visible and overlap when switching between "Results", "Results 2", etc. in the DataTablesPane for mixed charts.

    If you're on master / latest-dev, this fix should already be included. Could you confirm whether you're seeing this on a build that includes that PR? If you pulled master before June 29, 2026, you'd still see the overlap.

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about superset Share Dosu with your team

  2. MallikarjunaReddyN commented on Jul 13, 2026

    @MallikarjunaReddyN
    ContributorAuthor

    @dosu Thanks for the suggestion. I verified the fix from #37777, but the issue is still reproducible on the latest master/latest-dev.

    The changes in #37777 do not fully resolve the problem. When opening View as Table for a Mixed Chart and switching to the second result set, the first result set still overlaps the second one.

    I've reproduced this on the latest development branch, so it appears the issue is not completely addressed and may require additional investigation.

    Image
  3. dosubot commented on Jul 13, 2026

    @dosubot

    Thanks for confirming and testing this. You're right — looking at the current code, the fix from #37777 doesn't fully resolve the issue because the tab children are still rendered unconditionally [1]:

    .map((pane, idx) => ({
      key: idx === 0 ? ResultTypes.Results : `${ResultTypes.Results} ${idx + 1}`,
      label: idx === 0 ? t('Results') : t('Results %s', idx + 1),
      children: pane,  // always rendered regardless of active tab
    }));

    Since the Tabs component doesn't use destroyInactiveTabPane, Ant Design keeps all inactive tab panes in the DOM. Combined with the CSS positioning (nested position: relative and height: 100% on .ant-tabs-tabpane), the inactive result tables remain visible and overlap the active one [2].

    A fix would be to conditionally render tab children based on the active tab key:

    .map((pane, idx) => {
      const tabKey = idx === 0 ? ResultTypes.Results : `${ResultTypes.Results} ${idx + 1}`;
      return {
        key: tabKey,
        label: idx === 0 ? t('Results') : t('Results %s', idx + 1),
        children: activeTabKey === tabKey ? pane : null,
      };
    });

    Alternatively, adding destroyInactiveTabPane to the Tabs component [3] would also solve this by unmounting inactive tab content from the DOM:

    <Tabs
      destroyInactiveTabPane
      tabBarExtraContent={CollapseButton}
      activeKey={panelOpen ? activeTabKey : ''}
      onTabClick={handleTabClick}
      items={tabItems}
    />

    Either approach should prevent the overlap. The conditional rendering option is more explicit and avoids potential re-mount costs when switching back and forth between tabs.

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about superset Share Dosu with your team

  4. rusackas commented on Jul 13, 2026

    @rusackas
    Member

    @MallikarjunaReddyN would you be willing/interested in opening a PR taking Dosu's suggestion? If not, I can.

  5. MallikarjunaReddyN commented on Jul 13, 2026

    @MallikarjunaReddyN
    ContributorAuthor

    @rusackas I’d be interested in taking this on.

  6. MallikarjunaReddyN commented on Jul 14, 2026

    @MallikarjunaReddyN
    ContributorAuthor

    @dosu This issue appears to be resolved by the recently merged PR #41636.

    The PR updates the flex layout styling from:

    .ant-tabs-tabpane {
    display: flex;
    flex-direction: column;
    }

    to:

    .ant-tabs-content {
    display: flex;
    flex-direction: column;
    }

    I verified the latest changes and can confirm that switching between result sets in View as Table no longer causes the first result set to overlap subsequent result sets.

    Image
  7. rusackas commented on Jul 14, 2026

    @rusackas
    Member

    Glad to hear it's fixed! Thanks for the deep dive!

  8. MallikarjunaReddyN commented on Jul 30, 2026

    @MallikarjunaReddyN
    ContributorAuthor

    @rusackas the issue is appearing again in latest-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions