You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (typeof customLeft ==='string'&&typeof customRight ==='string') {
883
-
left.text= customLeft;
884
-
right.text= customRight;
885
-
useCustomFormat.value=true;
886
-
}
887
-
} catch (err) {
888
-
console.warn('Custom format cannot be applied on zoom labels.');
889
-
useCustomFormat.value=false;
888
+
constcustomLeft=props.customFormat({
889
+
absoluteIndex:startValue.value,
890
+
seriesIndex:startValue.value,
891
+
datapoint:props.selectedSeries
892
+
});
893
+
894
+
constcustomRight=props.customFormat({
895
+
absoluteIndex:endValue.value-1,
896
+
seriesIndex:-1,
897
+
datapoint:props.selectedSeries
898
+
});
899
+
900
+
if (typeof customLeft ==='string'&&typeof customRight ==='string') {
901
+
leftText = customLeft;
902
+
rightText = customRight;
903
+
useCustomFormat =true;
904
+
}
905
+
906
+
} catch (_) {
907
+
useCustomFormat =false;
890
908
}
891
909
}
892
910
893
-
if (!useCustomFormat.value) {
894
-
left =props.usePreciseLabels?props.preciseLabels.find(t=>t.absoluteIndex===startValue.value) :props.timeLabels.find(t=>t.absoluteIndex===startValue.value);
right =props.usePreciseLabels?props.preciseLabels.find(t=>t.absoluteIndex===endValue.value-1) :props.timeLabels.find(t=>t.absoluteIndex===endValue.value-1);
920
+
leftText = left ?left.text:'';
921
+
rightText = right ?right.text:'';
897
922
}
898
923
899
-
return {
900
-
left: left ?left.text:'',
901
-
right: right ?right.text:''
902
-
};
924
+
return { left: leftText, right: rightText };
903
925
});
904
926
927
+
905
928
onBeforeUnmount(() => {
906
929
if (resizeObserver.value) resizeObserver.value.disconnect();
0 commit comments