This is an automated email from the ASF dual-hosted git repository. msyavuz pushed a commit to branch msyavuz/fix/chart-height-filter in repository https://gitbox.apache.org/repos/asf/superset.git
commit 57889c67f271323798ac47ef971b8aff6d93a8ea Author: Mehmet Salih Yavuz <[email protected]> AuthorDate: Fri Jul 18 19:09:18 2025 +0300 fix(Chart): Calculate chart height correctly --- .../src/dashboard/components/gridComponents/Chart.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx index 299f329b67..052980cf58 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx @@ -213,11 +213,15 @@ const Chart = props => { const getHeaderHeight = useCallback(() => { if (headerRef.current) { - const computedStyle = getComputedStyle( + const computedMarginBottom = getComputedStyle( headerRef.current, ).getPropertyValue('margin-bottom'); - const marginBottom = parseInt(computedStyle, 10) || 0; - return headerRef.current.offsetHeight + marginBottom; + const marginBottom = parseInt(computedMarginBottom, 10) || 0; + const computedHeight = getComputedStyle( + headerRef.current, + ).getPropertyValue('height'); + const height = parseInt(computedHeight, 10) || DEFAULT_HEADER_HEIGHT; + return height + marginBottom; } return DEFAULT_HEADER_HEIGHT; }, [headerRef]);
