From 45d36bf3e1c8a148160f1a5005345c57f5fc5107 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 23 Jan 2022 21:25:00 +0000 Subject: [PATCH] Improve Charts page --- webclient/src/Charts.js | 276 +++++++++++++++++++++++----------------- webclient/src/light.css | 4 + 2 files changed, 161 insertions(+), 119 deletions(-) diff --git a/webclient/src/Charts.js b/webclient/src/Charts.js index 60c45ef..7b9e02e 100644 --- a/webclient/src/Charts.js +++ b/webclient/src/Charts.js @@ -1,6 +1,6 @@ import React, { useState, useEffect, useReducer, useContext } from 'react'; import { BrowserRouter as Router, Switch, Route, Link, useParams, useHistory } from 'react-router-dom'; -import { Button, Container, Checkbox, Dimmer, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; +import { Statistic, Button, Container, Checkbox, Dimmer, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; import { BarChart, Bar, LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer, ReferenceLine } from 'recharts'; import { apiUrl, statusColor, BasicTable, staticUrl, requester } from './utils.js'; import { NotFound } from './Misc.js'; @@ -71,10 +71,46 @@ export function Charts(props) {
Charts
-
Summary
- {memberCount && signupCount && <> +
+ + + + + + + + + + + +
+

The total member count is {memberCount.slice().reverse()[0].member_count} members, compared to {memberCount.slice().reverse()[30].member_count} members 30 days ago. @@ -102,10 +138,12 @@ export function Charts(props) {

Daily since March 2nd, 2020.

+
Total Members
+

{memberCount && - + @@ -122,19 +160,124 @@ export function Charts(props) { type='monotone' dataKey='member_count' name='Member Count' - stroke='#8884d8' + stroke='#2185d0' strokeWidth={2} dot={false} - animationDuration={1000} + animationDuration={250} /> + + + } +

+ +
Six Month+ Members
+ +

+ {memberCount && + + + + + + + + + + + + + } +

+ +
Vetted Members
+ +

+ {memberCount && + + + + + + + + + + + + + } +

+ +
PayPal Subscribers
+ +

+ {memberCount && + + + + + + + + + + @@ -145,115 +288,10 @@ export function Charts(props) {

Green Count: number of Prepaid and Current members.

-

- {memberCount && - - - - - - - - - - - - - } -

- -

Member Count: same as above.

-

Six Months+: number of active memberships older than six months.

-

- {memberCount && - - - - - - - - - - - - - } -

- -

Member Count: same as above.

-

Vetted Count: number of active vetted members.

-

- {memberCount && - - - - - - - - - - - - - } -

- -

Member Count: same as above.

-

PayPal Subscriber Count: number of members with a PayPal subscription.

Space Activity
@@ -281,7 +319,7 @@ export function Charts(props) { type='monotone' dataKey='card_scans' name='Card Scans' - fill='#8884d8' + fill='#2185d0' maxBarSize={20} isAnimationActive={false} /> @@ -310,9 +348,9 @@ export function Charts(props) { type='monotone' dataKey='signup_count' name='Signup Count' - fill='#8884d8' + fill='#2185d0' maxBarSize={20} - animationDuration={1000} + animationDuration={250} /> @@ -384,7 +422,7 @@ export function Charts(props) { stroke='#82ca9d' strokeWidth={2} dot={false} - animationDuration={1000} + animationDuration={250} /> diff --git a/webclient/src/light.css b/webclient/src/light.css index b5cec79..f07fdfb 100644 --- a/webclient/src/light.css +++ b/webclient/src/light.css @@ -125,6 +125,10 @@ body { color: black; } +.chartstats .ui.statistic { + margin: 0 1.5em 1em !important; +} + .footer { margin-top: -20rem; background: black;