resize card for test counts
This commit is contained in:
@@ -1,38 +1,17 @@
|
||||
.analytics-page::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.analytics-title::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.analytics-page {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.analytics-container {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
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;
|
||||
height: 50vh;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 900px) {
|
||||
.analytics-container {
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 45vh;
|
||||
height: 50vh;
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,10 @@ const TestAnalytics = () => {
|
||||
const dailyCountsList = Object.entries(dailyCounts).sort().map(x => {
|
||||
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) {
|
||||
return moment(test.testTime).startOf('day').format();
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ class TestAnalyticsGraph extends Component {
|
||||
data.reverse();
|
||||
|
||||
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;
|
||||
|
||||
var svg = d3.select("#tests-count-graph").append('svg')
|
||||
@@ -113,7 +113,7 @@ class TestAnalyticsGraph extends Component {
|
||||
drawChart(data) {
|
||||
if (!data) return;
|
||||
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;
|
||||
|
||||
const INNER_WIDTH = width;// - margin.left - margin.right;
|
||||
|
||||
Reference in New Issue
Block a user