Skip to content

Commit

Permalink
prevent cls
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Oct 24, 2023
1 parent 876bc13 commit 00acb25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion assets/src/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ h1.ka-logo,
.ka-chart {
position: relative;
overflow: visible;
min-height: 240px;
}
.ka-chart--tooltip {
position: absolute;
Expand Down Expand Up @@ -122,9 +123,10 @@ h1.ka-logo,
grid-template-columns: repeat(6, 1fr);
}

/** TopX components */
/** Topx components */
.ka-topx {
grid-column: span 6;
min-height: 689px;
}
@media (min-width: 840px) {
.ka-topx {
Expand Down
6 changes: 3 additions & 3 deletions assets/src/js/components/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function hideTooltip() {

export default function(root, height) {
height = height ?? Math.max(240, Math.min(window.innerHeight / 3, window.innerWidth / 2, 360));
let groupByMonth = false;
let dateFormatOptions = groupByMonth ? {month: 'short', year: 'numeric'} : undefined
root.parentElement.style.minHeight = `${height}px`;
let dateFormatOptions = {month: 'short', year: 'numeric'};
let width = root.clientWidth;
const innerWidth = width - padding.left - padding.right;
const innerHeight = height - padding.bottom - padding.top;
Expand Down Expand Up @@ -92,7 +92,7 @@ export default function(root, height) {
* @param {Date} endDate
*/
function update(startDate, endDate) {
groupByMonth = startDate.getDate() === 1 && isLastDayOfMonth(endDate) && (endDate.getMonth() - startDate.getMonth()) >= 2
const groupByMonth = startDate.getDate() === 1 && isLastDayOfMonth(endDate) && (endDate.getMonth() - startDate.getMonth()) >= 2
dateFormatOptions = groupByMonth ? {month: 'short', year: 'numeric'} : undefined

request('/stats', {
Expand Down

0 comments on commit 00acb25

Please sign in to comment.