Skip to content

Commit

Permalink
tweaks column layout of grid in Vizbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Aug 9, 2023
1 parent fb0ee4e commit 91b102b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Vizbuilder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export const Vizbuilder = props => {
const filteredCharts = charts
.filter((d, i) => charts.findIndex(c => c.key === d.key) === i); // removes duplicate charts

const colProps = filteredCharts.length === 1 ? {span: 12} : filteredCharts.length === 2 ? {span: 6} : {sm: 6, lg: 4, xl: 3};
const colProps = filteredCharts.length === 1 ? {span: 12}
: filteredCharts.length === 2 ? {lg: 6}
: filteredCharts.length === 3 ? {lg: 6, xl: 4}
: {lg: 6, xl: 4, xxl: 3};

if (filteredCharts.length > 0) {
return (
Expand Down

0 comments on commit 91b102b

Please sign in to comment.