@@ -1006,14 +1006,22 @@ async function setupSlicer() {
1006
1006
1007
1007
const max = Math .max (... FINAL_DATASET .value .map (dp => lttb (dp .series ).length ));
1008
1008
1009
+ slicer .value = { start: 0 , end: max };
1010
+
1009
1011
if ((startIndex != null || endIndex != null ) && comp) {
1010
1012
if (startIndex != null ) {
1011
1013
slicer .value .start = startIndex;
1012
1014
comp .setStartValue (startIndex);
1015
+ } else {
1016
+ slicer .value .start = 0 ;
1017
+ comp .setStartValue (0 );
1013
1018
}
1014
1019
if (endIndex != null ) {
1015
1020
slicer .value .end = endIndex + 1
1016
1021
comp .setEndValue (validSlicerEnd (endIndex + 1 ));
1022
+ } else {
1023
+ slicer .value .end = max;
1024
+ comp .setEndValue (max);
1017
1025
}
1018
1026
} else {
1019
1027
slicer .value = { start: 0 , end: max };
@@ -2103,6 +2111,7 @@ const preciseAllTimeLabels = computed(() => {
2103
2111
2104
2112
// Simple Slicer labels
2105
2113
const useSlicerCustomFormat = ref (false );
2114
+
2106
2115
const slicerLabels = computed (() => {
2107
2116
let left = ' ' , right = ' ' ;
2108
2117
if (FINAL_CONFIG .value .chart .zoom .preview .enable ) {
@@ -2134,13 +2143,13 @@ const slicerLabels = computed(() => {
2134
2143
}
2135
2144
2136
2145
if (! useSlicerCustomFormat .value ) {
2137
- left = FINAL_CONFIG .value .chart .grid .labels .xAxisLabels .datetimeFormatter .enable
2146
+ left = FINAL_CONFIG .value .chart .grid .labels .xAxisLabels .datetimeFormatter .enable && ! FINAL_CONFIG . value . chart . zoom . useDefaultFormat
2138
2147
? (preciseAllTimeLabels .value [slicer .value .start ]? .text || ' ' )
2139
2148
: (timeLabels .value [0 ]? .text || ' ' );
2140
2149
2141
2150
const endAbs = Math .max (slicer .value .start , slicer .value .end - 1 )
2142
2151
2143
- right = FINAL_CONFIG .value .chart .grid .labels .xAxisLabels .datetimeFormatter .enable
2152
+ right = FINAL_CONFIG .value .chart .grid .labels .xAxisLabels .datetimeFormatter .enable && ! FINAL_CONFIG . value . chart . zoom . useDefaultFormat
2144
2153
? (preciseAllTimeLabels .value [endAbs]? .text || ' ' )
2145
2154
: (timeLabels .value .at (- 1 )? .text || ' ' )
2146
2155
}
0 commit comments