-
+ {setDisplayHideMetricsGraphButton != null ? (
+
+ ) : null}
{showMetricsGraph && (
<>
diff --git a/ui/packages/shared/profile/src/ProfileSelector/index.tsx b/ui/packages/shared/profile/src/ProfileSelector/index.tsx
index ff6ec5ff458..5f9ddd2108f 100644
--- a/ui/packages/shared/profile/src/ProfileSelector/index.tsx
+++ b/ui/packages/shared/profile/src/ProfileSelector/index.tsx
@@ -81,7 +81,7 @@ interface ProfileSelectorProps extends ProfileSelectorFeatures {
profileSelection: ProfileSelection | null;
comparing: boolean;
navigateTo: NavigateFunction;
- setDisplayHideMetricsGraphButton: Dispatch>;
+ setDisplayHideMetricsGraphButton?: Dispatch>;
suffix?: string;
utilizationMetrics?: UtilizationMetrics[];
utilizationMetricsLoading?: boolean;
@@ -138,7 +138,7 @@ const ProfileSelector = ({
data: profileTypesData,
error,
} = useProfileTypes(queryClient);
- const {heightStyle} = useMetricsGraphDimensions(comparing);
+ const {heightStyle} = useMetricsGraphDimensions(comparing, utilizationMetrics != null);
const {viewComponent} = useParcaContext();
const [queryBrowserMode, setQueryBrowserMode] = useURLState('query_browser_mode');