Skip to content

Commit

Permalink
fix: White space between Chart and Data panel in Explore (#14495)
Browse files Browse the repository at this point in the history
* Adjust white space

* Adjust chart padding
  • Loading branch information
geido committed May 10, 2021
1 parent 77bc51f commit e21beb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e21beb7

Please sign in to comment.