diff --git a/apps/view/src/components/chart-components.tsx b/apps/view/src/components/chart-components.tsx index 4657a97a5..c2fe2b217 100644 --- a/apps/view/src/components/chart-components.tsx +++ b/apps/view/src/components/chart-components.tsx @@ -139,23 +139,30 @@ export const DefaultPieChart: FC = ({ ); const minSize = Math.min(height, width); - const labelWidth = labelRef.current?.offsetWidth || 0; - const labelHeight = labelRef.current?.offsetHeight || 0; + const labelWidth = labelRef.current?.offsetWidth || 120; + const labelHeight = labelRef.current?.offsetHeight || 50; + + const coords = label + ? getCoords( + label, + { width, height }, + { width: labelWidth, height: labelHeight } + ) + : undefined; return ( <> {label && ( {label.label}