You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by pk...@apache.org on 2021/05/10 20:05:07 UTC

[superset] branch master updated: fix: White space between Chart and Data panel in Explore (#14495)

This is an automated email from the ASF dual-hosted git repository.

pkdotson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new e21beb7  fix: White space between Chart and Data panel in Explore (#14495)
e21beb7 is described below

commit e21beb76f100dedaaeff47c53f9b0c530f63bcab
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Mon May 10 23:03:43 2021 +0300

    fix: White space between Chart and Data panel in Explore (#14495)
    
    * Adjust white space
    
    * Adjust chart padding
---
 superset-frontend/src/explore/components/DataTablesPane/index.tsx | 1 +
 superset-frontend/src/explore/components/ExploreChartPanel.jsx    | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/explore/components/DataTablesPane/index.tsx b/superset-frontend/src/explore/components/DataTablesPane/index.tsx
index 62229c4..389e021 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/index.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/index.tsx
@@ -93,6 +93,7 @@ const CollapseWrapper = styled.div`
         height: calc(100% - ${({ theme }) => theme.gridUnit * 8}px);
 
         .ant-collapse-content-box {
+          padding-top: 0;
           height: 100%;
         }
       }
diff --git a/superset-frontend/src/explore/components/ExploreChartPanel.jsx b/superset-frontend/src/explore/components/ExploreChartPanel.jsx
index 67c4108..9b8216a 100644
--- a/superset-frontend/src/explore/components/ExploreChartPanel.jsx
+++ b/superset-frontend/src/explore/components/ExploreChartPanel.jsx
@@ -58,7 +58,8 @@ const propTypes = {
 
 const GUTTER_SIZE_FACTOR = 1.25;
 
-const CHART_PANEL_PADDING = 30;
+const CHART_PANEL_PADDING_HORIZ = 30;
+const CHART_PANEL_PADDING_VERTICAL = 15;
 const HEADER_PADDING = 15;
 
 const STORAGE_KEYS = {
@@ -183,8 +184,9 @@ const ExploreChartPanel = props => {
 
   const renderChart = useCallback(() => {
     const { chart } = props;
-    const newHeight = calcSectionHeight(splitSizes[0]) - CHART_PANEL_PADDING;
-    const chartWidth = chartPanelWidth - CHART_PANEL_PADDING;
+    const newHeight =
+      calcSectionHeight(splitSizes[0]) - CHART_PANEL_PADDING_VERTICAL;
+    const chartWidth = chartPanelWidth - CHART_PANEL_PADDING_HORIZ;
     return (
       chartWidth > 0 && (
         <ChartContainer