diff --git a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx index b594e7f00e..7b0d7a4f7f 100644 --- a/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx +++ b/packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/components/GraphWidgetBarChart.tsx @@ -108,15 +108,6 @@ export const GraphWidgetBarChart = ({ const [chartHeight, setChartHeight] = useState(0); const containerRef = useRef(null); - const debouncedSetChartDimensions = useDebouncedCallback( - (width: number, height: number) => { - setChartWidth(width); - setChartHeight(height); - }, - - 300, - ); - const setActiveBarTooltip = useSetRecoilComponentState( graphWidgetBarTooltipComponentState, ); @@ -363,7 +354,8 @@ export const GraphWidgetBarChart = ({ { - debouncedSetChartDimensions(width, height); + setChartWidth(width); + setChartHeight(height); }} /> (null); const [chartWidth, setChartWidth] = useState(0); - const debouncedSetChartWidth = useDebouncedCallback( - (width: number) => setChartWidth(width), - 300, - ); - const formatOptions: GraphValueFormatOptions = { displayType, decimals, @@ -291,7 +286,7 @@ export const GraphWidgetLineChart = ({ > debouncedSetChartWidth(width)} + onDimensionChange={({ width }) => setChartWidth(width)} />