diff --git a/assets/js/components/Optimize/ChargeChart.vue b/assets/js/components/Optimize/ChargeChart.vue index da0861c36..ea77f47a0 100644 --- a/assets/js/components/Optimize/ChargeChart.vue +++ b/assets/js/components/Optimize/ChargeChart.vue @@ -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 diff --git a/assets/js/components/Optimize/PriceChart.vue b/assets/js/components/Optimize/PriceChart.vue index af16def90..a6cff7528 100644 --- a/assets/js/components/Optimize/PriceChart.vue +++ b/assets/js/components/Optimize/PriceChart.vue @@ -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 diff --git a/assets/js/components/Optimize/SocChart.vue b/assets/js/components/Optimize/SocChart.vue index 9251be73f..3329b4ce8 100644 --- a/assets/js/components/Optimize/SocChart.vue +++ b/assets/js/components/Optimize/SocChart.vue @@ -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