diff --git a/src/App.css b/src/App.css
index 9522cb4..9c01bfe 100644
--- a/src/App.css
+++ b/src/App.css
@@ -50,7 +50,7 @@ body {
display: inline-flex;
flex-direction: row;
font-size: xx-large;
- background-color: rgb(215, 192, 252);
+ background-color: rgb(207, 235, 250);
}
.last-update {
@@ -146,7 +146,7 @@ body {
text-align: center;
align-self: center;
font-size: xx-large;
- background-color: rgb(215, 192, 252);
+ background-color: rgb(207, 235, 250);
}
.nscm-logo {
@@ -206,7 +206,7 @@ body {
text-align: center;
align-self: center;
font-size: xx-large;
- background-color: rgb(215, 192, 252);
+ background-color: rgb(207, 235, 250);
}
}
@@ -253,7 +253,7 @@ body {
text-align: center;
align-self: center;
font-size: xx-large;
- background-color: rgb(215, 192, 252);
+ background-color: rgb(207, 235, 250);
}
.title-text {
@@ -307,7 +307,7 @@ body {
text-align: center;
align-self: center;
font-size: xx-large;
- background-color: rgb(215, 192, 252);
+ background-color: rgb(207, 235, 250);
}
.title-text {
@@ -372,7 +372,7 @@ body {
.dashboard-title {
text-align: center;
align-self: center;
- background-color: rgb(215, 192, 252);
+ background-color: rgb(207, 235, 250);
}
.title-text {
diff --git a/src/components/Calibrations.js b/src/components/Calibrations.js
index 37a1c41..12cbc9b 100644
--- a/src/components/Calibrations.js
+++ b/src/components/Calibrations.js
@@ -48,9 +48,6 @@ const Calibrations = () => {
Calibrations
x.deviceId)} onChange={changeDevice} value={device} placeholder="Select an device" />
- {/*
diff --git a/src/components/Devices.css b/src/components/Devices.css
index a1bbf12..3c081cd 100644
--- a/src/components/Devices.css
+++ b/src/components/Devices.css
@@ -2,12 +2,14 @@
display: none;
}
-.title {
+.insights-title {
+ /* width: 100vw; */
padding: 10px;
text-align: center;
- background: rgb(215, 192, 252);
+ background: rgb(207, 235, 250);
color: black;
font-size: 30px;
+ font-family: sans-serif;
}
.device-dropdown {
@@ -79,7 +81,7 @@
background-color: rgb(207, 235, 250);
width: 10vw;
height: 5vh;
- margin: 5px;
+ /* margin: 5px; */
border-radius: 10px;
font-size: medium;
font-weight: 600;
diff --git a/src/components/Devices.js b/src/components/Devices.js
index 093efec..4fd6144 100644
--- a/src/components/Devices.js
+++ b/src/components/Devices.js
@@ -1,8 +1,9 @@
-import React, { useEffect, useState } from 'react';
+import React, { useEffect, useState, useRef } from 'react';
import { query, collection, onSnapshot } from 'firebase/firestore';
import Dropdown from 'react-dropdown';
import 'react-dropdown/style.css';
import moment from 'moment';
+import Select from 'react-select';
import DeviceGraph from "./DeviceGraph";
import db from '../firebase';
@@ -18,11 +19,15 @@ const Devices = () => {
const [tests, setTests] = useState([]);
const [allTests, setAllTests] = useState(null);
const [showGraph, setShowGraph] = useState(false);
+ const selectDateDropdownRef = useRef();
+ const selectTestDropdownRef = useRef();
const changeDevice = ({ value }) => {
setDevice(value);
setTestDate(null);
setCurTest(null);
+ selectDateDropdownRef.current?.setValue("");
+ selectTestDropdownRef.current?.setValue("");
setDays([...new Set(allTests
.filter((x) => x.deviceSerialNumber === value)
.map(x => moment(x.testTime).format("YYYY-MM-DD")))]
@@ -32,6 +37,7 @@ const Devices = () => {
const changeTestDate = ({ value }) => {
setTestDate(value);
+ selectTestDropdownRef.current?.setValue("");
setCurTest(null);
setCurTestData(null);
setShowGraph(false);
@@ -84,15 +90,38 @@ const Devices = () => {
return (
-
Insights
+
Insights
-
+ {/*
-
+
*/}
- {/*
{ return { value: x, label: x }; })} menuPlacement='auto' maxMenuHeight={250} menuShouldScrollIntoView={true} onChange={changeDevice} />
- { return { value: x, label: x }; })} menuPlacement='auto' maxMenuHeight={250} menuShouldScrollIntoView={true} onChange={changeTestDate} />
- { return { value: x, label: x }; })} menuPlacement='auto' maxMenuHeight={220} menuShouldScrollIntoView={true} onChange={changeTestDate} /> */}
+ { return { value: x, label: x }; })}
+ menuPlacement='auto'
+ maxMenuHeight={250}
+ menuShouldScrollIntoView={true}
+ onChange={changeDevice} />
+ { return { value: x, label: x }; })}
+ menuPlacement='auto'
+ maxMenuHeight={250}
+ menuShouldScrollIntoView={true}
+ onChange={changeTestDate} />
+ { return { value: x, label: x }; })}
+ menuPlacement='auto'
+ maxMenuHeight={220}
+ menuShouldScrollIntoView={true}
+ onChange={changeTest} />
diff --git a/src/components/Locations.css b/src/components/Locations.css
index d696750..0d0b78a 100644
--- a/src/components/Locations.css
+++ b/src/components/Locations.css
@@ -1,6 +1,6 @@
.locations-card {
width: 40vw;
- height: 45vh;
+ height: 40vh;
background-color: white;
margin: 10px;
display: flex;
@@ -15,7 +15,7 @@
.locations-graph-card {
width: 40vw;
- height: 45vh;
+ height: 40vh;
background-color: white;
margin: 10px;
border-style: solid;
@@ -27,7 +27,7 @@
.locations-card-title {
text-align: center;
font-weight: 600;
- padding-top: 10px;
+ /* padding-top: 10px; */
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/components/ScatterPlot.css b/src/components/ScatterPlot.css
index c2f793d..e66ddfa 100644
--- a/src/components/ScatterPlot.css
+++ b/src/components/ScatterPlot.css
@@ -6,7 +6,7 @@
.resultratio-graph-card {
width: 40vw;
- height: 45vh;
+ height: 40vh;
background-color: white;
margin: 10px;
border-style: solid;
diff --git a/src/components/ScatterPlot.js b/src/components/ScatterPlot.js
index c5ca870..ac30df2 100644
--- a/src/components/ScatterPlot.js
+++ b/src/components/ScatterPlot.js
@@ -24,7 +24,7 @@ class ScatterPlot extends Component {
if (!data) return;
// set the dimensions and margins of the graph
- var margin = { top: 10, right: 30, bottom: 30, left: 60 },
+ var margin = { top: 10, right: 30, bottom: 40, left: 60 },
width = 460 - margin.left - margin.right,
height = 250 - margin.top - margin.bottom;
diff --git a/src/components/TestAnalytics.css b/src/components/TestAnalytics.css
index 02fd9a8..4df1a2f 100644
--- a/src/components/TestAnalytics.css
+++ b/src/components/TestAnalytics.css
@@ -1,17 +1,38 @@
-.container {
+.analytics-page::-webkit-scrollbar {
+ display: none;
+}
+
+.analytics-title::-webkit-scrollbar {
+ display: none;
+}
+
+.analytics-page {
+ width: 100vw;
+}
+
+.analytics-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
- height: 50vh;
+ font-family: sans-serif;
+}
+
+.analytics-title {
+ padding: 10px;
+ text-align: center;
+ background: rgb(207, 235, 250);
+ color: black;
+ font-size: 30px;
+ font-family: sans-serif;
}
@media screen and (min-width: 900px) {
- .container {
+ .analytics-container {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
- height: 50vh;
+ height: 45vh;
}
}
\ No newline at end of file
diff --git a/src/components/TestAnalytics.js b/src/components/TestAnalytics.js
index e6bab32..512db92 100644
--- a/src/components/TestAnalytics.js
+++ b/src/components/TestAnalytics.js
@@ -82,8 +82,8 @@ const TestAnalytics = () => {
}, [curTestData, curTest, device, testDate]);
return (
-
-
Analytics
+
+
Analytics
{/*
@@ -92,11 +92,11 @@ const TestAnalytics = () => {
*/}
-
+
{dailyCategoryCounts && }
{dailyResults && }
-
+
{allTests && }
{allTests && }
diff --git a/src/components/TestAnalyticsGraph.css b/src/components/TestAnalyticsGraph.css
index 99c1535..ea2b3d8 100644
--- a/src/components/TestAnalyticsGraph.css
+++ b/src/components/TestAnalyticsGraph.css
@@ -6,7 +6,7 @@
.tests-count-card {
width: 40vw;
- height: 45vh;
+ height: 40vh;
background-color: white;
margin: 10px;
/* display: flex;
diff --git a/src/components/TestAnalyticsGraph.js b/src/components/TestAnalyticsGraph.js
index 8b296a7..36794be 100644
--- a/src/components/TestAnalyticsGraph.js
+++ b/src/components/TestAnalyticsGraph.js
@@ -25,7 +25,7 @@ class TestAnalyticsGraph extends Component {
data.reverse();
- var margin = { top: 60, right: 20, bottom: 30, left: 50 },
+ var margin = { top: 60, right: 20, bottom: 30, left: 10 },
width = 520 - margin.left - margin.right,
height = 220 - margin.top - margin.bottom;
@@ -40,7 +40,7 @@ class TestAnalyticsGraph extends Component {
yScale = d3.scaleLinear().range([height, 0]);
var g = svg.append("g")
- .attr("transform", "translate(" + 10 + "," + 10 + ")");
+ .attr("transform", "translate(" + 5 + "," + 5 + ")");
xScale.domain(data.map(function (d) { return moment(d.date).format("MM-DD"); }));
diff --git a/src/components/TestAnalyticsPie.css b/src/components/TestAnalyticsPie.css
index 0796cfb..29698fb 100644
--- a/src/components/TestAnalyticsPie.css
+++ b/src/components/TestAnalyticsPie.css
@@ -6,7 +6,7 @@
.category-graph-card {
width: 40vw;
- height: 45vh;
+ height: 40vh;
background-color: white;
margin: 10px;
border-style: solid;
diff --git a/src/components/TestAnalyticsPie.js b/src/components/TestAnalyticsPie.js
index 332cce1..d333657 100644
--- a/src/components/TestAnalyticsPie.js
+++ b/src/components/TestAnalyticsPie.js
@@ -24,7 +24,7 @@ class TestAnalyticsPie extends Component {
drawChart(data) {
if (!data) return;
- var margin = { top: 30, right: 10, bottom: 15, left: 25 },
+ var margin = { top: 15, right: 10, bottom: 25, left: 10 },
width = 480 - margin.left - margin.right,
height = 250 - margin.top - margin.bottom,
radius = Math.min(width, height) / 2;
diff --git a/src/components/WorldMap.js b/src/components/WorldMap.js
index 70c7bfc..cc7aada 100644
--- a/src/components/WorldMap.js
+++ b/src/components/WorldMap.js
@@ -44,7 +44,7 @@ const WorldMap = () => {
}
return (
-