diff --git a/CHANGELOG.md b/CHANGELOG.md index 338dd5cbd..cc19681be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ You can also check the chart and the cube has been updated in the meantime and contains new values in the color dimension - Fixed preview via API (iframe) + - Fixed cut table scroll-bars and unnecessary scroll of bar charts when + switching between chart types # [5.0.2] - 2024-11-28 diff --git a/app/charts/shared/containers.tsx b/app/charts/shared/containers.tsx index f5749d91b..be500bcbc 100644 --- a/app/charts/shared/containers.tsx +++ b/app/charts/shared/containers.tsx @@ -7,6 +7,7 @@ import { useChartState } from "@/charts/shared/chart-state"; import { CalculationToggle } from "@/charts/shared/interactive-filter-calculation-toggle"; import { useObserverRef } from "@/charts/shared/use-size"; import { + getChartConfig, hasChartConfigs, isLayoutingFreeCanvas, useConfiguratorState, @@ -18,6 +19,8 @@ export const useStyles = makeStyles<{}, {}, "chartContainer">(() => ({ chartContainer: { overflow: "hidden", position: "relative", + display: "flex", + flexDirection: "column", width: "100%", flexGrow: 1, }, @@ -25,12 +28,17 @@ export const useStyles = makeStyles<{}, {}, "chartContainer">(() => ({ export const ChartContainer = ({ children }: { children: ReactNode }) => { const [state] = useConfiguratorState(hasChartConfigs); + const chartConfig = getChartConfig(state); const isFreeCanvas = isLayoutingFreeCanvas(state); const ref = useObserverRef(); const { bounds } = useChartState(); const classes = useStyles(); + return (