resize card for test counts
This commit is contained in:
@@ -1,38 +1,17 @@
|
|||||||
.analytics-page::-webkit-scrollbar {
|
.container {
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.analytics-title::-webkit-scrollbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.analytics-page {
|
|
||||||
width: 100vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.analytics-container {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-family: sans-serif;
|
height: 50vh;
|
||||||
}
|
|
||||||
|
|
||||||
.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) {
|
@media screen and (min-width: 900px) {
|
||||||
.analytics-container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 45vh;
|
height: 50vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,7 +53,10 @@ const TestAnalytics = () => {
|
|||||||
const dailyCountsList = Object.entries(dailyCounts).sort().map(x => {
|
const dailyCountsList = Object.entries(dailyCounts).sort().map(x => {
|
||||||
return { date: x[0], count: x[1] };
|
return { date: x[0], count: x[1] };
|
||||||
});
|
});
|
||||||
setDailyResults(dailyCountsList);
|
if (dailyCountsList?.length > 7)
|
||||||
|
setDailyResults(dailyCountsList.slice(dailyCountsList.length - 7, dailyCountsList.length));
|
||||||
|
else
|
||||||
|
setDailyResults(dailyCountsList);
|
||||||
const rss = _.groupBy(hposTests, function (test) {
|
const rss = _.groupBy(hposTests, function (test) {
|
||||||
return moment(test.testTime).startOf('day').format();
|
return moment(test.testTime).startOf('day').format();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class TestAnalyticsGraph extends Component {
|
|||||||
data.reverse();
|
data.reverse();
|
||||||
|
|
||||||
var margin = { top: 30, right: 20, bottom: 50, left: 15 },
|
var margin = { top: 30, right: 20, bottom: 50, left: 15 },
|
||||||
width = 1500 - margin.left - margin.right,
|
width = 400 - margin.left - margin.right,
|
||||||
height = 180 - margin.top - margin.bottom;
|
height = 180 - margin.top - margin.bottom;
|
||||||
|
|
||||||
var svg = d3.select("#tests-count-graph").append('svg')
|
var svg = d3.select("#tests-count-graph").append('svg')
|
||||||
@@ -113,7 +113,7 @@ class TestAnalyticsGraph extends Component {
|
|||||||
drawChart(data) {
|
drawChart(data) {
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
var margin = { top: 20, right: 20, bottom: 30, left: 50 },
|
var margin = { top: 20, right: 20, bottom: 30, left: 50 },
|
||||||
width = 960 - margin.left - margin.right,
|
width = 420 - margin.left - margin.right,
|
||||||
height = 500 - margin.top - margin.bottom;
|
height = 500 - margin.top - margin.bottom;
|
||||||
|
|
||||||
const INNER_WIDTH = width;// - margin.left - margin.right;
|
const INNER_WIDTH = width;// - margin.left - margin.right;
|
||||||
|
|||||||
Reference in New Issue
Block a user