Optimizer UI: fix mobile x labels (#27513)

This commit is contained in:
Michael Geers 2026-02-19 15:23:16 +01:00 • committed by GitHub
parent 5f5c363538
commit 50f7b77dbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -211,7 +211,8 @@ export default defineComponent({
// Show ticks at exact hour boundaries
if (minute === 0) {
// Show labels only at hours divisible by 4
if (hour % 4 === 0) {
const step = window.innerWidth < 576 ? 6 : 4;
if (hour % step === 0) {
return hour.toString();
}
// Show tick but no label for other hours

View file

@ -177,7 +177,8 @@ export default defineComponent({
// Show ticks at exact hour boundaries
if (minute === 0) {
// Show labels only at hours divisible by 4
if (hour % 4 === 0) {
const step = window.innerWidth < 576 ? 6 : 4;
if (hour % step === 0) {
return hour.toString();
}
// Show tick but no label for other hours

View file

@ -189,7 +189,8 @@ export default defineComponent({
// Show ticks at exact hour boundaries
if (minute === 0) {
// Show labels only at hours divisible by 4
if (hour % 4 === 0) {
const step = window.innerWidth < 576 ? 6 : 4;
if (hour % step === 0) {
return hour.toString();
}
// Show tick but no label for other hours