Optimizer UI: fix mobile x labels (#27513)
This commit is contained in:
parent
5f5c363538
commit
50f7b77dbd
3 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue