From 36b63db14d6955b0460995fc0bd601320d71f972 Mon Sep 17 00:00:00 2001 From: Theresa Henze Date: Thu, 13 Oct 2022 18:13:50 +0200 Subject: [PATCH] fix: use same order of quadrants for radar and grid visualization Refs: #141 --- src/components/Chart/BlipPoints.tsx | 2 +- src/components/RadarGrid/RadarGrid.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Chart/BlipPoints.tsx b/src/components/Chart/BlipPoints.tsx index e88d022..0797908 100644 --- a/src/components/Chart/BlipPoints.tsx +++ b/src/components/Chart/BlipPoints.tsx @@ -36,7 +36,7 @@ function generateCoordinates( Multiples of PI/2. To apply the calculated position to the specific quadrant. Order here is counter-clockwise, so we need to "invert" quadrant positions (i.e. swap 2 with 4) */ - const shift = (pi * [1, 4, 3, 2][blip.quadrantPosition - 1]) / 2; + const shift = (pi * [1, 4, 2, 3][blip.quadrantPosition - 1]) / 2; return { x: xScale(Math.cos(randomDegree + shift) * radius), diff --git a/src/components/RadarGrid/RadarGrid.tsx b/src/components/RadarGrid/RadarGrid.tsx index b71dcf2..944ba47 100644 --- a/src/components/RadarGrid/RadarGrid.tsx +++ b/src/components/RadarGrid/RadarGrid.tsx @@ -14,8 +14,8 @@ const QuadrantLabel: React.FC<{ const stylesMap = [ { top: 0, left: 0 }, { top: 0, right: 0 }, - { bottom: 0, right: 0 }, { bottom: 0, left: 0 }, + { bottom: 0, right: 0 }, ]; return (