diff --git a/Client/src/Pages/PageSpeed/Details/Charts/PieChart.jsx b/Client/src/Pages/PageSpeed/Details/Charts/PieChart.jsx index be3b0cbb8..ff9fa3df2 100644 --- a/Client/src/Pages/PageSpeed/Details/Charts/PieChart.jsx +++ b/Client/src/Pages/PageSpeed/Details/Charts/PieChart.jsx @@ -20,12 +20,18 @@ const PieCenterLabel = ({ value, color, setExpand }) => { transform={`translate(${width / 2}, ${height / 2})`} onMouseEnter={() => setExpand(true)} > - + { // Compute the midpoint angle in radians const angle = (((startAngle + endAngle) / 2) * Math.PI) / 180; - const radius = height / 3.5; // length from center of the circle to where the text is positioned + const radius = height / 4; // length from center of the circle to where the text is positioned // Calculate x and y positions const x = Math.sin(angle) * radius; @@ -74,10 +80,11 @@ const PieValueLabel = ({ value, startAngle, endAngle, color, highlighted }) => { y={y} style={{ fill: highlighted ? color : "rgba(0,0,0,0)", - fontSize: "12px", + fontSize: 12, textAnchor: "middle", dominantBaseline: "central", userSelect: "none", + pointerEvents: "none", }} > +{value} @@ -181,8 +188,8 @@ const PieChart = ({ audits }) => { cornerRadius: 2, highlightScope: { faded: "global", highlighted: "series" }, faded: { - innerRadius: 63, - outerRadius: 70, + innerRadius: 73, + outerRadius: 80, additionalRadius: -20, arcLabelRadius: 5, }, @@ -197,7 +204,7 @@ const PieChart = ({ audits }) => { return props; }; - const pieSize = { width: 210, height: 200 }; + const pieSize = { width: 230, height: 230 }; const pieData = getPieData(audits); const colorMap = getColors(performance); @@ -215,7 +222,7 @@ const PieChart = ({ audits }) => { color: colorMap.bg, }, ], - outerRadius: 67, + outerRadius: 77, cx: pieSize.width / 2, }, ...pieData, @@ -260,7 +267,7 @@ const PieChart = ({ audits }) => { color: colorMap.bg, }, ], - outerRadius: 67, + outerRadius: 77, cx: pieSize.width / 2, }, { @@ -270,8 +277,8 @@ const PieChart = ({ audits }) => { color: colorMap.stroke, }, ], - innerRadius: 63, - outerRadius: 70, + innerRadius: 73, + outerRadius: 80, paddingAngle: 5, cornerRadius: 2, startAngle: 0, diff --git a/Client/src/Pages/PageSpeed/Details/index.jsx b/Client/src/Pages/PageSpeed/Details/index.jsx index 042347c67..372fbb720 100644 --- a/Client/src/Pages/PageSpeed/Details/index.jsx +++ b/Client/src/Pages/PageSpeed/Details/index.jsx @@ -305,7 +305,8 @@ const PageSpeedDetails = () => { textAlign="center" minWidth="300px" flex={1} - p={theme.spacing(12)} + pt={theme.spacing(6)} + pb={theme.spacing(12)} >