Skip to content

Commit

Permalink
fix chart height
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Apr 4, 2023
1 parent 4cb766e commit 3b5be8a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function DrillByChart({
let groupbyField: any = [];
const [chartDataResult, setChartDataResult] = useState();

if (groupbyFieldName && column) {
if (column) {
groupbyField = Array.isArray(formData[groupbyFieldName])
? [column.column_name]
: column.column_name;
Expand Down Expand Up @@ -82,8 +82,8 @@ export default function DrillByChart({
chartType={formData.viz_type}
enableNoResults
formData={updatedFormData}
height="100%"
queriesData={chartDataResult}
height="100%"
width="100%"
/>
) : (
Expand Down
22 changes: 15 additions & 7 deletions superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,21 @@ export default function DrillByModal({
destroyOnClose
maskClosable={false}
>
{metadataBar}
<DrillByChart
column={column}
filters={filters}
formData={formData}
groupbyFieldName={groupbyFieldName}
/>
<div
css={css`
display: flex;
flex-direction: column;
height: 100%;
`}
>
{metadataBar}
<DrillByChart
column={column}
filters={filters}
formData={formData}
groupbyFieldName={groupbyFieldName}
/>
</div>
</Modal>
);
}

0 comments on commit 3b5be8a

Please sign in to comment.