diff --git a/client/package-lock.json b/client/package-lock.json index 6299861..e845a7b 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -15,6 +15,7 @@ "react": "^17.0.2", "react-collapsible": "^2.8.4", "react-dom": "^17.0.2", + "react-minimal-pie-chart": "^8.4.0", "react-scripts": "5.0.0", "web-vitals": "^2.1.4" } @@ -3470,6 +3471,11 @@ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" }, + "node_modules/@types/svg-path-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/svg-path-parser/-/svg-path-parser-1.1.3.tgz", + "integrity": "sha512-F1Y6lQIto5b2sKCseVUsFfY5J+8PIhhX4jrDVxpth4m7hwM2OdySh3iTLeR35lEhl/K4ZMEF+GDAwTl7yJcO5Q==" + }, "node_modules/@types/testing-library__jest-dom": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.2.tgz", @@ -12952,6 +12958,18 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "node_modules/react-minimal-pie-chart": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/react-minimal-pie-chart/-/react-minimal-pie-chart-8.4.0.tgz", + "integrity": "sha512-A0wG+6mRjboyMxMDrzQNWp+2+GSn2ai4ERzRFHLp/OCC45PwIR1DpDVjwedawO+5AtFpzBRQKSFm3ZUxrqIEzA==", + "dependencies": { + "@types/svg-path-parser": "^1.1.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18", + "react-dom": "^16.8.0 || ^17.0.0 || ^18" + } + }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -18237,6 +18255,11 @@ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==" }, + "@types/svg-path-parser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/svg-path-parser/-/svg-path-parser-1.1.3.tgz", + "integrity": "sha512-F1Y6lQIto5b2sKCseVUsFfY5J+8PIhhX4jrDVxpth4m7hwM2OdySh3iTLeR35lEhl/K4ZMEF+GDAwTl7yJcO5Q==" + }, "@types/testing-library__jest-dom": { "version": "5.14.2", "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.2.tgz", @@ -25001,6 +25024,14 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "react-minimal-pie-chart": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/react-minimal-pie-chart/-/react-minimal-pie-chart-8.4.0.tgz", + "integrity": "sha512-A0wG+6mRjboyMxMDrzQNWp+2+GSn2ai4ERzRFHLp/OCC45PwIR1DpDVjwedawO+5AtFpzBRQKSFm3ZUxrqIEzA==", + "requires": { + "@types/svg-path-parser": "^1.1.3" + } + }, "react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", diff --git a/client/package.json b/client/package.json index c0e7092..4f617be 100644 --- a/client/package.json +++ b/client/package.json @@ -10,6 +10,7 @@ "react": "^17.0.2", "react-collapsible": "^2.8.4", "react-dom": "^17.0.2", + "react-minimal-pie-chart": "^8.4.0", "react-scripts": "5.0.0", "web-vitals": "^2.1.4" }, diff --git a/client/src/App.js b/client/src/App.js index bdacb6b..81b8b03 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -5,6 +5,7 @@ import lists from "./modules/Generic/BilletBank"; import MilpacParse from "./modules/Generic/MilpacParse"; import StrengthCount from "./modules/Generic/StrengthCount"; import ErrorMessage from "./errorMessage"; +import { PieChart } from 'react-minimal-pie-chart'; const CLIENT_TOKEN = process.env.REACT_APP_CLIENT_TOKEN; const combatApiUrl = process.env.REACT_APP_COMBAT_API_URL; const reserveApiUrl = process.env.REACT_APP_RESERVE_API_URL; @@ -74,6 +75,10 @@ function MilpacRequest() { }); }, []); + var piechartArray = []; + + var testnumber = 500 + var milpacArray = []; milpacArray.push({ combat: milpacList, @@ -464,9 +469,9 @@ function MilpacRequest() { triggerOpenedClassName="Title" open={true} > - {/* We need to do a count for combined, 1-7, 2-7 and acd in that order*/}
+
+ +
@@ -46,6 +50,9 @@ function StrengthCount(props) { } } + piechartArray.push(combinedArray.length) + console.log(piechartArray) + return (