diff --git a/frontend/components/PerspectiveScoresSpiderChart.tsx b/frontend/components/PerspectiveScoresSpiderChart.tsx index e90af39..6cb7987 100644 --- a/frontend/components/PerspectiveScoresSpiderChart.tsx +++ b/frontend/components/PerspectiveScoresSpiderChart.tsx @@ -42,27 +42,29 @@ class PerspectiveScoresSpiderChart extends Component svg.append("circle") - .attr("cx", 200) - .attr("cy", 155) + .attr("cx", centerX) + .attr("cy", centerY) .attr("fill", "none") .attr("stroke", "rgba(224, 224, 224, 1)") .attr("stroke-width", "1px") @@ -72,7 +74,7 @@ class PerspectiveScoresSpiderChart extends Component { let x = Math.cos(angle) * radialScale(value); let y = Math.sin(angle) * radialScale(value); - return {"x": 200 + x, "y": 155 - y}; + return {"x": centerX + x, "y": centerY - y}; } const getLabelOffset = (index: number, label: string) => { @@ -80,8 +82,12 @@ class PerspectiveScoresSpiderChart extends Component