@empoweredvote/ev-ui 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -161,7 +161,7 @@ function RadarChartCore({
|
|
|
161
161
|
const max = ((_a = topic == null ? void 0 : topic.stances) == null ? void 0 : _a.length) || 10;
|
|
162
162
|
const pct = Math.min(value / max * 10, 10);
|
|
163
163
|
const angle = 2 * Math.PI * index / numSpokes;
|
|
164
|
-
const adjusted = value === 0 ? 0 : invertedSpokes[shortTitle] ?
|
|
164
|
+
const adjusted = value === 0 ? 0 : invertedSpokes[shortTitle] ? (max + 1) * 10 / max - pct : pct;
|
|
165
165
|
const r = adjusted / 10 * radius;
|
|
166
166
|
const x = centerX + r * Math.sin(angle);
|
|
167
167
|
const y = centerY - r * Math.cos(angle);
|
|
@@ -186,7 +186,7 @@ function RadarChartCore({
|
|
|
186
186
|
const max = ((_b = topic == null ? void 0 : topic.stances) == null ? void 0 : _b.length) || 10;
|
|
187
187
|
const pct = Math.min(value / max * 10, 10);
|
|
188
188
|
const angle = 2 * Math.PI * index / numSpokes;
|
|
189
|
-
const adjusted = value === 0 ? 0 : invertedSpokes[shortTitle] ?
|
|
189
|
+
const adjusted = value === 0 ? 0 : invertedSpokes[shortTitle] ? (max + 1) * 10 / max - pct : pct;
|
|
190
190
|
const r = adjusted / 10 * radius;
|
|
191
191
|
const x = centerX + r * Math.sin(angle);
|
|
192
192
|
const y = centerY - r * Math.cos(angle);
|