diff --git a/package.json b/package.json index 23874990..41990158 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "@sapphire/shapeshift": "^3.7.1", "@tanstack/react-query": "^4.19.1", "argon2": "^0.30.2", - "chart.js": "^4.0.1", "colorette": "^2.0.19", "cookie": "^0.5.0", "dayjs": "^1.11.7", @@ -64,10 +63,10 @@ "prismjs": "^1.29.0", "qrcode": "^1.5.1", "react": "^18.2.0", - "react-chartjs-2": "^5.0.1", "react-dom": "^18.2.0", "react-feather": "^2.0.10", "react-markdown": "^8.0.4", + "recharts": "^2.3.2", "recoil": "^0.7.6", "remark-gfm": "^3.0.1", "sharp": "^0.31.2" diff --git a/src/components/pages/Stats/Graphs.tsx b/src/components/pages/Stats/Graphs.tsx index bf822258..9459e1b0 100644 --- a/src/components/pages/Stats/Graphs.tsx +++ b/src/components/pages/Stats/Graphs.tsx @@ -1,113 +1,37 @@ -import { Box, Card, Grid, LoadingOverlay, MantineTheme, Title, useMantineTheme } from '@mantine/core'; -import { - ArcElement, - CategoryScale, - Chart as ChartJS, - ChartData, - ChartOptions, - LinearScale, - LineController, - LineElement, - PointElement, - Tooltip, -} from 'chart.js'; +import { Box, Card, Grid, LoadingOverlay, Title } from '@mantine/core'; + import { useStats } from 'lib/queries/stats'; import { bytesToHuman } from 'lib/utils/bytes'; import { useMemo } from 'react'; -import { Chart } from 'react-chartjs-2'; -ChartJS.register(ArcElement, LinearScale, CategoryScale, PointElement, LineController, LineElement, Tooltip); - -const CHART_OPTIONS = (theme: MantineTheme): ChartOptions => ({ - plugins: { - tooltip: { - enabled: true, - intersect: false, - }, - }, - - scales: { - y: { - ticks: { - callback: (value) => value.toLocaleString(), - color: theme.colors.gray[6], - }, - - grid: { - color: theme.colors.gray[8], - }, - }, - - x: { - ticks: { - color: theme.colors.gray[6], - }, - - grid: { - color: theme.colors.gray[8], - }, - }, - }, -}); - -export type LineChartData = ChartData<'line', number[], string>; -export type ChartDataMemo = { - views: LineChartData; - uploads: LineChartData; - storage: LineChartData; -} | void; +import { CartesianGrid, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'; export default function Graphs() { const historicalStats = useStats(10); - const theme = useMantineTheme(); - const chartOptions = useMemo(() => CHART_OPTIONS(theme), [theme]); - - const chartData = useMemo(() => { + const chartData = useMemo(() => { if (historicalStats.isLoading || !historicalStats.data) return; const data = Array.from(historicalStats.data).reverse(); - const labels = data.map((stat) => new Date(stat.created_at).toLocaleDateString()); - const viewData = data.map((stat) => stat.data.views_count); - const uploadData = data.map((stat) => stat.data.count); - const storageData = data.map((stat) => stat.data.size_num); + + const views = data.map((stat) => ({ + date: new Date(stat.created_at).toLocaleDateString(), + views: stat.data.views_count, + })); + const uploads = data.map((stat) => ({ + date: new Date(stat.created_at).toLocaleDateString(), + uploads: stat.data.count, + })); + + const storage = data.map((stat) => ({ + date: new Date(stat.created_at).toLocaleDateString(), + bytes: stat.data.size_num, + })); return { - views: { - labels, - datasets: [ - { - label: ' Views', - data: viewData, - borderColor: theme.colors.blue[6], - backgroundColor: theme.colors.blue[0], - }, - ], - }, - - uploads: { - labels, - datasets: [ - { - label: ' Uploads', - data: uploadData, - borderColor: theme.colors.blue[6], - backgroundColor: theme.colors.blue[0], - }, - ], - }, - - storage: { - labels, - datasets: [ - { - label: ' Storage', - data: storageData, - borderColor: theme.colors.blue[6], - backgroundColor: theme.colors.blue[0], - }, - ], - }, + views, + uploads, + storage, }; }, [historicalStats]); @@ -121,12 +45,15 @@ export default function Graphs() { Total Views {chartData && ( - + + + + + + + + + )} @@ -136,12 +63,21 @@ export default function Graphs() { Total Uploads {chartData && ( - + + + + + + + + + )} @@ -151,39 +87,21 @@ export default function Graphs() { Storage Usage {chartData && ( - bytesToHuman(value as number), - color: theme.colors.gray[6], - }, - }, - }, - - plugins: { - ...chartOptions.plugins, - tooltip: { - ...chartOptions.plugins.tooltip, - callbacks: { - label: (context) => { - const value = context.raw as number; - return bytesToHuman(value); - }, - }, - }, - }, - }} - style={{ maxHeight: '20vh' }} - /> + + + + + bytesToHuman(value as number)} /> + bytesToHuman(value as number)} /> + + + )} diff --git a/src/components/pages/Stats/Types.tsx b/src/components/pages/Stats/Types.tsx index 50a1b52c..6fab0688 100644 --- a/src/components/pages/Stats/Types.tsx +++ b/src/components/pages/Stats/Types.tsx @@ -1,10 +1,11 @@ import { Box, Card, Center, Grid, LoadingOverlay, Title } from '@mantine/core'; -import { ChartData } from 'chart.js'; + import { SmallTable } from 'components/SmallTable'; import { useStats } from 'lib/queries/stats'; import { colorHash } from 'lib/utils/client'; import { useMemo } from 'react'; -import { Pie } from 'react-chartjs-2'; + +import { Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts'; export default function Types() { const stats = useStats(); @@ -13,20 +14,13 @@ export default function Types() { const latest = stats.data[0]; - const chartData = useMemo<{ - uploadTypes: ChartData<'pie', number[], string>; - }>(() => { + const chartData = useMemo(() => { return { - uploadTypes: { - labels: latest?.data.types_count.map((x) => x.mimetype), - datasets: [ - { - data: latest?.data.types_count.map((x) => x.count), - label: ' Count', - backgroundColor: latest?.data.types_count.map((x) => colorHash(x.mimetype)), - }, - ], - }, + data: latest.data.types_count.map((type) => ({ + name: type.mimetype, + value: type.count, + fill: colorHash(type.mimetype), + })), }; }, [latest]); @@ -57,7 +51,24 @@ export default function Types() { -
{chartData && }
+
+ {chartData && ( + + + `${name} (${value})`} + /> + + + + )} +
diff --git a/yarn.lock b/yarn.lock index a600a397..bacfee4a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1138,6 +1138,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.1.2": + version: 7.20.7 + resolution: "@babel/runtime@npm:7.20.7" + dependencies: + regenerator-runtime: ^0.13.11 + checksum: 4629ce5c46f06cca9cfb9b7fc00d48003335a809888e2b91ec2069a2dcfbfef738480cff32ba81e0b7c290f8918e5c22ddcf2b710001464ee84ba62c7e32a3a3 + languageName: node + linkType: hard + "@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": version: 7.20.6 resolution: "@babel/runtime@npm:7.20.6" @@ -2414,6 +2423,75 @@ __metadata: languageName: node linkType: hard +"@types/d3-array@npm:^3.0.3": + version: 3.0.4 + resolution: "@types/d3-array@npm:3.0.4" + checksum: b0e398365fc1f638d48442e865e036d671c731b2b18f7a92e5172db1f60f5a38d4cd992693a29ad64b38e7ba981eb8c63a2aef95fbdcfbc4bf8926a9cb9ca978 + languageName: node + linkType: hard + +"@types/d3-color@npm:*": + version: 3.1.0 + resolution: "@types/d3-color@npm:3.1.0" + checksum: b1856f17d6366559a68eaba0164f30727e9dc5eaf1b3a6c8844354da228860240423d19fa4de65bff9da26b4ead8843eab14b1566962665412e8fd82c3810554 + languageName: node + linkType: hard + +"@types/d3-ease@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/d3-ease@npm:3.0.0" + checksum: 1be7c993643b5a08332e0ee146375a3845545d8deb423db5d152e0b061524385d2345ceccf968f75f605247b940dd3f9a144335fee2e7d935cddaf187afb7095 + languageName: node + linkType: hard + +"@types/d3-interpolate@npm:^3.0.1": + version: 3.0.1 + resolution: "@types/d3-interpolate@npm:3.0.1" + dependencies: + "@types/d3-color": "*" + checksum: 29ce472968b9e6611bdf0eeedaf89e8d6066190b52ced011d16d8183b8b9f8e6dd6516ca2b85242594942896299b42f37504d44e635f8fba3090c2c58594e21b + languageName: node + linkType: hard + +"@types/d3-path@npm:*": + version: 3.0.0 + resolution: "@types/d3-path@npm:3.0.0" + checksum: af7f45ea912cddd794c03384baba856f11e1f9b57a49d05a66a61968dafaeb86e0e42394883118b9b8ccadce21a5f25b1f9a88ad05235e1dc6d24c3e34a379ff + languageName: node + linkType: hard + +"@types/d3-scale@npm:^4.0.2": + version: 4.0.3 + resolution: "@types/d3-scale@npm:4.0.3" + dependencies: + "@types/d3-time": "*" + checksum: 76684da8519ab5f2210e647f74f96ece9c6816dea4ad5d76131121703a5268cc65687a8bc9ebbf4a44039482247336d98811ecc3fbfeb7f0122fdce4bb295547 + languageName: node + linkType: hard + +"@types/d3-shape@npm:^3.1.0": + version: 3.1.1 + resolution: "@types/d3-shape@npm:3.1.1" + dependencies: + "@types/d3-path": "*" + checksum: 8f1762ecdeb4833a3802be1c65363cbc7cca753d0b836a3855fde4ba12f8e6fc142dba3c5f6d669a9e89374cc6dc414464e4f2d04e72fafd4bc64819ce30bb63 + languageName: node + linkType: hard + +"@types/d3-time@npm:*, @types/d3-time@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/d3-time@npm:3.0.0" + checksum: e76adb056daccf80107f4db190ac6deb77e8774f00362bb6c76f178e67f2f217422fe502b654edbc9ac6451f6619045b9f6f5fe0db1ec5520e2ada377af7c72e + languageName: node + linkType: hard + +"@types/d3-timer@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/d3-timer@npm:3.0.0" + checksum: 1ec86b3808de6ecfa93cfdf34254761069658af0cc1d9540e8353dbcba161cdf1296a0724187bd17433b2ff16563115fd20b85fc89d5e809ff28f9b1ab134b42 + languageName: node + linkType: hard + "@types/debug@npm:4.1.7, @types/debug@npm:^4.0.0": version: 4.1.7 resolution: "@types/debug@npm:4.1.7" @@ -3540,13 +3618,6 @@ __metadata: languageName: node linkType: hard -"chart.js@npm:^4.0.1": - version: 4.0.1 - resolution: "chart.js@npm:4.0.1" - checksum: 013dabf3cd4ad2d71574e1d616906ae6f5b3f5914efb7f8ac7407bfe9b621e997f30966350bbdf31e3a1322c8c602715ef4dd6d0b6072590bb48db03861ac401 - languageName: node - linkType: hard - "checkpoint-client@npm:1.1.21": version: 1.1.21 resolution: "checkpoint-client@npm:1.1.21" @@ -3612,6 +3683,13 @@ __metadata: languageName: node linkType: hard +"classnames@npm:^2.2.5": + version: 2.3.2 + resolution: "classnames@npm:2.3.2" + checksum: 2c62199789618d95545c872787137262e741f9db13328e216b093eea91c85ef2bfb152c1f9e63027204e2559a006a92eb74147d46c800a9f96297ae1d9f96f4e + languageName: node + linkType: hard + "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -3993,6 +4071,13 @@ __metadata: languageName: node linkType: hard +"css-unit-converter@npm:^1.1.1": + version: 1.1.2 + resolution: "css-unit-converter@npm:1.1.2" + checksum: 07888033346a5128f34dbe2f72884c966d24e9f29db24416dcde92860242490617ef9a178ac193a92f730834bbeea026cdc7027701d92ba9bbbe59db7a37eb2a + languageName: node + linkType: hard + "csstype@npm:3.0.9": version: 3.0.9 resolution: "csstype@npm:3.0.9" @@ -4007,6 +4092,99 @@ __metadata: languageName: node linkType: hard +"d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:^3.1.6": + version: 3.2.1 + resolution: "d3-array@npm:3.2.1" + dependencies: + internmap: 1 - 2 + checksum: 0bed33cc33b70f9d48ccef3e7a5956e134862e09179bf14df0bf9c8fc0ec02b8f847d4f5e1d32729cd5e02032af1d0a32bcc968ff1333795028455a749994623 + languageName: node + linkType: hard + +"d3-color@npm:1 - 3": + version: 3.1.0 + resolution: "d3-color@npm:3.1.0" + checksum: 4931fbfda5d7c4b5cfa283a13c91a954f86e3b69d75ce588d06cde6c3628cebfc3af2069ccf225e982e8987c612aa7948b3932163ce15eb3c11cd7c003f3ee3b + languageName: node + linkType: hard + +"d3-ease@npm:^3.0.1": + version: 3.0.1 + resolution: "d3-ease@npm:3.0.1" + checksum: 06e2ee5326d1e3545eab4e2c0f84046a123dcd3b612e68858219aa034da1160333d9ce3da20a1d3486d98cb5c2a06f7d233eee1bc19ce42d1533458bd85dedcd + languageName: node + linkType: hard + +"d3-format@npm:1 - 3": + version: 3.1.0 + resolution: "d3-format@npm:3.1.0" + checksum: f345ec3b8ad3cab19bff5dead395bd9f5590628eb97a389b1dd89f0b204c7c4fc1d9520f13231c2c7cf14b7c9a8cf10f8ef15bde2befbab41454a569bd706ca2 + languageName: node + linkType: hard + +"d3-interpolate@npm:1.2.0 - 3, d3-interpolate@npm:^3.0.1": + version: 3.0.1 + resolution: "d3-interpolate@npm:3.0.1" + dependencies: + d3-color: 1 - 3 + checksum: a42ba314e295e95e5365eff0f604834e67e4a3b3c7102458781c477bd67e9b24b6bb9d8e41ff5521050a3f2c7c0c4bbbb6e187fd586daa3980943095b267e78b + languageName: node + linkType: hard + +"d3-path@npm:^3.1.0": + version: 3.1.0 + resolution: "d3-path@npm:3.1.0" + checksum: 2306f1bd9191e1eac895ec13e3064f732a85f243d6e627d242a313f9777756838a2215ea11562f0c7630c7c3b16a19ec1fe0948b1c82f3317fac55882f6ee5d8 + languageName: node + linkType: hard + +"d3-scale@npm:^4.0.2": + version: 4.0.2 + resolution: "d3-scale@npm:4.0.2" + dependencies: + d3-array: 2.10.0 - 3 + d3-format: 1 - 3 + d3-interpolate: 1.2.0 - 3 + d3-time: 2.1.1 - 3 + d3-time-format: 2 - 4 + checksum: a9c770d283162c3bd11477c3d9d485d07f8db2071665f1a4ad23eec3e515e2cefbd369059ec677c9ac849877d1a765494e90e92051d4f21111aa56791c98729e + languageName: node + linkType: hard + +"d3-shape@npm:^3.1.0": + version: 3.2.0 + resolution: "d3-shape@npm:3.2.0" + dependencies: + d3-path: ^3.1.0 + checksum: de2af5fc9a93036a7b68581ca0bfc4aca2d5a328aa7ba7064c11aedd44d24f310c20c40157cb654359d4c15c3ef369f95ee53d71221017276e34172c7b719cfa + languageName: node + linkType: hard + +"d3-time-format@npm:2 - 4": + version: 4.1.0 + resolution: "d3-time-format@npm:4.1.0" + dependencies: + d3-time: 1 - 3 + checksum: 7342bce28355378152bbd4db4e275405439cabba082d9cd01946d40581140481c8328456d91740b0fe513c51ec4a467f4471ffa390c7e0e30ea30e9ec98fcdf4 + languageName: node + linkType: hard + +"d3-time@npm:1 - 3, d3-time@npm:2.1.1 - 3, d3-time@npm:^3.0.0": + version: 3.1.0 + resolution: "d3-time@npm:3.1.0" + dependencies: + d3-array: 2 - 3 + checksum: 613b435352a78d9f31b7f68540788186d8c331b63feca60ad21c88e9db1989fe888f97f242322ebd6365e45ec3fb206a4324cd4ca0dfffa1d9b5feb856ba00a7 + languageName: node + linkType: hard + +"d3-timer@npm:^3.0.1": + version: 3.0.1 + resolution: "d3-timer@npm:3.0.1" + checksum: 1cfddf86d7bca22f73f2c427f52dfa35c49f50d64e187eb788dcad6e927625c636aa18ae4edd44d084eb9d1f81d8ca4ec305dae7f733c15846a824575b789d73 + languageName: node + linkType: hard + "damerau-levenshtein@npm:^1.0.8": version: 1.0.8 resolution: "damerau-levenshtein@npm:1.0.8" @@ -4058,6 +4236,13 @@ __metadata: languageName: node linkType: hard +"decimal.js-light@npm:^2.4.1": + version: 2.5.1 + resolution: "decimal.js-light@npm:2.5.1" + checksum: f5a2c7eac1c4541c8ab8a5c8abea64fc1761cefc7794bd5f8afd57a8a78d1b51785e0c4e4f85f4895a043eaa90ddca1edc3981d1263eb6ddce60f32bf5fe66c9 + languageName: node + linkType: hard + "decode-named-character-reference@npm:^1.0.0": version: 1.0.2 resolution: "decode-named-character-reference@npm:1.0.2" @@ -4243,6 +4428,15 @@ __metadata: languageName: node linkType: hard +"dom-helpers@npm:^3.4.0": + version: 3.4.0 + resolution: "dom-helpers@npm:3.4.0" + dependencies: + "@babel/runtime": ^7.1.2 + checksum: 58d9f1c4a96daf77eddc63ae1236b826e1cddd6db66bbf39b18d7e21896d99365b376593352d52a60969d67fa4a8dbef26adc1439fa2c1b355efa37cacbaf637 + languageName: node + linkType: hard + "dom-helpers@npm:^5.0.1": version: 5.2.1 resolution: "dom-helpers@npm:5.2.1" @@ -5047,6 +5241,13 @@ __metadata: languageName: node linkType: hard +"eventemitter3@npm:^4.0.1": + version: 4.0.7 + resolution: "eventemitter3@npm:4.0.7" + checksum: 1875311c42fcfe9c707b2712c32664a245629b42bb0a5a84439762dd0fd637fc54d078155ea83c2af9e0323c9ac13687e03cfba79b03af9f40c89b4960099374 + languageName: node + linkType: hard + "events@npm:^3.0.0, events@npm:^3.3.0": version: 3.3.0 resolution: "events@npm:3.3.0" @@ -5151,6 +5352,13 @@ __metadata: languageName: node linkType: hard +"fast-equals@npm:^2.0.0": + version: 2.0.4 + resolution: "fast-equals@npm:2.0.4" + checksum: 1aac8a2e16b33e5e402bb5cd46be65f1ca331903c2c44e3bd75324e8472ee04f0acdbc6889e45fc28f9707ca3964f2a86789b32305d4d8b85dc97f61e446ef4b + languageName: node + linkType: hard + "fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.9": version: 3.2.12 resolution: "fast-glob@npm:3.2.12" @@ -6122,6 +6330,13 @@ __metadata: languageName: node linkType: hard +"internmap@npm:1 - 2": + version: 2.0.3 + resolution: "internmap@npm:2.0.3" + checksum: 7ca41ec6aba8f0072fc32fa8a023450a9f44503e2d8e403583c55714b25efd6390c38a87161ec456bf42d7bc83aab62eb28f5aef34876b1ac4e60693d5e1d241 + languageName: node + linkType: hard + "ip@npm:^2.0.0": version: 2.0.0 resolution: "ip@npm:2.0.0" @@ -6869,7 +7084,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.21": +"lodash@npm:^4.17.19, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -8765,6 +8980,13 @@ __metadata: languageName: node linkType: hard +"postcss-value-parser@npm:^3.3.0": + version: 3.3.1 + resolution: "postcss-value-parser@npm:3.3.1" + checksum: 62cd26e1cdbcf2dcc6bcedf3d9b409c9027bc57a367ae20d31dd99da4e206f730689471fd70a2abe866332af83f54dc1fa444c589e2381bf7f8054c46209ce16 + languageName: node + linkType: hard + "postcss@npm:8.4.14": version: 8.4.14 resolution: "postcss@npm:8.4.14" @@ -9068,16 +9290,6 @@ __metadata: languageName: node linkType: hard -"react-chartjs-2@npm:^5.0.1": - version: 5.0.1 - resolution: "react-chartjs-2@npm:5.0.1" - peerDependencies: - chart.js: ^4.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: b6f20cf68eb8961891af10250e737b50b940d74b7a3a07aae51f356960a865f822ee61856131c3965c7c547f06013ad963a679ed14d59d12e7c7d64c1db52f6c - languageName: node - linkType: hard - "react-dom@npm:^18.0.0, react-dom@npm:^18.2.0": version: 18.2.0 resolution: "react-dom@npm:18.2.0" @@ -9114,7 +9326,7 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^16.13.1, react-is@npm:^16.7.0": +"react-is@npm:^16.10.2, react-is@npm:^16.13.1, react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f @@ -9128,6 +9340,13 @@ __metadata: languageName: node linkType: hard +"react-lifecycles-compat@npm:^3.0.4": + version: 3.0.4 + resolution: "react-lifecycles-compat@npm:3.0.4" + checksum: a904b0fc0a8eeb15a148c9feb7bc17cec7ef96e71188280061fc340043fd6d8ee3ff233381f0e8f95c1cf926210b2c4a31f38182c8f35ac55057e453d6df204f + languageName: node + linkType: hard + "react-markdown@npm:^8.0.4": version: 8.0.4 resolution: "react-markdown@npm:8.0.4" @@ -9161,6 +9380,32 @@ __metadata: languageName: node linkType: hard +"react-resize-detector@npm:^7.1.2": + version: 7.1.2 + resolution: "react-resize-detector@npm:7.1.2" + dependencies: + lodash: ^4.17.21 + peerDependencies: + react: ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 55f4abad7f7523d16b081b5ab20f75c539a54a08253ce7e9df473d48386f42ceca6c31584ba9fa26e3528b498ef6685ec77fb9a22cffc97df05fb326d0bf1b26 + languageName: node + linkType: hard + +"react-smooth@npm:^2.0.1": + version: 2.0.1 + resolution: "react-smooth@npm:2.0.1" + dependencies: + fast-equals: ^2.0.0 + react-transition-group: 2.9.0 + peerDependencies: + prop-types: ^15.6.0 + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 65678491cbd506573f2dba82778ebf8259714d68dd227e0ee7c0e204bcbc7839cf97401620b4223814066581f1dce0493f97162a03dc2a68058b5a7ad2b41085 + languageName: node + linkType: hard + "react-textarea-autosize@npm:8.3.4": version: 8.3.4 resolution: "react-textarea-autosize@npm:8.3.4" @@ -9174,6 +9419,21 @@ __metadata: languageName: node linkType: hard +"react-transition-group@npm:2.9.0": + version: 2.9.0 + resolution: "react-transition-group@npm:2.9.0" + dependencies: + dom-helpers: ^3.4.0 + loose-envify: ^1.4.0 + prop-types: ^15.6.2 + react-lifecycles-compat: ^3.0.4 + peerDependencies: + react: ">=15.0.0" + react-dom: ">=15.0.0" + checksum: d8c9e50aabdc2cfc324e5cdb0ad1c6eecb02e1c0cd007b26d5b30ccf49015e900683dd489348c71fba4055858308d9ba7019e0d37d0e8d37bd46ed098788f670 + languageName: node + linkType: hard + "react-transition-group@npm:4.4.2": version: 4.4.2 resolution: "react-transition-group@npm:4.4.2" @@ -9307,6 +9567,36 @@ __metadata: languageName: node linkType: hard +"recharts-scale@npm:^0.4.4": + version: 0.4.5 + resolution: "recharts-scale@npm:0.4.5" + dependencies: + decimal.js-light: ^2.4.1 + checksum: e970377190a610e684a32c7461c7684ac3603c2e0ac0020bbba1eea9d099b38138143a8e80bf769bb49c0b7cecf22a2f5c6854885efed2d56f4540d4aa7052bd + languageName: node + linkType: hard + +"recharts@npm:^2.3.2": + version: 2.3.2 + resolution: "recharts@npm:2.3.2" + dependencies: + classnames: ^2.2.5 + eventemitter3: ^4.0.1 + lodash: ^4.17.19 + react-is: ^16.10.2 + react-resize-detector: ^7.1.2 + react-smooth: ^2.0.1 + recharts-scale: ^0.4.4 + reduce-css-calc: ^2.1.8 + victory-vendor: ^36.6.8 + peerDependencies: + prop-types: ^15.6.0 + react: ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 + checksum: 3904ccb48382dd5efcefce1a6748792703c44cbb0947515919c79f811e0073c6af2d38e230acfff089ae733af77a042f210a8d79ad0a527454ea5a2a85995bed + languageName: node + linkType: hard + "recoil@npm:^0.7.6": version: 0.7.6 resolution: "recoil@npm:0.7.6" @@ -9323,6 +9613,16 @@ __metadata: languageName: node linkType: hard +"reduce-css-calc@npm:^2.1.8": + version: 2.1.8 + resolution: "reduce-css-calc@npm:2.1.8" + dependencies: + css-unit-converter: ^1.1.1 + postcss-value-parser: ^3.3.0 + checksum: 8fd27c06c4b443b84749a69a8b97d10e6ec7d142b625b41923a8807abb22b9e37e44df14e26cc606a802957be07bdce5e8ee2976a6952a7b438a7727007101e9 + languageName: node + linkType: hard + "regenerator-runtime@npm:^0.13.11": version: 0.13.11 resolution: "regenerator-runtime@npm:0.13.11" @@ -11006,6 +11306,28 @@ __metadata: languageName: node linkType: hard +"victory-vendor@npm:^36.6.8": + version: 36.6.8 + resolution: "victory-vendor@npm:36.6.8" + dependencies: + "@types/d3-array": ^3.0.3 + "@types/d3-ease": ^3.0.0 + "@types/d3-interpolate": ^3.0.1 + "@types/d3-scale": ^4.0.2 + "@types/d3-shape": ^3.1.0 + "@types/d3-time": ^3.0.0 + "@types/d3-timer": ^3.0.0 + d3-array: ^3.1.6 + d3-ease: ^3.0.1 + d3-interpolate: ^3.0.1 + d3-scale: ^4.0.2 + d3-shape: ^3.1.0 + d3-time: ^3.0.0 + d3-timer: ^3.0.1 + checksum: 6411f7c19a776cef3919946d429293cfe33c93a6e4dcfdfa2ba1edecad3a28ed2cd6b0d117169b8917ab6a7679e2bade5e7bfc1fed3fc8b464b842f21dac5f49 + languageName: node + linkType: hard + "wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -11308,7 +11630,6 @@ __metadata: "@types/react": ^18.0.26 "@types/sharp": ^0.31.0 argon2: ^0.30.2 - chart.js: ^4.0.1 colorette: ^2.0.19 cookie: ^0.5.0 cross-env: ^7.0.3 @@ -11336,10 +11657,10 @@ __metadata: prismjs: ^1.29.0 qrcode: ^1.5.1 react: ^18.2.0 - react-chartjs-2: ^5.0.1 react-dom: ^18.2.0 react-feather: ^2.0.10 react-markdown: ^8.0.4 + recharts: ^2.3.2 recoil: ^0.7.6 remark-gfm: ^3.0.1 sharp: ^0.31.2