waveform-analysis 0.1.46 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -30
- package/dist/index.cjs +1 -1
- package/dist/index.js +423 -430
- package/dist/types/components/core/grid.d.ts +3 -0
- package/dist/types/components/core/types.d.ts +2 -1
- package/dist/types/components/interaction/useWaveformViewport.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/WaveformChartView.vue +2 -2
- package/src/components/core/grid.test.ts +13 -1
- package/src/components/core/grid.ts +14 -4
- package/src/components/core/trackLayoutBuilder.ts +12 -21
- package/src/components/core/types.ts +2 -1
- package/src/components/core/useWaveformLayout.ts +12 -6
- package/src/components/interaction/useWaveformHover.ts +2 -1
- package/src/components/interaction/useWaveformViewport.ts +20 -15
- package/src/components/interaction/useWaveformZoom.ts +1 -1
- package/src/components/rendering/WaveformTrack.vue +1 -0
- package/src/components/rendering/WaveformTrackAxes.vue +3 -2
- package/src/components/waveformChartCases/multiAxisAndPagination.test.ts +49 -0
- package/src/components/waveformChartCases/trackOrder.test.ts +131 -0
package/dist/index.js
CHANGED
|
@@ -621,14 +621,14 @@ function Ye() {
|
|
|
621
621
|
}
|
|
622
622
|
//#endregion
|
|
623
623
|
//#region src/utils/domain.ts
|
|
624
|
-
function
|
|
624
|
+
function $(e) {
|
|
625
625
|
if (e.length === 0) return [0, 1];
|
|
626
626
|
let [t = 0, n = 1] = R(e);
|
|
627
627
|
if (t !== n) return [t, n];
|
|
628
628
|
let r = Math.abs(t) * .05 || .5;
|
|
629
629
|
return [t - r, n + r];
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Xe(e, t = 5, n) {
|
|
632
632
|
let r = e;
|
|
633
633
|
if (n && e.length >= 2) {
|
|
634
634
|
let t = e[0], n = e[1], i = e[e.length - 1], a = e[e.length - 2];
|
|
@@ -650,71 +650,71 @@ function Ze(e, t = 5, n) {
|
|
|
650
650
|
}
|
|
651
651
|
//#endregion
|
|
652
652
|
//#region src/utils/formatters.ts
|
|
653
|
-
var
|
|
654
|
-
function
|
|
653
|
+
var Ze = .001, Qe = 1e3, $e = new Intl.NumberFormat("zh-CN", { maximumFractionDigits: 4 }), et = new Intl.NumberFormat("zh-CN", { maximumFractionDigits: 4 });
|
|
654
|
+
function tt(e, t) {
|
|
655
655
|
let n = e.toFixed(Math.max(0, t));
|
|
656
656
|
return /^-0(?:\.0+)?$/.test(n) ? n.slice(1) : n;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
return Number.isFinite(e) && (e >=
|
|
658
|
+
function nt(e) {
|
|
659
|
+
return Number.isFinite(e) && (e >= Qe || e > 0 && e < Ze);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
661
|
+
function rt(e, t) {
|
|
662
662
|
if (typeof e != "number" || typeof t != "number") return null;
|
|
663
663
|
let n = Math.max(Math.abs(e), Math.abs(t));
|
|
664
|
-
return
|
|
664
|
+
return nt(n) ? Math.floor(Math.log10(n)) : null;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function it(e) {
|
|
667
667
|
return `E${e >= 0 ? "+" : "-"}${Math.abs(e).toString().padStart(2, "0")}`;
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function at(e) {
|
|
670
670
|
if (Object.is(e, -0)) return "0";
|
|
671
|
-
let t = e === 0 ? 0 : Number(e.toPrecision(5)), n =
|
|
671
|
+
let t = e === 0 ? 0 : Number(e.toPrecision(5)), n = $e.format(t);
|
|
672
672
|
return n === "-0" ? "0" : n;
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function ot(e, t = {}) {
|
|
675
675
|
if (!Number.isFinite(e)) return String(e);
|
|
676
|
-
let n =
|
|
676
|
+
let n = rt(t.axisMin, t.axisMax), r = at(n === null ? e : e / 10 ** n);
|
|
677
677
|
if (e !== (t.topTickValue ?? t.axisMax)) return r;
|
|
678
678
|
let i = t.unit?.trim(), a = i ? `(${i}) ` : "";
|
|
679
|
-
return `${n === null ? "" : `${
|
|
679
|
+
return `${n === null ? "" : `${it(n)} `}${a}${r}`;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
return Number.isFinite(e) ? Object.is(e, -0) ? "0" :
|
|
681
|
+
function st(e) {
|
|
682
|
+
return Number.isFinite(e) ? Object.is(e, -0) ? "0" : et.format(e) : String(e);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function ct(e) {
|
|
685
685
|
if (!Number.isFinite(e)) return String(e);
|
|
686
686
|
if (Object.is(e, -0)) return "0";
|
|
687
687
|
let [t, n] = e.toExponential().split("e"), r = Number(n), i = t.startsWith("-"), a = t.replace("-", "").replace(".", ""), o = r + 1, s;
|
|
688
688
|
return s = o <= 0 ? `0.${"0".repeat(Math.abs(o))}${a}` : o >= a.length ? `${a}${"0".repeat(o - a.length)}` : `${a.slice(0, o)}.${a.slice(o)}`, `${i ? "-" : ""}${s}`;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function lt(e, t) {
|
|
691
691
|
return t === "ms" ? e * 1e3 : e;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
let a =
|
|
693
|
+
function ut(e, t, n, r, i) {
|
|
694
|
+
let a = lt(e, n);
|
|
695
695
|
return i ? i(a, {
|
|
696
696
|
kind: r,
|
|
697
697
|
rawValue: e,
|
|
698
698
|
timeUnit: n,
|
|
699
699
|
domain: [t[0], t[1]],
|
|
700
|
-
displayDomain: [
|
|
701
|
-
}) :
|
|
700
|
+
displayDomain: [lt(t[0], n), lt(t[1], n)]
|
|
701
|
+
}) : ct(a);
|
|
702
|
+
}
|
|
703
|
+
function dt(e, t, n) {
|
|
704
|
+
return ut(e, t, n, "end");
|
|
702
705
|
}
|
|
703
706
|
function ft(e, t, n) {
|
|
704
|
-
return
|
|
707
|
+
return ut(e, n ?? [e, e], t, "tick");
|
|
705
708
|
}
|
|
706
|
-
function pt(e, t
|
|
707
|
-
return
|
|
709
|
+
function pt(e, t) {
|
|
710
|
+
return st(lt(e, t));
|
|
708
711
|
}
|
|
709
712
|
function mt(e, t) {
|
|
710
|
-
return
|
|
711
|
-
}
|
|
712
|
-
function ht(e, t) {
|
|
713
|
-
return Number.isFinite(e) ? nt(ut(e, t), 3) : String(e);
|
|
713
|
+
return Number.isFinite(e) ? tt(lt(e, t), 3) : String(e);
|
|
714
714
|
}
|
|
715
715
|
//#endregion
|
|
716
716
|
//#region src/utils/geometry.ts
|
|
717
|
-
function
|
|
717
|
+
function ht(e, t, n) {
|
|
718
718
|
if (e <= 0) return {
|
|
719
719
|
gap: 0,
|
|
720
720
|
axisBand: 0,
|
|
@@ -727,55 +727,55 @@ function gt(e, t, n) {
|
|
|
727
727
|
height: Math.max(1, (n - (e - 1) * (c + l)) / e)
|
|
728
728
|
};
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function gt(e, t, n) {
|
|
731
731
|
return Math.min(Math.max(e, t), n);
|
|
732
732
|
}
|
|
733
733
|
//#endregion
|
|
734
734
|
//#region src/components/core/constants.ts
|
|
735
|
-
var
|
|
735
|
+
var _t = {
|
|
736
736
|
top: 18,
|
|
737
737
|
right: 24,
|
|
738
738
|
bottom: 52,
|
|
739
739
|
left: 80
|
|
740
|
-
},
|
|
740
|
+
}, vt = {
|
|
741
741
|
DEFAULT_MAX_SCALE: 40,
|
|
742
742
|
MIN_SCALE: 1
|
|
743
|
-
},
|
|
743
|
+
}, yt = .62, bt = 1.2, xt = /* @__PURE__ */ "#0960bd.#ff7f0e.#2ca02c.#d62728.#9467bd.#8c564b.#e377c2.#7f7f7f.#bcbd22.#17becf.#005f73.#0a9396.#ae2012.#bb3e03.#ca6702.#ee9b00.#9b2226.#3a0ca3.#4361ee.#4895ef.#560bad.#7209b7.#b5179e.#f72585.#006d77.#2f3e46.#354f52.#52796f.#800f2f.#31572c".split("."), St = {
|
|
744
744
|
WIDTH: 1.5,
|
|
745
745
|
CAP_WIDTH: 8
|
|
746
|
-
},
|
|
746
|
+
}, Ct = {
|
|
747
747
|
COLOR: "#98a2b3",
|
|
748
748
|
WIDTH: 1,
|
|
749
749
|
DASH: "6 4"
|
|
750
750
|
};
|
|
751
751
|
//#endregion
|
|
752
752
|
//#region src/components/core/yDomain.ts
|
|
753
|
-
function
|
|
753
|
+
function wt(e) {
|
|
754
754
|
if (!(!e || !Number.isFinite(e[0]) || !Number.isFinite(e[1]) || e[0] === e[1])) return e[0] < e[1] ? [e[0], e[1]] : [e[1], e[0]];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
756
|
+
function Tt(e, t) {
|
|
757
|
+
return wt(t?.[e.id]);
|
|
758
758
|
}
|
|
759
|
-
function
|
|
760
|
-
return
|
|
759
|
+
function Et(e, t, n) {
|
|
760
|
+
return wt(n?.[e.id]) ?? wt(t);
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
return !!(
|
|
762
|
+
function Dt(e, t, n) {
|
|
763
|
+
return !!(Tt(e, n) || e.visibleSeries.some((e) => Et(e, t, n)));
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Ot(e) {
|
|
766
766
|
return [Math.min(...e.map((e) => e[0])), Math.max(...e.map((e) => e[1]))];
|
|
767
767
|
}
|
|
768
768
|
//#endregion
|
|
769
769
|
//#region src/core/data.ts
|
|
770
|
-
var
|
|
771
|
-
function
|
|
770
|
+
var kt = St.WIDTH, At = St.CAP_WIDTH;
|
|
771
|
+
function jt(e) {
|
|
772
772
|
return e === "dashed" || e === "dash-dot" ? e : "solid";
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Mt(e) {
|
|
775
775
|
return typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : void 0;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
let t =
|
|
777
|
+
function Nt(e) {
|
|
778
|
+
let t = Mt(e.error), n = Mt(e.lowerError), r = Mt(e.upperError);
|
|
779
779
|
return {
|
|
780
780
|
x: e.x,
|
|
781
781
|
y: e.y,
|
|
@@ -784,14 +784,14 @@ function Pt(e) {
|
|
|
784
784
|
...r === void 0 ? {} : { upperError: r }
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
-
function
|
|
788
|
-
let t =
|
|
787
|
+
function Pt(e) {
|
|
788
|
+
let t = Mt(e.error) ?? 0;
|
|
789
789
|
return {
|
|
790
|
-
lower:
|
|
791
|
-
upper:
|
|
790
|
+
lower: Mt(e.lowerError) ?? t,
|
|
791
|
+
upper: Mt(e.upperError) ?? t
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function Ft(e) {
|
|
795
795
|
if (e.kind === "samples") {
|
|
796
796
|
if (!Number.isFinite(e.sampleRate) || e.sampleRate <= 0) return [];
|
|
797
797
|
let t = Number.isFinite(e.startTime) ? e.startTime ?? 0 : 0, n = [];
|
|
@@ -807,14 +807,14 @@ function It(e) {
|
|
|
807
807
|
let t = [], n = -Infinity, r = !0;
|
|
808
808
|
for (let i of e.points) {
|
|
809
809
|
if (!Number.isFinite(i.x) || !Number.isFinite(i.y)) continue;
|
|
810
|
-
let e =
|
|
810
|
+
let e = Nt(i);
|
|
811
811
|
e.x < n && (r = !1), n = e.x, t.push(e);
|
|
812
812
|
}
|
|
813
813
|
return r || t.sort((e, t) => e.x - t.x), t;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function It(e) {
|
|
816
816
|
if (e.kind !== "series") {
|
|
817
|
-
let t =
|
|
817
|
+
let t = Ft(e);
|
|
818
818
|
return t.length > 0 ? [{
|
|
819
819
|
id: "series-0",
|
|
820
820
|
name: "",
|
|
@@ -823,8 +823,8 @@ function Lt(e) {
|
|
|
823
823
|
pointType: "none",
|
|
824
824
|
errorBar: {
|
|
825
825
|
visible: !1,
|
|
826
|
-
width:
|
|
827
|
-
capWidth:
|
|
826
|
+
width: kt,
|
|
827
|
+
capWidth: At
|
|
828
828
|
},
|
|
829
829
|
points: t
|
|
830
830
|
}] : [];
|
|
@@ -834,7 +834,7 @@ function Lt(e) {
|
|
|
834
834
|
let r = e.id?.trim() || `series-${n}`, i = r, a = 1;
|
|
835
835
|
for (; t.has(i);) i = `${r}-${a}`, a++;
|
|
836
836
|
t.add(i);
|
|
837
|
-
let o = e.lineType ?? "linear", s =
|
|
837
|
+
let o = e.lineType ?? "linear", s = jt(e.lineStyle), c = e.pointType ?? "none", l = e.errorBar?.visible === !0, u = o === "none" && c === "none" && !l ? "linear" : o, d = Number(e.errorBar?.width), f = Number(e.errorBar?.capWidth);
|
|
838
838
|
return {
|
|
839
839
|
id: i,
|
|
840
840
|
shotNo: e.shotNo?.trim() || void 0,
|
|
@@ -848,29 +848,29 @@ function Lt(e) {
|
|
|
848
848
|
errorBar: {
|
|
849
849
|
visible: l,
|
|
850
850
|
color: e.errorBar?.color,
|
|
851
|
-
width: Number.isFinite(d) && d > 0 ? d :
|
|
852
|
-
capWidth: Number.isFinite(f) && f > 0 ? f :
|
|
851
|
+
width: Number.isFinite(d) && d > 0 ? d : kt,
|
|
852
|
+
capWidth: Number.isFinite(f) && f > 0 ? f : At
|
|
853
853
|
},
|
|
854
|
-
points:
|
|
854
|
+
points: Ft(e.data)
|
|
855
855
|
};
|
|
856
856
|
}).filter((e) => e.points.length > 0);
|
|
857
857
|
}
|
|
858
858
|
//#endregion
|
|
859
859
|
//#region src/core/renderingStrategies.ts
|
|
860
|
-
function
|
|
860
|
+
function Lt(e, t) {
|
|
861
861
|
return {
|
|
862
862
|
start: Math.max(0, e.start - 1),
|
|
863
863
|
end: Math.min(t, e.end + 1)
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function Rt(e, t) {
|
|
867
867
|
t && e[e.length - 1] !== t && e.push(t);
|
|
868
868
|
}
|
|
869
|
-
var
|
|
870
|
-
let { start: t, end: n } =
|
|
869
|
+
var zt = (e) => {
|
|
870
|
+
let { start: t, end: n } = Lt(e.range, e.points.length);
|
|
871
871
|
return e.points.slice(t, n);
|
|
872
|
-
},
|
|
873
|
-
let { points: t, range: n, domain: r, width: i, options: a } = e, { start: o, end: s } =
|
|
872
|
+
}, Bt = (e) => {
|
|
873
|
+
let { points: t, range: n, domain: r, width: i, options: a } = e, { start: o, end: s } = Lt(n, t.length);
|
|
874
874
|
if (s - o <= 0) return [];
|
|
875
875
|
let c = Math.min(r[0], r[1]), l = Math.max(r[0], r[1]), u = Math.max(4, Math.floor(i * a.maxPointsPerPixel)), d = Math.max(1, Math.floor(u / 4)), f = [], p = l - c || 1, m = Array.from({ length: 4 }, () => -1), h = -1, g = -1, _ = -1, v = -1, y = -1, b = (e, t) => {
|
|
876
876
|
if (e < 0) return t;
|
|
@@ -885,9 +885,9 @@ var Bt = (e) => {
|
|
|
885
885
|
for (; n >= 0 && m[n] > e;) m[n + 1] = m[n], --n;
|
|
886
886
|
m[n + 1] = e;
|
|
887
887
|
}
|
|
888
|
-
for (let n = 0; n < e; n += 1)
|
|
888
|
+
for (let n = 0; n < e; n += 1) Rt(f, t[m[n]]);
|
|
889
889
|
};
|
|
890
|
-
|
|
890
|
+
Rt(f, t[o]);
|
|
891
891
|
for (let e = n.start; e < n.end; e += 1) {
|
|
892
892
|
let n = t[e], r = Math.min(d - 1, Math.max(0, Math.floor((n.x - c) / p * d)));
|
|
893
893
|
if (r !== h) {
|
|
@@ -896,53 +896,53 @@ var Bt = (e) => {
|
|
|
896
896
|
}
|
|
897
897
|
_ = e, n.y < t[v].y && (v = e), n.y > t[y].y && (y = e);
|
|
898
898
|
}
|
|
899
|
-
return x(),
|
|
899
|
+
return x(), Rt(f, t[s - 1]), f;
|
|
900
900
|
};
|
|
901
|
-
function
|
|
901
|
+
function Vt(e) {
|
|
902
902
|
let t = Math.max(4, Math.floor(e.width * e.options.maxPointsPerPixel));
|
|
903
|
-
return !e.options.downsample || e.visibleCount <= e.options.downsampleThreshold || e.visibleCount <= t ?
|
|
903
|
+
return !e.options.downsample || e.visibleCount <= e.options.downsampleThreshold || e.visibleCount <= t ? zt : Bt;
|
|
904
904
|
}
|
|
905
905
|
//#endregion
|
|
906
906
|
//#region src/core/renderingOptions.ts
|
|
907
|
-
var
|
|
907
|
+
var Ht = {
|
|
908
908
|
downsample: !0,
|
|
909
909
|
downsampleThreshold: 2e3,
|
|
910
910
|
maxPointsPerPixel: 4,
|
|
911
911
|
pointMinSpacing: 10,
|
|
912
912
|
errorBarMinSpacing: 12
|
|
913
913
|
};
|
|
914
|
-
function
|
|
914
|
+
function Ut(e) {
|
|
915
915
|
let t = Number(e?.downsampleThreshold), n = Number(e?.maxPointsPerPixel), r = Number(e?.pointMinSpacing), i = Number(e?.errorBarMinSpacing);
|
|
916
916
|
return {
|
|
917
|
-
downsample: e?.downsample ??
|
|
918
|
-
downsampleThreshold: Number.isFinite(t) && t >= 2 ? Math.floor(t) :
|
|
919
|
-
maxPointsPerPixel: Number.isFinite(n) && n > 0 ? n :
|
|
920
|
-
pointMinSpacing: Number.isFinite(r) && r >= 0 ? r :
|
|
921
|
-
errorBarMinSpacing: Number.isFinite(i) && i >= 0 ? i :
|
|
917
|
+
downsample: e?.downsample ?? Ht.downsample,
|
|
918
|
+
downsampleThreshold: Number.isFinite(t) && t >= 2 ? Math.floor(t) : Ht.downsampleThreshold,
|
|
919
|
+
maxPointsPerPixel: Number.isFinite(n) && n > 0 ? n : Ht.maxPointsPerPixel,
|
|
920
|
+
pointMinSpacing: Number.isFinite(r) && r >= 0 ? r : Ht.pointMinSpacing,
|
|
921
|
+
errorBarMinSpacing: Number.isFinite(i) && i >= 0 ? i : Ht.errorBarMinSpacing
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region src/core/rendering.ts
|
|
926
|
-
var
|
|
927
|
-
function
|
|
926
|
+
var Wt = P((e) => e.x), Gt = () => !0;
|
|
927
|
+
function Kt(e, t) {
|
|
928
928
|
let n = Math.min(t[0], t[1]), r = Math.max(t[0], t[1]);
|
|
929
929
|
return {
|
|
930
|
-
start:
|
|
931
|
-
end:
|
|
930
|
+
start: Wt.left(e, n),
|
|
931
|
+
end: Wt.right(e, r)
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function qt(e, t, n) {
|
|
935
935
|
if (!Number.isFinite(n) || n <= 0) return !0;
|
|
936
936
|
let r = Math.ceil(n), i = /* @__PURE__ */ new Set();
|
|
937
937
|
for (let n of e) {
|
|
938
|
-
let e =
|
|
938
|
+
let e = Kt(n.points, t);
|
|
939
939
|
for (let t = e.start; t < e.end; t += 1) if (i.add(n.points[t].x), i.size >= r) return !0;
|
|
940
940
|
}
|
|
941
941
|
return !1;
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function Jt(e, t, n, r, i) {
|
|
944
944
|
let a = Math.max(0, t.start - 1), o = Math.min(e.length, t.end + 1) - a;
|
|
945
|
-
return o <= 0 ? [] :
|
|
945
|
+
return o <= 0 ? [] : Vt({
|
|
946
946
|
visibleCount: o,
|
|
947
947
|
width: r,
|
|
948
948
|
options: i
|
|
@@ -954,12 +954,12 @@ function Yt(e, t, n, r, i) {
|
|
|
954
954
|
options: i
|
|
955
955
|
});
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
return !e.length || n <= 0 ? [] :
|
|
957
|
+
function Yt(e, t, n, r) {
|
|
958
|
+
return !e.length || n <= 0 ? [] : Jt(e, Kt(e, t), t, n, r);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function Xt(e, t, n, r, i, a, o, s) {
|
|
961
961
|
if (!a || i === 0) {
|
|
962
|
-
if (o ===
|
|
962
|
+
if (o === Gt) return e.slice(t.start, t.end);
|
|
963
963
|
let n = [];
|
|
964
964
|
for (let r = t.start; r < t.end; r += 1) o(e[r]) && n.push(e[r]);
|
|
965
965
|
return n;
|
|
@@ -992,34 +992,38 @@ function Zt(e, t, n, r, i, a, o, s) {
|
|
|
992
992
|
let w = (f ?? []).map((e, t) => m?.[t] ?? e).filter((e) => e !== void 0);
|
|
993
993
|
return v && w[0] !== v && w.unshift(v), y && w.at(-1) !== y && w.push(y), w;
|
|
994
994
|
}
|
|
995
|
-
function
|
|
996
|
-
let { lower: t, upper: n } =
|
|
995
|
+
function Zt(e) {
|
|
996
|
+
let { lower: t, upper: n } = Pt(e);
|
|
997
997
|
return t !== 0 || n !== 0;
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function Qt(e, t, n, r, i) {
|
|
1000
1000
|
if (!e.length || n <= 0) return {
|
|
1001
1001
|
linePoints: [],
|
|
1002
1002
|
pointRenderPoints: [],
|
|
1003
1003
|
errorBarRenderPoints: []
|
|
1004
1004
|
};
|
|
1005
|
-
let a =
|
|
1005
|
+
let a = Kt(e, t), o = i.lineVisible ? Jt(e, a, t, n, r) : [], s = i.errorBarVisible && i.hasErrorPoints;
|
|
1006
1006
|
if (i.pointVisible && s) {
|
|
1007
|
-
let i =
|
|
1007
|
+
let i = Xt(e, a, t, n, Math.max(r.pointMinSpacing, r.errorBarMinSpacing), r.downsample, Gt, Zt);
|
|
1008
1008
|
return {
|
|
1009
1009
|
linePoints: o,
|
|
1010
1010
|
pointRenderPoints: i,
|
|
1011
|
-
errorBarRenderPoints: i.filter(
|
|
1011
|
+
errorBarRenderPoints: i.filter(Zt)
|
|
1012
1012
|
};
|
|
1013
1013
|
}
|
|
1014
1014
|
return {
|
|
1015
1015
|
linePoints: o,
|
|
1016
|
-
pointRenderPoints: i.pointVisible ?
|
|
1017
|
-
errorBarRenderPoints: s ?
|
|
1016
|
+
pointRenderPoints: i.pointVisible ? Xt(e, a, t, n, r.pointMinSpacing, r.downsample, Gt) : [],
|
|
1017
|
+
errorBarRenderPoints: s ? Xt(e, a, t, n, r.errorBarMinSpacing, r.downsample, Zt) : []
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
var
|
|
1020
|
+
var $t = (e, t) => {
|
|
1021
1021
|
let n = typeof e == "number" ? e : Number(e);
|
|
1022
1022
|
return Number.isFinite(n) ? Math.min(10, Math.max(1, Math.floor(n))) : t;
|
|
1023
|
+
}, en = (e) => {
|
|
1024
|
+
if (!Array.isArray(e)) return [];
|
|
1025
|
+
let t = e.filter((e) => typeof e == "string").map((e) => e.trim()).filter(Boolean);
|
|
1026
|
+
return Array.from(new Set(t));
|
|
1023
1027
|
};
|
|
1024
1028
|
function tn(e) {
|
|
1025
1029
|
let t = Object.fromEntries(Object.entries(e?.trackLines ?? {}).map(([e, t]) => [e, {
|
|
@@ -1029,10 +1033,11 @@ function tn(e) {
|
|
|
1029
1033
|
verticalColor: typeof t?.verticalColor == "string" && t.verticalColor.trim() ? t.verticalColor : void 0
|
|
1030
1034
|
}]));
|
|
1031
1035
|
return {
|
|
1032
|
-
rowCount:
|
|
1033
|
-
columnCount:
|
|
1036
|
+
rowCount: $t(e?.rowCount, 2),
|
|
1037
|
+
columnCount: $t(e?.columnCount, 1),
|
|
1034
1038
|
showPagination: e?.showPagination ?? !0,
|
|
1035
1039
|
fillIncompleteLastRow: e?.fillIncompleteLastRow ?? !1,
|
|
1040
|
+
trackOrder: en(e?.trackOrder),
|
|
1036
1041
|
trackLines: t
|
|
1037
1042
|
};
|
|
1038
1043
|
}
|
|
@@ -1114,64 +1119,48 @@ function pn(e) {
|
|
|
1114
1119
|
hasSeries: !!e.series
|
|
1115
1120
|
})), n = cn(t, e.grid.columnCount);
|
|
1116
1121
|
return t.flatMap((t, r) => {
|
|
1117
|
-
let i = !t.series;
|
|
1118
|
-
if (
|
|
1119
|
-
let a = {
|
|
1122
|
+
let i = !t.series || t.series.series.length === 0;
|
|
1123
|
+
if (!t.series && (e.displayMode !== "compact" || !e.showCompactEmptyTracks)) return [];
|
|
1124
|
+
let a = t.series ?? {
|
|
1120
1125
|
id: `empty-grid-slot-${t.slotIndex}`,
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
lineType: "linear",
|
|
1124
|
-
lineStyle: "solid",
|
|
1125
|
-
pointType: "none",
|
|
1126
|
-
errorBar: {
|
|
1127
|
-
visible: !1,
|
|
1128
|
-
width: 1.5,
|
|
1129
|
-
capWidth: 8
|
|
1130
|
-
},
|
|
1131
|
-
points: [],
|
|
1126
|
+
series: [],
|
|
1127
|
+
visibleSeries: [],
|
|
1132
1128
|
xDomain: [0, 1],
|
|
1133
|
-
yDomain: [0, 1]
|
|
1134
|
-
|
|
1135
|
-
}, o = t.series ?? {
|
|
1136
|
-
id: a.id,
|
|
1137
|
-
series: [a],
|
|
1138
|
-
visibleSeries: [a],
|
|
1139
|
-
xDomain: a.xDomain,
|
|
1140
|
-
yDomain: a.yDomain
|
|
1141
|
-
}, s = !i && o.visibleSeries.length > 0, c = o.visibleSeries[0] ?? o.series[0] ?? a, l = e.displayMode === "independent" ? V(fn(o, c.id, e), [0, t.width]) : V(e.sharedZoomDomain, [0, t.width]), u = (e.displayMode === "independent" ? e.independentTransforms[r] ?? W : W).rescaleX(l), d = e.yDomains?.[o.id], f = Cn(o, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && d ? {
|
|
1129
|
+
yDomain: [0, 1]
|
|
1130
|
+
}, o = !i && a.visibleSeries.length > 0, s = a.visibleSeries[0] ?? a.series[0] ?? null, c = e.displayMode === "independent" ? V(fn(a, s?.id ?? a.id, e), [0, t.width]) : V(e.sharedZoomDomain, [0, t.width]), l = (e.displayMode === "independent" ? e.independentTransforms[r] ?? W : W).rescaleX(c), u = e.yDomains?.[a.id], d = Cn(a, e.overlayMode, e.fixedYDomain, e.fixedYDomains).map((e) => !e.fixed && u ? {
|
|
1142
1131
|
...e,
|
|
1143
|
-
domain:
|
|
1144
|
-
} : e),
|
|
1132
|
+
domain: u
|
|
1133
|
+
} : e), f = {
|
|
1145
1134
|
left: 0,
|
|
1146
1135
|
right: 0
|
|
1147
|
-
},
|
|
1136
|
+
}, p = d.map((n) => {
|
|
1148
1137
|
let r = yn(t.plotHeight, e.yAxisSplitNumber), i = Math.max(1, r - 1), a = V(n.domain, [t.plotHeight, 0]);
|
|
1149
1138
|
a.nice(i);
|
|
1150
|
-
let [o, s] = a.domain(), c = Array.from({ length: r }, (e, t) => o + (s - o) * t / (r - 1)), l = e.displayMode !== "compact" || t.row === 0 ? c : c.slice(0, -1), { tickTextWidth: u } = wn(a.domain(), !1, l, n.seriesList[0]?.unit, r), d = u + 7 + 0 + 12 + 4,
|
|
1151
|
-
return
|
|
1139
|
+
let [o, s] = a.domain(), c = Array.from({ length: r }, (e, t) => o + (s - o) * t / (r - 1)), l = e.displayMode !== "compact" || t.row === 0 ? c : c.slice(0, -1), { tickTextWidth: u } = wn(a.domain(), !1, l, n.seriesList[0]?.unit, r), d = u + 7 + 0 + 12 + 4, p = n.side === "left" ? -f.left : t.width + f.right, m = u + 7 + 0 + 12 / 2, h = p + (n.side === "left" ? -m : m);
|
|
1140
|
+
return f[n.side] += d, {
|
|
1152
1141
|
index: n.index,
|
|
1153
1142
|
side: n.side,
|
|
1154
|
-
x:
|
|
1143
|
+
x: p,
|
|
1155
1144
|
labelX: h,
|
|
1156
1145
|
scale: a,
|
|
1157
1146
|
majorTicks: c,
|
|
1158
|
-
minorTicks:
|
|
1147
|
+
minorTicks: Xe(c, 2),
|
|
1159
1148
|
tickValues: l,
|
|
1160
1149
|
seriesList: n.seriesList
|
|
1161
1150
|
};
|
|
1162
|
-
}),
|
|
1163
|
-
start:
|
|
1164
|
-
end:
|
|
1165
|
-
},
|
|
1166
|
-
let n =
|
|
1167
|
-
return n >
|
|
1168
|
-
}),
|
|
1169
|
-
let r =
|
|
1151
|
+
}), m = p[0]?.scale ?? V(a.yDomain, [t.plotHeight, 0]).nice(), h = l.ticks(Math.max(2, Math.floor(t.width / 100))), g = p[0]?.majorTicks ?? [], _ = p[0]?.tickValues ?? [], v = l.domain(), y = {
|
|
1152
|
+
start: ut(v[0], v, e.timeUnit, "start", e.xAxisLabelFormatter),
|
|
1153
|
+
end: ut(v[1], v, e.timeUnit, "end", e.xAxisLabelFormatter)
|
|
1154
|
+
}, b = y.start.length * 7 + 10, x = y.end.length * 7 + 10, S = h.filter((e) => {
|
|
1155
|
+
let n = l(e);
|
|
1156
|
+
return n > b && n < t.width - x;
|
|
1157
|
+
}), C = a.visibleSeries.map((n) => {
|
|
1158
|
+
let r = p.find((e) => e.seriesList.some((e) => e.id === n.id)), a = r?.scale ?? m, o = Qt(n.points, v, t.width, e.rendering, {
|
|
1170
1159
|
lineVisible: !i && n.lineType !== "none",
|
|
1171
1160
|
pointVisible: n.pointType !== "none",
|
|
1172
1161
|
errorBarVisible: n.errorBar.visible,
|
|
1173
1162
|
hasErrorPoints: n.hasErrorPoints
|
|
1174
|
-
}), s = z().x((e) =>
|
|
1163
|
+
}), s = z().x((e) => l(e.x)).y((e) => a(e.y));
|
|
1175
1164
|
return n.lineType === "step-start" && s.curve(L), n.lineType === "step-middle" && s.curve(F), (n.lineType === "step-end" || n.lineType === "step-after") && s.curve(I), {
|
|
1176
1165
|
series: n,
|
|
1177
1166
|
path: o.linePoints.length ? s(o.linePoints) : null,
|
|
@@ -1182,13 +1171,13 @@ function pn(e) {
|
|
|
1182
1171
|
};
|
|
1183
1172
|
});
|
|
1184
1173
|
return {
|
|
1185
|
-
id:
|
|
1174
|
+
id: a.id,
|
|
1186
1175
|
index: r,
|
|
1187
|
-
series:
|
|
1188
|
-
seriesList:
|
|
1189
|
-
legendSeries:
|
|
1176
|
+
series: s,
|
|
1177
|
+
seriesList: a.visibleSeries,
|
|
1178
|
+
legendSeries: a.series,
|
|
1190
1179
|
isEmpty: i,
|
|
1191
|
-
hasVisibleSeries:
|
|
1180
|
+
hasVisibleSeries: o,
|
|
1192
1181
|
column: t.column,
|
|
1193
1182
|
showYAxisLabel: !e.hideSecondaryLabels || t.column === 0,
|
|
1194
1183
|
yAxisLabelX: e.yAxisLabelX,
|
|
@@ -1196,23 +1185,23 @@ function pn(e) {
|
|
|
1196
1185
|
top: t.top,
|
|
1197
1186
|
width: t.width,
|
|
1198
1187
|
height: t.plotHeight,
|
|
1199
|
-
xScale:
|
|
1200
|
-
yScale:
|
|
1201
|
-
yAxes:
|
|
1202
|
-
xMajorTicks:
|
|
1203
|
-
xMinorTicks:
|
|
1204
|
-
yMajorTicks:
|
|
1205
|
-
yMinorTicks:
|
|
1206
|
-
yAxisTickValues:
|
|
1207
|
-
xAxisTickValues:
|
|
1208
|
-
endpointLabels:
|
|
1209
|
-
path:
|
|
1210
|
-
seriesPaths:
|
|
1211
|
-
gridLines: e.grid.trackLines[
|
|
1188
|
+
xScale: l,
|
|
1189
|
+
yScale: m,
|
|
1190
|
+
yAxes: p,
|
|
1191
|
+
xMajorTicks: h,
|
|
1192
|
+
xMinorTicks: Xe(h, 3, v),
|
|
1193
|
+
yMajorTicks: g,
|
|
1194
|
+
yMinorTicks: p[0]?.minorTicks ?? [],
|
|
1195
|
+
yAxisTickValues: _,
|
|
1196
|
+
xAxisTickValues: S,
|
|
1197
|
+
endpointLabels: y,
|
|
1198
|
+
path: C[0]?.path ?? null,
|
|
1199
|
+
seriesPaths: C,
|
|
1200
|
+
gridLines: e.grid.trackLines[a.id] ?? {
|
|
1212
1201
|
horizontal: !0,
|
|
1213
1202
|
vertical: !0
|
|
1214
1203
|
},
|
|
1215
|
-
showXAxis: (i ||
|
|
1204
|
+
showXAxis: (i || o) && (e.displayMode === "independent" || (e.displayMode === "compact" ? t.isLastRow ?? t.row === e.grid.rowCount - 1 : n.has(t.slotIndex)))
|
|
1216
1205
|
};
|
|
1217
1206
|
});
|
|
1218
1207
|
}
|
|
@@ -1253,22 +1242,22 @@ function Sn(e, t) {
|
|
|
1253
1242
|
if (t === "single-axis") n.domain = e.yDomain;
|
|
1254
1243
|
else {
|
|
1255
1244
|
let t = n.seriesList.flatMap((e) => e.yDomain);
|
|
1256
|
-
n.domain = t.length > 0 ?
|
|
1245
|
+
n.domain = t.length > 0 ? $(t) : e.yDomain;
|
|
1257
1246
|
}
|
|
1258
1247
|
}), n.set(t, o), o;
|
|
1259
1248
|
}
|
|
1260
1249
|
function Cn(e, t, n, r) {
|
|
1261
|
-
let i =
|
|
1250
|
+
let i = Tt(e, r);
|
|
1262
1251
|
return Sn(e, t).map((e) => {
|
|
1263
1252
|
if (i) return {
|
|
1264
1253
|
...e,
|
|
1265
1254
|
domain: i,
|
|
1266
1255
|
fixed: !0
|
|
1267
1256
|
};
|
|
1268
|
-
let t = e.seriesList.map((e) =>
|
|
1257
|
+
let t = e.seriesList.map((e) => Et(e, n, r) ?? e.yDomain), a = e.seriesList.some((e) => Et(e, n, r));
|
|
1269
1258
|
return a ? {
|
|
1270
1259
|
...e,
|
|
1271
|
-
domain:
|
|
1260
|
+
domain: Ot(t),
|
|
1272
1261
|
fixed: a
|
|
1273
1262
|
} : e;
|
|
1274
1263
|
});
|
|
@@ -1277,7 +1266,7 @@ function wn(e, t = !0, n, r, i = 10) {
|
|
|
1277
1266
|
let a = typeof i == "number" && Number.isFinite(i) ? Math.max(2, Math.floor(i)) : 10, o = V(e, [1, 0]);
|
|
1278
1267
|
t && o.nice(a);
|
|
1279
1268
|
let [s, c] = o.domain(), l = n ?? o.ticks(a), u = Math.max(...l);
|
|
1280
|
-
return { tickTextWidth: Math.max(1, ...l.map((e) =>
|
|
1269
|
+
return { tickTextWidth: Math.max(1, ...l.map((e) => ot(e, {
|
|
1281
1270
|
axisMin: s,
|
|
1282
1271
|
axisMax: c,
|
|
1283
1272
|
topTickValue: u,
|
|
@@ -1566,10 +1555,10 @@ function Nn(e) {
|
|
|
1566
1555
|
if (w() || !d.value || !o.value.length) return;
|
|
1567
1556
|
let [t, n] = B(e, d.value);
|
|
1568
1557
|
g(() => {
|
|
1569
|
-
let e = m(t, n) ?? o.value.find((e) => e.hasVisibleSeries);
|
|
1570
|
-
if (!
|
|
1571
|
-
let
|
|
1572
|
-
v(
|
|
1558
|
+
let e = m(t, n), r = (e?.hasVisibleSeries ? e : void 0) ?? o.value.find((e) => e.hasVisibleSeries);
|
|
1559
|
+
if (!r) return;
|
|
1560
|
+
let i = Math.max(0, Math.min(r.width, t - r.left)), a = r.xScale.invert(i), s = o.value.flatMap((e) => e.seriesList.map((t) => x(t, e.index, T(t, a) ?? null)));
|
|
1561
|
+
v(s, null, a, {
|
|
1573
1562
|
x: c.value + t,
|
|
1574
1563
|
y: l.value + u.value + n
|
|
1575
1564
|
});
|
|
@@ -1671,7 +1660,7 @@ function Wn(e, t, n) {
|
|
|
1671
1660
|
let r = Bn(e), i = r[1] - r[0];
|
|
1672
1661
|
if (!Number.isFinite(i) || i <= 0) return 0;
|
|
1673
1662
|
let a = Number.isFinite(n.minZoomSpan) && (n.minZoomSpan ?? 0) > 0 ? Math.min(i, n.minZoomSpan) : 0, o = Vn(n.minVisiblePoints), s = Un(t, r, o);
|
|
1674
|
-
return a > 0 || o > 0 ? Math.max(a, s) : i /
|
|
1663
|
+
return a > 0 || o > 0 ? Math.max(a, s) : i / vt.DEFAULT_MAX_SCALE;
|
|
1675
1664
|
}
|
|
1676
1665
|
function Gn(e, t, n, r) {
|
|
1677
1666
|
if (r <= 0) return e;
|
|
@@ -1695,7 +1684,7 @@ function Kn(e, t, n, r) {
|
|
|
1695
1684
|
let o = Gn([Math.max(i[0], Math.min(e[0], e[1])), Math.min(i[1], Math.max(e[0], e[1]))], i, n, Vn(r.minVisiblePoints)), s = Wn(i, n, r), c = Math.max(s, Math.min(a, o[1] - o[0])), l = (o[0] + o[1]) / 2, u = Math.max(i[0], Math.min(l - c / 2, i[1] - c));
|
|
1696
1685
|
return [u, u + c];
|
|
1697
1686
|
}
|
|
1698
|
-
function
|
|
1687
|
+
function qn(e, t, n) {
|
|
1699
1688
|
let r = t[1] - t[0], i = e[1] - e[0];
|
|
1700
1689
|
if (!Number.isFinite(r) || !Number.isFinite(i) || r <= 0 || i <= 0) return W;
|
|
1701
1690
|
let a = r / i, o = V(t, [0, n]);
|
|
@@ -1703,7 +1692,7 @@ function $(e, t, n) {
|
|
|
1703
1692
|
}
|
|
1704
1693
|
//#endregion
|
|
1705
1694
|
//#region src/components/interaction/viewportDomain.ts
|
|
1706
|
-
function
|
|
1695
|
+
function Jn(e) {
|
|
1707
1696
|
return (t, n) => {
|
|
1708
1697
|
if (!(!Number.isFinite(t[0]) || !Number.isFinite(t[1]) || t[0] === t[1])) {
|
|
1709
1698
|
if (e.cancelPendingZoom(), e.cancelViewportDrag(), e.props.displayMode === "independent") {
|
|
@@ -1712,11 +1701,11 @@ function qn(e) {
|
|
|
1712
1701
|
let r = e.trackLayouts.value.find((e) => e.index === n);
|
|
1713
1702
|
if (!r) return;
|
|
1714
1703
|
let a = e.resolveInitialTrackDomain(r), o = Kn(t, a, [r.seriesList], e.props);
|
|
1715
|
-
i[n] =
|
|
1704
|
+
i[n] = qn(o, a, r.width);
|
|
1716
1705
|
}), e.independentTransforms.value = i;
|
|
1717
1706
|
} else {
|
|
1718
1707
|
let n = e.initialXDomain.value, r = Kn(t, n, e.trackLayouts.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), e.props);
|
|
1719
|
-
e.sharedTransform.value =
|
|
1708
|
+
e.sharedTransform.value = qn(r, n, e.innerWidth.value);
|
|
1720
1709
|
}
|
|
1721
1710
|
e.clearHover(), e.editorSeriesOptions.value = [], d(e.configureZoom);
|
|
1722
1711
|
}
|
|
@@ -1724,7 +1713,7 @@ function qn(e) {
|
|
|
1724
1713
|
}
|
|
1725
1714
|
//#endregion
|
|
1726
1715
|
//#region src/components/interaction/useWaveformViewport.ts
|
|
1727
|
-
function
|
|
1716
|
+
function Yn(e) {
|
|
1728
1717
|
let { props: n, emit: r, selection: i, spacePressed: a, trackLayouts: o, chartTracks: s, initialXDomain: c, innerWidth: l, innerHeight: u, sharedOverlayElement: f, sharedTransform: p, independentTransforms: m, sharedYDomains: h, independentYDomains: g, isZoomMode: _, isPresentationMode: v, editorSeriesOptions: y, resolveInitialTrackDomain: b, canZoomTrack: S, canZoomSharedTracks: C, configureZoom: w, cancelPendingZoom: T, clearHover: E, resolveTrackAtPointer: D } = e, O = x(), k = (e, t) => {
|
|
1729
1718
|
let n = O.value, r = t?.currentTarget;
|
|
1730
1719
|
Pn(n, e), r && r !== n && Pn(r, e);
|
|
@@ -1747,7 +1736,7 @@ function Jn(e) {
|
|
|
1747
1736
|
}), M = (e, t) => {
|
|
1748
1737
|
let n = e[1] - e[0];
|
|
1749
1738
|
return n >= t[1] - t[0] ? [...t] : e[0] < t[0] ? [t[0], t[0] + n] : e[1] > t[1] ? [t[1] - n, t[1]] : e;
|
|
1750
|
-
}, N = () => Object.fromEntries(o.value.map((e) => [e.series
|
|
1739
|
+
}, N = () => Object.fromEntries(o.value.filter((e) => e.hasVisibleSeries).map((e) => [e.series?.trackId ?? e.series?.id ?? e.id, e.yScale.domain()])), P = (e, t, r) => {
|
|
1751
1740
|
if (v.value) return;
|
|
1752
1741
|
let s = n.pannable && a.value;
|
|
1753
1742
|
if (!n.zoomable && !s || !_.value || e.button !== 0) return;
|
|
@@ -1769,19 +1758,19 @@ function Jn(e) {
|
|
|
1769
1758
|
g.accepted && (i.value = g.state, O.value = c, c.setPointerCapture?.(e.pointerId), E(), e.preventDefault());
|
|
1770
1759
|
}, F = (e) => {
|
|
1771
1760
|
if (!f.value) return;
|
|
1772
|
-
let [t, n] = B(e, f.value), r = D(t, n) ?? o.value.find((e) => e.hasVisibleSeries);
|
|
1773
|
-
|
|
1761
|
+
let [t, n] = B(e, f.value), r = D(t, n), i = (r?.hasVisibleSeries ? r : void 0) ?? o.value.find((e) => e.hasVisibleSeries);
|
|
1762
|
+
i && P(e, i.index, !1);
|
|
1774
1763
|
}, I = (e, t) => {
|
|
1775
1764
|
let i = t.width || 1, a = t.height || 1, u = e.currentX - e.startX, d = e.currentY - e.startY, f = e.xDomain[1] - e.xDomain[0], _ = e.independent ? b(t) : c.value, v = M([e.xDomain[0] - u / i * f, e.xDomain[1] - u / i * f], _);
|
|
1776
1765
|
if (e.independent) {
|
|
1777
1766
|
let e = [...m.value];
|
|
1778
|
-
e[t.index] =
|
|
1779
|
-
} else p.value =
|
|
1780
|
-
let y = e.independent ? [t] : o.value, x = { ...g.value }, S = { ...h.value };
|
|
1767
|
+
e[t.index] = qn(v, _, i), m.value = e;
|
|
1768
|
+
} else p.value = qn(v, _, l.value);
|
|
1769
|
+
let y = e.independent ? [t] : o.value.filter((e) => e.hasVisibleSeries), x = { ...g.value }, S = { ...h.value };
|
|
1781
1770
|
y.forEach((t) => {
|
|
1782
1771
|
let r = s.value.find((e) => e.id === t.id);
|
|
1783
|
-
if (r &&
|
|
1784
|
-
let i = t.series
|
|
1772
|
+
if (r && Dt(r, n.yDomain, n.yDomains)) return;
|
|
1773
|
+
let i = t.series?.trackId ?? t.series?.id ?? t.id, o = e.yDomains[i] ?? t.yScale.domain(), c = r?.yDomain ?? o, l = o[1] - o[0], u = M([o[0] + d / a * l, o[1] + d / a * l], c);
|
|
1785
1774
|
e.independent ? x[t.index] = u : S[i] = u;
|
|
1786
1775
|
}), e.independent ? g.value = x : h.value = S, r("zoom-change", v);
|
|
1787
1776
|
}, L = (e) => {
|
|
@@ -1812,11 +1801,11 @@ function Jn(e) {
|
|
|
1812
1801
|
let u = e.independent ? b(t) : c.value, f = e.independent ? [t.seriesList] : o.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), h = Kn([t.xScale.invert(a), t.xScale.invert(s)], u, f, n);
|
|
1813
1802
|
if (e.independent) {
|
|
1814
1803
|
let e = [...m.value];
|
|
1815
|
-
e[t.index] =
|
|
1816
|
-
} else p.value =
|
|
1817
|
-
let g = e.independent ? [t] : o.value, _ = Object.fromEntries(g.map((e) => [e.series
|
|
1804
|
+
e[t.index] = qn(h, u, t.width), m.value = e;
|
|
1805
|
+
} else p.value = qn(h, u, l.value);
|
|
1806
|
+
let g = e.independent ? [t] : o.value.filter((e) => e.hasVisibleSeries), _ = Object.fromEntries(g.map((e) => [e.series?.trackId ?? e.series?.id ?? e.id, e.yScale.domain()]));
|
|
1818
1807
|
if (r("zoom-change", h), e.independent) {
|
|
1819
|
-
let e = _[t.series
|
|
1808
|
+
let e = _[t.series?.trackId ?? t.series?.id ?? t.id];
|
|
1820
1809
|
r("zoom-end", {
|
|
1821
1810
|
start: h[0],
|
|
1822
1811
|
end: h[1],
|
|
@@ -1886,7 +1875,7 @@ function Jn(e) {
|
|
|
1886
1875
|
finishViewportDrag: V,
|
|
1887
1876
|
cancelViewportDrag: R,
|
|
1888
1877
|
resetViewport: H,
|
|
1889
|
-
setViewportDomain:
|
|
1878
|
+
setViewportDomain: Jn({
|
|
1890
1879
|
props: n,
|
|
1891
1880
|
trackLayouts: o,
|
|
1892
1881
|
initialXDomain: c,
|
|
@@ -1918,7 +1907,7 @@ function Jn(e) {
|
|
|
1918
1907
|
}
|
|
1919
1908
|
//#endregion
|
|
1920
1909
|
//#region src/components/utils/useAnimationFrameThrottle.ts
|
|
1921
|
-
function
|
|
1910
|
+
function Xn() {
|
|
1922
1911
|
let e = null, t = null;
|
|
1923
1912
|
function n(n) {
|
|
1924
1913
|
t = n, e === null && (e = requestAnimationFrame(() => {
|
|
@@ -1947,8 +1936,8 @@ function Yn() {
|
|
|
1947
1936
|
}
|
|
1948
1937
|
//#endregion
|
|
1949
1938
|
//#region src/components/interaction/useWaveformZoom.ts
|
|
1950
|
-
function
|
|
1951
|
-
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v =
|
|
1939
|
+
function Zn(e) {
|
|
1940
|
+
let { props: t, emit: n, svgElement: r, sharedOverlayElement: i, sharedTransform: a, independentTransforms: o, trackLayouts: s, initialXDomain: c, sharedZoomDomain: l, innerWidth: u, innerHeight: d, hasChartArea: f, isZoomMode: p, isPresentationMode: m, resolveInitialTrackDomain: h, cancelPendingHover: g } = e, _ = /* @__PURE__ */ new Map(), v = Xn(), y = !1, b = null, x = null, S = null, C = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Set(), D, O = () => v.schedule(j), k = (e) => {
|
|
1952
1941
|
y || m.value || (g(), b = e.transform, x = "wheel", O(), P());
|
|
1953
1942
|
}, A = (e, t) => {
|
|
1954
1943
|
y || m.value || (g(), C.set(t, e.transform), w.set(t, "wheel"), O(), P());
|
|
@@ -2017,7 +2006,7 @@ function Xn(e) {
|
|
|
2017
2006
|
} else n("zoom-end", {
|
|
2018
2007
|
start: e[0],
|
|
2019
2008
|
end: e[1],
|
|
2020
|
-
yRanges: Object.fromEntries(r.map((e) => [e.series
|
|
2009
|
+
yRanges: Object.fromEntries(r.map((e) => [e.series?.trackId ?? e.series?.id ?? e.id, e.yScale.domain()])),
|
|
2021
2010
|
gesture: "wheel"
|
|
2022
2011
|
});
|
|
2023
2012
|
S = null;
|
|
@@ -2035,19 +2024,19 @@ function Xn(e) {
|
|
|
2035
2024
|
F(), r.value?.querySelectorAll(".waveform-chart__overlay").forEach((e) => H(e).on(".zoom", null)), _.clear();
|
|
2036
2025
|
}, L = (e, n) => {
|
|
2037
2026
|
let r = Math.abs(e[1] - e[0]);
|
|
2038
|
-
if (!Number.isFinite(r) || r <= 0) return
|
|
2027
|
+
if (!Number.isFinite(r) || r <= 0) return vt.MIN_SCALE;
|
|
2039
2028
|
let i = Wn(e, n, t);
|
|
2040
|
-
return Math.max(
|
|
2041
|
-
}, R = (e, n, r, i) =>
|
|
2029
|
+
return Math.max(vt.MIN_SCALE, i > 0 ? r / i : vt.DEFAULT_MAX_SCALE);
|
|
2030
|
+
}, R = (e, n, r, i) => qn(Kn(e.rescaleX(V(n, [0, r])).domain(), n, i, t), n, r), z = (e) => {
|
|
2042
2031
|
let n = Number(t.minVisiblePoints);
|
|
2043
|
-
return
|
|
2032
|
+
return qt(e.seriesList, e.xScale.domain(), Number.isFinite(n) && n > 0 ? Math.ceil(n) + 1 : n);
|
|
2044
2033
|
}, B = () => {
|
|
2045
2034
|
let e = s.value.filter((e) => e.hasVisibleSeries);
|
|
2046
2035
|
return e.length > 0 && e.every(z);
|
|
2047
2036
|
}, U = (e, t) => {
|
|
2048
2037
|
if (e.type !== "wheel") return !1;
|
|
2049
2038
|
let n = e.deltaY;
|
|
2050
|
-
return n < 0 ? t : n > 0 && G(e.currentTarget).k >
|
|
2039
|
+
return n < 0 ? t : n > 0 && G(e.currentTarget).k > vt.MIN_SCALE;
|
|
2051
2040
|
};
|
|
2052
2041
|
return {
|
|
2053
2042
|
cancelPendingZoom: F,
|
|
@@ -2087,13 +2076,13 @@ function Xn(e) {
|
|
|
2087
2076
|
}
|
|
2088
2077
|
//#endregion
|
|
2089
2078
|
//#region src/components/core/useWaveformChartLifecycle.ts
|
|
2090
|
-
function
|
|
2079
|
+
function Qn(e) {
|
|
2091
2080
|
return e instanceof Element && !!e.closest("button, input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
2092
2081
|
}
|
|
2093
|
-
function
|
|
2082
|
+
function $n(e) {
|
|
2094
2083
|
let { props: t, emit: n, container: r, titleMeasureElement: i, resizeObserver: a, observedWidth: o, observedHeight: s, measuredTitleWidth: c, measuredTitleHeight: l, resolvedTitleText: u, titleAreaReserved: f, titleMeasureStyle: p, spacePressed: g, pointerInsideChart: _, currentPage: v, pageCount: y, pagedTracks: b, gridOptions: x, chartSeries: S, chartTracks: C, trackLayouts: w, innerWidth: T, innerHeight: D, sharedZoomDomain: O, initialXDomain: k, sharedTransform: A, activeInteractionMode: j, hiddenSeriesIdSet: M, internalHiddenSeriesIds: N, independentTransforms: P, independentYDomains: F, resolveInitialTrackDomain: I, annotationInteraction: L, editorSeriesOptions: R, isPresentationMode: z, clearHover: B, cancelAnnotation: V, configureZoom: H, resetViewport: U, cancelViewportDrag: ee, cancelPendingHover: te, clearZoomBindings: ne } = e;
|
|
2095
2084
|
function re(e) {
|
|
2096
|
-
z.value || e.code !== "Space" || !t.pannable || !_.value ||
|
|
2085
|
+
z.value || e.code !== "Space" || !t.pannable || !_.value || Qn(e.target) || (g.value = !0, e.preventDefault());
|
|
2097
2086
|
}
|
|
2098
2087
|
function ie(e) {
|
|
2099
2088
|
e.code === "Space" && (g.value = !1);
|
|
@@ -2127,11 +2116,11 @@ function Qn(e) {
|
|
|
2127
2116
|
let r = q?.[n.index];
|
|
2128
2117
|
if (!r) return;
|
|
2129
2118
|
let i = I(n), a = Kn(r, i, [n.seriesList], t);
|
|
2130
|
-
e[n.index] =
|
|
2119
|
+
e[n.index] = qn(a, i, n.width);
|
|
2131
2120
|
}), P.value = e, q = void 0;
|
|
2132
2121
|
} else if (t.displayMode !== "independent" && K) {
|
|
2133
2122
|
let e = k.value, n = w.value.filter((e) => e.hasVisibleSeries).map((e) => e.seriesList), r = Kn(K, e, n, t);
|
|
2134
|
-
A.value =
|
|
2123
|
+
A.value = qn(r, e, T.value), K = void 0;
|
|
2135
2124
|
}
|
|
2136
2125
|
H();
|
|
2137
2126
|
});
|
|
@@ -2216,64 +2205,66 @@ function Qn(e) {
|
|
|
2216
2205
|
}
|
|
2217
2206
|
//#endregion
|
|
2218
2207
|
//#region src/components/core/useWaveformData.ts
|
|
2219
|
-
function
|
|
2208
|
+
function er(e, t = !1) {
|
|
2220
2209
|
let n = Infinity, r = -Infinity, i = Infinity, a = -Infinity, o = !1;
|
|
2221
2210
|
for (let s of e) if (s.x < n && (n = s.x), s.x > r && (r = s.x), s.y < i && (i = s.y), s.y > a && (a = s.y), t) {
|
|
2222
|
-
let e =
|
|
2211
|
+
let e = Pt(s);
|
|
2223
2212
|
(e.lower !== 0 || e.upper !== 0) && (o = !0), i = Math.min(i, s.y - e.lower), a = Math.max(a, s.y + e.upper);
|
|
2224
2213
|
}
|
|
2225
2214
|
return {
|
|
2226
|
-
xDomain:
|
|
2227
|
-
yDomain:
|
|
2215
|
+
xDomain: $(Number.isFinite(n) ? [n, r] : []),
|
|
2216
|
+
yDomain: $(Number.isFinite(i) ? [i, a] : []),
|
|
2228
2217
|
hasErrorPoints: o
|
|
2229
2218
|
};
|
|
2230
2219
|
}
|
|
2231
|
-
function
|
|
2232
|
-
return
|
|
2233
|
-
let t =
|
|
2220
|
+
function tr(e) {
|
|
2221
|
+
return It(e).map((e) => {
|
|
2222
|
+
let t = er(e.points, e.errorBar.visible);
|
|
2234
2223
|
return {
|
|
2235
2224
|
...e,
|
|
2236
2225
|
...t
|
|
2237
2226
|
};
|
|
2238
2227
|
});
|
|
2239
2228
|
}
|
|
2240
|
-
function
|
|
2241
|
-
let r = x(
|
|
2229
|
+
function nr(e, t, n) {
|
|
2230
|
+
let r = x(tr(e()));
|
|
2242
2231
|
return E(e, (e) => {
|
|
2243
|
-
t(), r.value =
|
|
2232
|
+
t(), r.value = tr(e), n();
|
|
2244
2233
|
}), r;
|
|
2245
2234
|
}
|
|
2246
2235
|
//#endregion
|
|
2247
2236
|
//#region src/components/core/useWaveformLayout.ts
|
|
2248
|
-
function
|
|
2237
|
+
function rr(e) {
|
|
2249
2238
|
let { props: n, preparedSeries: r, currentPage: i, hiddenSeriesIdSet: a, chartWidth: o, innerHeight: s, isCleanView: c, sharedTransform: l, independentTransforms: u, sharedYDomains: d, independentYDomains: f, annotationInteraction: p } = e, m = t(() => r.value.map((e, t) => ({
|
|
2250
2239
|
...e,
|
|
2251
|
-
color: e.color ?? (t === 0 ? n.lineColor :
|
|
2252
|
-
}))), h = t(() => {
|
|
2240
|
+
color: e.color ?? (t === 0 ? n.lineColor : xt[t % xt.length])
|
|
2241
|
+
}))), h = t(() => tn(n.grid)), g = t(() => {
|
|
2253
2242
|
let e = /* @__PURE__ */ new Map();
|
|
2254
|
-
|
|
2243
|
+
m.value.forEach((t) => {
|
|
2255
2244
|
let n = t.trackId || t.id, r = e.get(n);
|
|
2256
2245
|
r ? r.push(t) : e.set(n, [t]);
|
|
2257
|
-
})
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2246
|
+
});
|
|
2247
|
+
let t = h.value.trackOrder ?? [];
|
|
2248
|
+
return [...t, ...Array.from(e.keys()).filter((e) => !t.includes(e))].map((t) => {
|
|
2249
|
+
let n = e.get(t) ?? [], r = n.filter((e) => !a.value.has(e.id)), i = [], o = [];
|
|
2250
|
+
return r.forEach((e) => {
|
|
2251
|
+
i.push(e.xDomain[0], e.xDomain[1]), o.push(e.yDomain[0], e.yDomain[1]);
|
|
2261
2252
|
}), {
|
|
2262
|
-
id:
|
|
2263
|
-
series:
|
|
2264
|
-
visibleSeries:
|
|
2265
|
-
xDomain:
|
|
2266
|
-
yDomain:
|
|
2253
|
+
id: t,
|
|
2254
|
+
series: n,
|
|
2255
|
+
visibleSeries: r,
|
|
2256
|
+
xDomain: i.length ? $(i) : [0, 1],
|
|
2257
|
+
yDomain: o.length ? $(o) : [0, 1]
|
|
2267
2258
|
};
|
|
2268
2259
|
});
|
|
2269
|
-
}),
|
|
2270
|
-
let e =
|
|
2260
|
+
}), _ = t(() => Ut(n.rendering)), v = t(() => rn(g.value.length, h.value)), y = t(() => an(g.value, i.value, h.value)), b = t(() => {
|
|
2261
|
+
let e = g.value.filter((e) => e.visibleSeries.length > 0).flatMap((e) => Cn(e, n.overlayMode, n.yDomain, n.yDomains)).map((e) => wn(e.domain, !0, void 0, e.seriesList[0]?.unit, n.axes?.y?.splitNumber).tickTextWidth), t = Math.max(7, ...e), r = t + 7 + 4, i = -(7 + t + 0 + 12 / 2);
|
|
2271
2262
|
return {
|
|
2272
2263
|
tickClearance: r,
|
|
2273
2264
|
fullClearance: t + 7 + 0 + 12 + 4,
|
|
2274
2265
|
labelCenterX: i
|
|
2275
2266
|
};
|
|
2276
|
-
}), x = t(() =>
|
|
2267
|
+
}), x = t(() => g.value.some((e) => e.visibleSeries.length === 1 && !!(e.visibleSeries[0]?.name.trim() || n.yLabel))), S = t(() => g.value.some((e) => e.visibleSeries.length > 0)), C = t(() => Math.max(_t.left, x.value ? b.value.fullClearance : S.value ? b.value.tickClearance : 0)), w = t(() => g.value.reduce((e, t) => {
|
|
2277
2268
|
let r = Dn(t, n.overlayMode, n.yDomain, n.yDomains, n.axes?.y?.splitNumber);
|
|
2278
2269
|
return {
|
|
2279
2270
|
left: Math.max(e.left, r.left),
|
|
@@ -2282,29 +2273,29 @@ function nr(e) {
|
|
|
2282
2273
|
}, {
|
|
2283
2274
|
left: 0,
|
|
2284
2275
|
right: 0
|
|
2285
|
-
})), T = t(() => n.overlayMode === "multi-axis" ? Math.max(C.value, w.value.left) : C.value), E = t(() => n.overlayMode === "multi-axis" ? Math.max(
|
|
2286
|
-
let e = on(n.displayMode), t =
|
|
2276
|
+
})), T = t(() => n.overlayMode === "multi-axis" ? Math.max(C.value, w.value.left) : C.value), E = t(() => n.overlayMode === "multi-axis" ? Math.max(_t.right, w.value.right) : _t.right), D = t(() => Math.max(0, o.value - T.value - E.value)), O = t(() => {
|
|
2277
|
+
let e = on(n.displayMode), t = h.value.columnCount, r = t > 1, i = Math.max(e, b.value.fullClearance), a = Math.max(e, b.value.tickClearance), o = (D.value - i * Math.max(0, t - 1)) / t >= 120;
|
|
2287
2278
|
return {
|
|
2288
2279
|
horizontalGap: n.overlayMode === "multi-axis" && r && S.value ? Math.max(e, w.value.left + w.value.right) : r && S.value ? x.value && o ? i : a : e,
|
|
2289
2280
|
hideSecondaryLabels: n.overlayMode !== "multi-axis" && r && x.value && !o
|
|
2290
2281
|
};
|
|
2291
2282
|
}), k = t(() => m.value.length > 0), A = t(() => D.value > 0 && s.value > 0), j = t(() => n.xLabel ?? `时间(${n.timeUnit})`), M = t(() => n.interactionMode), N = t(() => M.value === "zoom" || M.value === void 0), P = t(() => {
|
|
2292
2283
|
let e = [];
|
|
2293
|
-
return
|
|
2284
|
+
return g.value.forEach((t) => {
|
|
2294
2285
|
t.visibleSeries.length && e.push(t.xDomain[0], t.xDomain[1]);
|
|
2295
|
-
}),
|
|
2286
|
+
}), $(e);
|
|
2296
2287
|
}), F = t(() => {
|
|
2297
2288
|
let e = n.initialXDomain;
|
|
2298
2289
|
return e && Number.isFinite(e[0]) && Number.isFinite(e[1]) && e[0] !== e[1] ? dn(e[0] < e[1] ? e : [e[1], e[0]], n.xDomainStrategy, !0) : dn(P.value, n.xDomainStrategy);
|
|
2299
2290
|
}), I = (e) => {
|
|
2300
|
-
let t = n.initialXDomains?.[e.series
|
|
2301
|
-
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? dn(t[0] < t[1] ? t : [t[1], t[0]], n.xDomainStrategy, !0) : dn(
|
|
2302
|
-
}, L = t(() => l.value.rescaleX(V(F.value, [0, D.value])).domain()), R = t(() => sn(D.value, s.value,
|
|
2291
|
+
let t = n.initialXDomains?.[e.series?.trackId ?? e.series?.id ?? e.id] ?? (e.series ? n.initialXDomains?.[e.series.id] : void 0) ?? n.initialXDomain;
|
|
2292
|
+
return t && Number.isFinite(t[0]) && Number.isFinite(t[1]) && t[0] !== t[1] ? dn(t[0] < t[1] ? t : [t[1], t[0]], n.xDomainStrategy, !0) : dn($(e.seriesList.flatMap((e) => e.xDomain)), n.xDomainStrategy);
|
|
2293
|
+
}, L = t(() => l.value.rescaleX(V(F.value, [0, D.value])).domain()), R = t(() => sn(D.value, s.value, h.value, n.displayMode, y.value.map(Boolean), O.value.horizontalGap).map((e, t) => ({
|
|
2303
2294
|
...e,
|
|
2304
2295
|
series: y.value[t]
|
|
2305
2296
|
}))), z = t(() => pn({
|
|
2306
2297
|
cells: R.value,
|
|
2307
|
-
grid:
|
|
2298
|
+
grid: h.value,
|
|
2308
2299
|
displayMode: n.displayMode,
|
|
2309
2300
|
overlayMode: n.overlayMode,
|
|
2310
2301
|
independentTransforms: u.value,
|
|
@@ -2314,7 +2305,7 @@ function nr(e) {
|
|
|
2314
2305
|
xDomainStrategy: n.xDomainStrategy,
|
|
2315
2306
|
fixedYDomain: n.yDomain,
|
|
2316
2307
|
fixedYDomains: n.yDomains,
|
|
2317
|
-
yDomains: n.displayMode === "independent" ? Object.fromEntries(
|
|
2308
|
+
yDomains: n.displayMode === "independent" ? Object.fromEntries(g.value.flatMap((e, t) => {
|
|
2318
2309
|
let n = f.value[t];
|
|
2319
2310
|
return n ? [[e.id, n]] : [];
|
|
2320
2311
|
})) : d.value,
|
|
@@ -2332,8 +2323,8 @@ function nr(e) {
|
|
|
2332
2323
|
})), H = (e, t) => e.seriesPaths.find((e) => e.series.id === t)?.yScale ?? e.yScale, U = t(() => z.value.flatMap(B));
|
|
2333
2324
|
return {
|
|
2334
2325
|
chartSeries: m,
|
|
2335
|
-
chartTracks:
|
|
2336
|
-
gridOptions:
|
|
2326
|
+
chartTracks: g,
|
|
2327
|
+
gridOptions: h,
|
|
2337
2328
|
pageCount: v,
|
|
2338
2329
|
pagedTracks: y,
|
|
2339
2330
|
resolvedChartLeftMargin: T,
|
|
@@ -2363,17 +2354,17 @@ function nr(e) {
|
|
|
2363
2354
|
} : void 0;
|
|
2364
2355
|
}),
|
|
2365
2356
|
resolveFrameNumber: (e) => {
|
|
2366
|
-
if (!(n.frameNumber === void 0 || n.frameNumber === null)) return
|
|
2357
|
+
if (!(n.frameNumber === void 0 || n.frameNumber === null)) return g.value.length === 1 ? n.frameNumber : typeof n.frameNumber == "number" ? n.frameNumber + e : `${n.frameNumber}-${e + 1}`;
|
|
2367
2358
|
}
|
|
2368
2359
|
};
|
|
2369
2360
|
}
|
|
2370
|
-
var
|
|
2371
|
-
function
|
|
2361
|
+
var ir = 1e-6;
|
|
2362
|
+
function ar(e) {
|
|
2372
2363
|
return Number.isFinite(e) ? Math.max(1, e) : 1;
|
|
2373
2364
|
}
|
|
2374
|
-
function
|
|
2375
|
-
let i =
|
|
2376
|
-
if (!(d >
|
|
2365
|
+
function or({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r }) {
|
|
2366
|
+
let i = ar(e), a = ar(t), o = ar(n), s = Number.isFinite(r) ? r : 0, c = s * Math.PI / 180, l = Math.abs(Math.cos(c)), u = Math.abs(Math.sin(c)), d = (s % 360 + 360) % 360;
|
|
2367
|
+
if (!(d > ir && Math.abs(d - 360) > ir)) {
|
|
2377
2368
|
let e = Math.max(1, Math.ceil(i / o)), t = o, n = a * e;
|
|
2378
2369
|
return {
|
|
2379
2370
|
textWidth: t,
|
|
@@ -2398,7 +2389,7 @@ function ar({ naturalWidth: e, naturalHeight: t, availableWidth: n, rotation: r
|
|
|
2398
2389
|
}
|
|
2399
2390
|
//#endregion
|
|
2400
2391
|
//#region src/components/core/useWaveformPresentation.ts
|
|
2401
|
-
function
|
|
2392
|
+
function sr(e) {
|
|
2402
2393
|
let { props: n, observedWidth: r, observedHeight: i, measuredTitleWidth: a, measuredTitleHeight: o, internalHiddenSeriesIds: s, paginationBandHeight: c } = e, l = t(() => Number.isFinite(n.width) ? Math.max(0, n.width ?? 0) : void 0), u = t(() => Number.isFinite(n.height) ? Math.max(180, n.height ?? 0) : void 0), d = t(() => r.value > 0 ? r.value : l.value ?? 0), f = t(() => i.value > 0 ? i.value : u.value ?? 180), p = t(() => ({
|
|
2403
2394
|
width: l.value === void 0 ? "100%" : `${l.value}px`,
|
|
2404
2395
|
height: u.value === void 0 ? "100%" : `${u.value}px`
|
|
@@ -2406,9 +2397,9 @@ function or(e) {
|
|
|
2406
2397
|
let e = n.zeroLine.width;
|
|
2407
2398
|
return {
|
|
2408
2399
|
visible: n.zeroLine.visible === !0,
|
|
2409
|
-
color: n.zeroLine.color ||
|
|
2410
|
-
width: typeof e == "number" && Number.isFinite(e) && e > 0 ? e :
|
|
2411
|
-
dash: n.zeroLine.dash ??
|
|
2400
|
+
color: n.zeroLine.color || Ct.COLOR,
|
|
2401
|
+
width: typeof e == "number" && Number.isFinite(e) && e > 0 ? e : Ct.WIDTH,
|
|
2402
|
+
dash: n.zeroLine.dash ?? Ct.DASH
|
|
2412
2403
|
};
|
|
2413
2404
|
}), _ = t(() => n.legend.backgroundColor || "rgba(255, 255, 255, 0.7)"), v = t(() => n.legend.interactive === !0), y = t(() => n.hiddenSeriesIds === void 0 ? s.value : new Set(n.hiddenSeriesIds)), b = t(() => Array.from(y.value)), x = (e) => n.legend.trackPositions?.[e] ?? n.legend.position ?? "top-right", S = (e) => {
|
|
2414
2405
|
let t = n.legend.orientation ?? "auto";
|
|
@@ -2430,10 +2421,10 @@ function or(e) {
|
|
|
2430
2421
|
fontStyle: n.title?.textStyle?.fontStyle ?? "normal",
|
|
2431
2422
|
textDecoration: n.title?.textStyle?.textDecoration ?? "none",
|
|
2432
2423
|
letterSpacing: n.title?.textStyle?.letterSpacing ?? "normal",
|
|
2433
|
-
lineHeight: String(
|
|
2424
|
+
lineHeight: String(bt)
|
|
2434
2425
|
})), A = t(() => {
|
|
2435
2426
|
let e = Number.parseFloat(n.title?.textStyle?.letterSpacing ?? ""), t = Number.isFinite(e) ? Math.max(0, C.value.length - 1) * e : 0;
|
|
2436
|
-
return Math.max(1, C.value.length * E.value *
|
|
2427
|
+
return Math.max(1, C.value.length * E.value * yt + t);
|
|
2437
2428
|
}), j = t(() => {
|
|
2438
2429
|
let e = d.value - 48;
|
|
2439
2430
|
return e > 0 ? e : A.value;
|
|
@@ -2443,14 +2434,14 @@ function or(e) {
|
|
|
2443
2434
|
maxWidth: O.value ? "none" : `${j.value}px`,
|
|
2444
2435
|
whiteSpace: O.value ? "nowrap" : "normal",
|
|
2445
2436
|
overflowWrap: O.value ? "normal" : "anywhere"
|
|
2446
|
-
})), N = t(() =>
|
|
2437
|
+
})), N = t(() => or({
|
|
2447
2438
|
naturalWidth: a.value || A.value,
|
|
2448
2439
|
naturalHeight: o.value || E.value * 1.2,
|
|
2449
2440
|
availableWidth: j.value,
|
|
2450
2441
|
rotation: D.value
|
|
2451
2442
|
})), P = t(() => w.value ? N.value.areaHeight : 0), F = (e, t) => typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : t, I = t(() => ({
|
|
2452
|
-
top: F(n.plotMargin.top,
|
|
2453
|
-
bottom: F(n.plotMargin.bottom,
|
|
2443
|
+
top: F(n.plotMargin.top, _t.top),
|
|
2444
|
+
bottom: F(n.plotMargin.bottom, _t.bottom)
|
|
2454
2445
|
})), L = t(() => I.value.top), R = t(() => Math.max(0, f.value - P.value - c.value));
|
|
2455
2446
|
return {
|
|
2456
2447
|
fixedWidth: l,
|
|
@@ -2499,10 +2490,10 @@ function or(e) {
|
|
|
2499
2490
|
}
|
|
2500
2491
|
//#endregion
|
|
2501
2492
|
//#region src/components/core/useWaveformChartController.ts
|
|
2502
|
-
function
|
|
2493
|
+
function cr(e, t) {
|
|
2503
2494
|
e.value = t instanceof Element ? t : void 0;
|
|
2504
2495
|
}
|
|
2505
|
-
function
|
|
2496
|
+
function lr(e, t) {
|
|
2506
2497
|
let n = v(), r = v(), i = v(), a = v(), o = v(0), s = v(0), c = v(0), l = v(0), d = v(0), f = x(W), p = x([]), m = v({}), h = v({}), g = b({
|
|
2507
2498
|
points: [],
|
|
2508
2499
|
trackIndex: null,
|
|
@@ -2511,11 +2502,11 @@ function cr(e, t) {
|
|
|
2511
2502
|
x: 0,
|
|
2512
2503
|
y: 0
|
|
2513
2504
|
}
|
|
2514
|
-
}), y = v(!1), S = v(1), w = x(), T = se("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ye(), A = v([]), j =
|
|
2505
|
+
}), y = v(!1), S = v(1), w = x(), T = se("waveform-clip"), O = v(new Set(e.defaultHiddenSeriesIds)), k = Ye(), A = v([]), j = Xn();
|
|
2515
2506
|
E([() => e.yDomain, () => e.yDomains], () => {
|
|
2516
2507
|
m.value = {}, h.value = {};
|
|
2517
2508
|
}, { deep: !0 });
|
|
2518
|
-
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L =
|
|
2509
|
+
let M = x(null), N = v(!1), P = v(!1), F = () => void 0, I = () => void 0, L = nr(() => e.data, () => F(), () => I()), R = sr({
|
|
2519
2510
|
props: e,
|
|
2520
2511
|
observedWidth: o,
|
|
2521
2512
|
observedHeight: s,
|
|
@@ -2523,7 +2514,7 @@ function cr(e, t) {
|
|
|
2523
2514
|
measuredTitleHeight: l,
|
|
2524
2515
|
internalHiddenSeriesIds: O,
|
|
2525
2516
|
paginationBandHeight: d
|
|
2526
|
-
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: G } = R, K =
|
|
2517
|
+
}), { chartWidth: z, chartHeight: B, isCleanView: V, isPresentationMode: H, hiddenSeriesIdSet: U, resolvedTitleText: ee, titleAreaReserved: te, titleMeasureStyle: ne, titleAreaHeight: re, chartTopMargin: ie, innerHeight: G } = R, K = rr({
|
|
2527
2518
|
props: e,
|
|
2528
2519
|
preparedSeries: L,
|
|
2529
2520
|
currentPage: S,
|
|
@@ -2540,7 +2531,7 @@ function cr(e, t) {
|
|
|
2540
2531
|
D(() => {
|
|
2541
2532
|
d.value = oe.value.showPagination && ce.value > 1 && z.value <= 520 ? 40 : 0;
|
|
2542
2533
|
});
|
|
2543
|
-
let ye =
|
|
2534
|
+
let ye = Zn({
|
|
2544
2535
|
props: e,
|
|
2545
2536
|
emit: t,
|
|
2546
2537
|
svgElement: r,
|
|
@@ -2577,7 +2568,7 @@ function cr(e, t) {
|
|
|
2577
2568
|
chartTopMargin: ie,
|
|
2578
2569
|
activeInteractionMode: pe,
|
|
2579
2570
|
isPresentationMode: H
|
|
2580
|
-
}), xe =
|
|
2571
|
+
}), xe = Yn({
|
|
2581
2572
|
props: e,
|
|
2582
2573
|
emit: t,
|
|
2583
2574
|
selection: M,
|
|
@@ -2617,7 +2608,7 @@ function cr(e, t) {
|
|
|
2617
2608
|
isPresentationMode: H,
|
|
2618
2609
|
updateViewportDrag: xe.updateViewportDrag,
|
|
2619
2610
|
resolveTrackAtPointer: be.resolveTrackAtPointer
|
|
2620
|
-
}), Z =
|
|
2611
|
+
}), Z = $n({
|
|
2621
2612
|
props: e,
|
|
2622
2613
|
emit: t,
|
|
2623
2614
|
container: n,
|
|
@@ -2668,7 +2659,7 @@ function cr(e, t) {
|
|
|
2668
2659
|
...be,
|
|
2669
2660
|
...xe,
|
|
2670
2661
|
...X,
|
|
2671
|
-
margin:
|
|
2662
|
+
margin: _t,
|
|
2672
2663
|
getPageSize: nn,
|
|
2673
2664
|
currentPage: S,
|
|
2674
2665
|
selection: M,
|
|
@@ -2680,34 +2671,34 @@ function cr(e, t) {
|
|
|
2680
2671
|
editorSeriesOptions: A,
|
|
2681
2672
|
clipPathId: T,
|
|
2682
2673
|
goToPage: Z.goToPage,
|
|
2683
|
-
setContainer: (e) =>
|
|
2684
|
-
setSvgElement: (e) =>
|
|
2685
|
-
setTitleMeasureElement: (e) =>
|
|
2686
|
-
setSharedOverlayElement: (e) =>
|
|
2674
|
+
setContainer: (e) => cr(n, e),
|
|
2675
|
+
setSvgElement: (e) => cr(r, e),
|
|
2676
|
+
setTitleMeasureElement: (e) => cr(i, e),
|
|
2677
|
+
setSharedOverlayElement: (e) => cr(a, e)
|
|
2687
2678
|
});
|
|
2688
2679
|
}
|
|
2689
2680
|
//#endregion
|
|
2690
2681
|
//#region src/components/annotation/WaveformAnnotationEditor.vue?vue&type=script&setup=true&lang.ts
|
|
2691
|
-
var
|
|
2682
|
+
var ur = ["id"], dr = { class: "waveform-annotation-editor__content" }, fr = {
|
|
2692
2683
|
class: "waveform-annotation-editor__coordinates",
|
|
2693
2684
|
"aria-label": "标注坐标"
|
|
2694
|
-
},
|
|
2685
|
+
}, pr = ["aria-invalid"], mr = {
|
|
2695
2686
|
class: "waveform-annotation-editor__coordinate-value",
|
|
2696
2687
|
"aria-hidden": "true"
|
|
2697
|
-
},
|
|
2688
|
+
}, hr = ["id"], gr = {
|
|
2698
2689
|
key: 0,
|
|
2699
2690
|
class: "waveform-annotation-editor__series",
|
|
2700
2691
|
"aria-label": "标注所属波形"
|
|
2701
|
-
},
|
|
2692
|
+
}, _r = { class: "waveform-annotation-editor__series-label" }, vr = ["value"], yr = ["value"], br = { key: 1 }, xr = { class: "waveform-annotation-editor__field" }, Sr = { class: "waveform-annotation-editor__label-row" }, Cr = ["maxlength"], wr = { class: "waveform-annotation-editor__colors" }, Tr = {
|
|
2702
2693
|
class: "waveform-annotation-editor__color-field",
|
|
2703
2694
|
title: "调整标注边框色和透明度"
|
|
2704
|
-
},
|
|
2695
|
+
}, Er = {
|
|
2705
2696
|
class: "waveform-annotation-editor__color-field",
|
|
2706
2697
|
title: "调整标注文字色和透明度"
|
|
2707
|
-
},
|
|
2698
|
+
}, Dr = {
|
|
2708
2699
|
class: "waveform-annotation-editor__color-field",
|
|
2709
2700
|
title: "调整标注背景色和透明度"
|
|
2710
|
-
},
|
|
2701
|
+
}, Or = /*#__PURE__*/ Fe(/* @__PURE__ */ c({
|
|
2711
2702
|
__name: "WaveformAnnotationEditor",
|
|
2712
2703
|
props: {
|
|
2713
2704
|
annotation: {},
|
|
@@ -2735,7 +2726,7 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2735
2726
|
});
|
|
2736
2727
|
function F() {
|
|
2737
2728
|
let e = we(l.annotation.style);
|
|
2738
|
-
h.value = l.annotation.text, _.value =
|
|
2729
|
+
h.value = l.annotation.text, _.value = mt(l.annotation.x, l.timeUnit), b.value = !1, x.value = e.borderColor, C.value = e.textColor, D.value = e.backgroundColor, d(() => f.value?.focus());
|
|
2739
2730
|
}
|
|
2740
2731
|
E(() => l.annotation.id, F, { immediate: !0 });
|
|
2741
2732
|
function I(e) {
|
|
@@ -2775,9 +2766,9 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2775
2766
|
onCancel: o[4] ||= (e) => u("cancel"),
|
|
2776
2767
|
onOk: R
|
|
2777
2768
|
}, {
|
|
2778
|
-
title: O(() => [a("span", { id: w(m) }, S(l.mode === "add" ? "添加标注" : "编辑标注"), 9,
|
|
2779
|
-
default: O(() => [a("div",
|
|
2780
|
-
a("div",
|
|
2769
|
+
title: O(() => [a("span", { id: w(m) }, S(l.mode === "add" ? "添加标注" : "编辑标注"), 9, ur)]),
|
|
2770
|
+
default: O(() => [a("div", dr, [
|
|
2771
|
+
a("div", fr, [
|
|
2781
2772
|
a("label", {
|
|
2782
2773
|
class: "waveform-annotation-editor__coordinate-input",
|
|
2783
2774
|
"aria-invalid": !!j.value
|
|
@@ -2800,26 +2791,26 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2800
2791
|
"aria-invalid",
|
|
2801
2792
|
"aria-describedby"
|
|
2802
2793
|
]),
|
|
2803
|
-
a("code",
|
|
2804
|
-
], 8,
|
|
2794
|
+
a("code", mr, S(_.value), 1)
|
|
2795
|
+
], 8, pr),
|
|
2805
2796
|
j.value ? (g(), i("p", {
|
|
2806
2797
|
key: 0,
|
|
2807
2798
|
id: `${w(m)}-time-error`,
|
|
2808
2799
|
class: "waveform-annotation-editor__coordinate-error",
|
|
2809
2800
|
role: "alert"
|
|
2810
|
-
}, S(j.value), 9,
|
|
2811
|
-
a("span", null, [o[6] ||= a("b", null, "Y", -1), a("code", null, S(w(
|
|
2801
|
+
}, S(j.value), 9, hr)) : r("", !0),
|
|
2802
|
+
a("span", null, [o[6] ||= a("b", null, "Y", -1), a("code", null, S(w(ct)(l.annotation.y)), 1)])
|
|
2812
2803
|
]),
|
|
2813
2804
|
o[13] ||= a("p", {
|
|
2814
2805
|
class: "waveform-annotation-editor__coordinate-hint",
|
|
2815
2806
|
role: "note"
|
|
2816
2807
|
}, " 修改 X 轴后失焦时会自动吸附最近的采样点 ", -1),
|
|
2817
|
-
P.value ? (g(), i("label",
|
|
2808
|
+
P.value ? (g(), i("label", gr, [
|
|
2818
2809
|
a("i", {
|
|
2819
2810
|
style: p({ backgroundColor: P.value.color }),
|
|
2820
2811
|
"aria-hidden": "true"
|
|
2821
2812
|
}, null, 4),
|
|
2822
|
-
a("span",
|
|
2813
|
+
a("span", _r, [o[7] ||= a("small", null, "标注波形", -1), a("b", null, S(P.value.name), 1)]),
|
|
2823
2814
|
l.seriesOptions?.length ? (g(), i("select", {
|
|
2824
2815
|
key: 0,
|
|
2825
2816
|
value: l.annotation.seriesId,
|
|
@@ -2828,9 +2819,9 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2828
2819
|
}, [(g(!0), i(e, null, y(l.seriesOptions, (e) => (g(), i("option", {
|
|
2829
2820
|
key: e.seriesId,
|
|
2830
2821
|
value: e.seriesId
|
|
2831
|
-
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9,
|
|
2822
|
+
}, S(e.name) + S(e.unit ? ` (${e.unit})` : ""), 9, yr))), 128))], 40, vr)) : P.value.unit ? (g(), i("code", br, S(P.value.unit), 1)) : r("", !0)
|
|
2832
2823
|
])) : r("", !0),
|
|
2833
|
-
a("label",
|
|
2824
|
+
a("label", xr, [a("span", Sr, [o[8] ||= a("b", null, "标注文本", -1), a("small", null, S(N.value) + "/" + S(w(40)), 1)]), k(a("textarea", {
|
|
2834
2825
|
ref_key: "textarea",
|
|
2835
2826
|
ref: f,
|
|
2836
2827
|
"onUpdate:modelValue": o[0] ||= (e) => h.value = e,
|
|
@@ -2839,10 +2830,10 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2839
2830
|
"aria-label": "标注文本",
|
|
2840
2831
|
placeholder: "输入这处波形的说明",
|
|
2841
2832
|
onKeydown: z
|
|
2842
|
-
}, null, 40,
|
|
2843
|
-
a("fieldset",
|
|
2833
|
+
}, null, 40, Cr), [[T, h.value]])]),
|
|
2834
|
+
a("fieldset", wr, [
|
|
2844
2835
|
o[12] ||= a("legend", null, "颜色与透明度", -1),
|
|
2845
|
-
a("label",
|
|
2836
|
+
a("label", Tr, [o[9] ||= a("span", null, "边框色", -1), s(w(J), {
|
|
2846
2837
|
"pure-color": x.value,
|
|
2847
2838
|
"onUpdate:pureColor": o[1] ||= (e) => x.value = e,
|
|
2848
2839
|
"aria-label": "标注边框色",
|
|
@@ -2852,7 +2843,7 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2852
2843
|
"disable-alpha": !1,
|
|
2853
2844
|
"blur-close": !0
|
|
2854
2845
|
}, null, 8, ["pure-color"])]),
|
|
2855
|
-
a("label",
|
|
2846
|
+
a("label", Er, [o[10] ||= a("span", null, "文字色", -1), s(w(J), {
|
|
2856
2847
|
"pure-color": C.value,
|
|
2857
2848
|
"onUpdate:pureColor": o[2] ||= (e) => C.value = e,
|
|
2858
2849
|
"aria-label": "标注文字色",
|
|
@@ -2862,7 +2853,7 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2862
2853
|
"disable-alpha": !1,
|
|
2863
2854
|
"blur-close": !0
|
|
2864
2855
|
}, null, 8, ["pure-color"])]),
|
|
2865
|
-
a("label",
|
|
2856
|
+
a("label", Dr, [o[11] ||= a("span", null, "背景色", -1), s(w(J), {
|
|
2866
2857
|
"pure-color": D.value,
|
|
2867
2858
|
"onUpdate:pureColor": o[3] ||= (e) => D.value = e,
|
|
2868
2859
|
"aria-label": "标注背景色",
|
|
@@ -2877,13 +2868,13 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2877
2868
|
_: 1
|
|
2878
2869
|
}, 8, ["ok-button-props"]));
|
|
2879
2870
|
}
|
|
2880
|
-
}), [["__scopeId", "data-v-42466cf9"]]),
|
|
2871
|
+
}), [["__scopeId", "data-v-42466cf9"]]), kr = { class: "waveform-tooltip__series-content" }, Ar = { class: "waveform-tooltip__series-label" }, jr = {
|
|
2881
2872
|
key: 0,
|
|
2882
2873
|
class: "waveform-tooltip__value"
|
|
2883
|
-
},
|
|
2874
|
+
}, Mr = {
|
|
2884
2875
|
key: 1,
|
|
2885
2876
|
class: "waveform-tooltip__value waveform-tooltip__value--missing"
|
|
2886
|
-
},
|
|
2877
|
+
}, Nr = 12, Pr = 8, Fr = 238, Ir = 560, Lr = 20, Rr = 20, zr = /*#__PURE__*/ Fe(/* @__PURE__ */ c({
|
|
2887
2878
|
__name: "WaveformTooltip",
|
|
2888
2879
|
props: {
|
|
2889
2880
|
visible: { type: Boolean },
|
|
@@ -2897,26 +2888,26 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2897
2888
|
setup(n) {
|
|
2898
2889
|
let s = n;
|
|
2899
2890
|
function c(e, t) {
|
|
2900
|
-
let n = Math.max(1, t -
|
|
2891
|
+
let n = Math.max(1, t - Lr - 14), r = Math.max(1, Math.floor(n / 7.2));
|
|
2901
2892
|
return Math.max(1, Math.ceil([...e].length / r));
|
|
2902
2893
|
}
|
|
2903
2894
|
function l(e) {
|
|
2904
|
-
let t = e.point ? `(x:${
|
|
2895
|
+
let t = e.point ? `(x:${pt(e.point.x, s.timeUnit)} y:${st(e.point.y)})` : "无数据";
|
|
2905
2896
|
return `${e.shotNo?.trim() || "未配置炮号"}: ${e.name}${e.unit ? `(${e.unit})` : ""} ${t}`;
|
|
2906
2897
|
}
|
|
2907
2898
|
function u(e) {
|
|
2908
|
-
return 16 +
|
|
2899
|
+
return 16 + Rr * s.seriesPoints.reduce((t, n) => t + c(l(n), e), 0) + 5;
|
|
2909
2900
|
}
|
|
2910
2901
|
let d = t(() => {
|
|
2911
2902
|
if (!s.visible || !s.hoveredPoint) return { display: "none" };
|
|
2912
|
-
let e = s.position.x +
|
|
2903
|
+
let e = s.position.x + Nr, t = s.position.x - Nr - Fr, n = s.containerWidth - Pr - e, r = s.position.x - Nr - Pr, i = Math.max(1, Math.min(Ir, s.containerWidth - Pr * 2)), a = e + Fr <= s.containerWidth - Pr ? {
|
|
2913
2904
|
left: `${e}px`,
|
|
2914
|
-
maxWidth: `${Math.min(
|
|
2915
|
-
} : t >=
|
|
2916
|
-
right: `${s.containerWidth - s.position.x +
|
|
2917
|
-
maxWidth: `${Math.min(
|
|
2905
|
+
maxWidth: `${Math.min(Ir, n)}px`
|
|
2906
|
+
} : t >= Pr ? {
|
|
2907
|
+
right: `${s.containerWidth - s.position.x + Nr}px`,
|
|
2908
|
+
maxWidth: `${Math.min(Ir, r)}px`
|
|
2918
2909
|
} : {
|
|
2919
|
-
left: `${
|
|
2910
|
+
left: `${Pr}px`,
|
|
2920
2911
|
maxWidth: `${i}px`
|
|
2921
2912
|
}, o = Number.parseFloat(a.maxWidth);
|
|
2922
2913
|
return {
|
|
@@ -2931,9 +2922,9 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2931
2922
|
}, [(g(!0), i(e, null, y(n.seriesPoints, (t) => (g(), i("span", {
|
|
2932
2923
|
key: `${t.trackIndex}-${t.name}`,
|
|
2933
2924
|
class: "waveform-tooltip__series waveform-chart__tooltip-series"
|
|
2934
|
-
}, [a("i", { style: p({ backgroundColor: t.color }) }, null, 4), a("span",
|
|
2925
|
+
}, [a("i", { style: p({ backgroundColor: t.color }) }, null, 4), a("span", kr, [a("span", Ar, [o(S(t.shotNo?.trim() || "未配置炮号") + ": " + S(t.name), 1), t.unit ? (g(), i(e, { key: 0 }, [o("(" + S(t.unit) + ")", 1)], 64)) : r("", !0)]), t.point ? (g(), i("span", jr, "(x:" + S(w(pt)(t.point.x, n.timeUnit)) + " y:" + S(w(st)(t.point.y)) + ")", 1)) : (g(), i("span", Mr, "无数据"))])]))), 128))], 4)) : r("", !0);
|
|
2935
2926
|
}
|
|
2936
|
-
}), [["__scopeId", "data-v-b9ed144d"]]),
|
|
2927
|
+
}), [["__scopeId", "data-v-b9ed144d"]]), Br = /* @__PURE__ */ c({
|
|
2937
2928
|
__name: "WaveformHoverHost",
|
|
2938
2929
|
props: {
|
|
2939
2930
|
state: {},
|
|
@@ -2944,7 +2935,7 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2944
2935
|
},
|
|
2945
2936
|
setup(e) {
|
|
2946
2937
|
let r = e, i = t(() => r.state.points.find((e) => e.point)?.point ?? null);
|
|
2947
|
-
return (t, r) => (g(), n(
|
|
2938
|
+
return (t, r) => (g(), n(zr, {
|
|
2948
2939
|
visible: e.visible && i.value !== null,
|
|
2949
2940
|
position: e.state.position,
|
|
2950
2941
|
"time-unit": e.timeUnit,
|
|
@@ -2962,16 +2953,16 @@ var lr = ["id"], ur = { class: "waveform-annotation-editor__content" }, dr = {
|
|
|
2962
2953
|
"container-height"
|
|
2963
2954
|
]));
|
|
2964
2955
|
}
|
|
2965
|
-
}),
|
|
2956
|
+
}), Vr = 13, Hr = 2, Ur = 14, Wr = 8, Gr = 24, Kr = {
|
|
2966
2957
|
circle: ee,
|
|
2967
2958
|
square: ne,
|
|
2968
2959
|
triangle: re,
|
|
2969
2960
|
diamond: te
|
|
2970
2961
|
};
|
|
2971
|
-
function
|
|
2972
|
-
return e === "none" ? null : U().type(
|
|
2962
|
+
function qr(e, t = 48) {
|
|
2963
|
+
return e === "none" ? null : U().type(Kr[e]).size(t)() ?? null;
|
|
2973
2964
|
}
|
|
2974
|
-
function
|
|
2965
|
+
function Jr(e, t, n = 48) {
|
|
2975
2966
|
if (e === "none" || t.length === 0) return null;
|
|
2976
2967
|
if (e === "circle") {
|
|
2977
2968
|
let e = Math.sqrt(n / Math.PI);
|
|
@@ -2988,24 +2979,24 @@ function qr(e, t, n = 48) {
|
|
|
2988
2979
|
let r = Math.sqrt(n / (2 * Math.tan(Math.PI / 6))), i = r * Math.tan(Math.PI / 6);
|
|
2989
2980
|
return t.map(({ x: e, y: t }) => `M${e},${t - r}L${e + i},${t}L${e},${t + r}L${e - i},${t}Z`).join("");
|
|
2990
2981
|
}
|
|
2991
|
-
function
|
|
2982
|
+
function Yr(e) {
|
|
2992
2983
|
return e === "none" ? null : "M1 8H25";
|
|
2993
2984
|
}
|
|
2994
|
-
function
|
|
2985
|
+
function Xr(e) {
|
|
2995
2986
|
if (e === "dashed") return "8 5";
|
|
2996
2987
|
if (e === "dash-dot") return "8 5 1.5 5";
|
|
2997
2988
|
}
|
|
2998
|
-
function
|
|
2999
|
-
let t = (Number.isFinite(e) && e > 0 ? Math.min(e,
|
|
2989
|
+
function Zr(e) {
|
|
2990
|
+
let t = (Number.isFinite(e) && e > 0 ? Math.min(e, Gr) : Wr) / 2, n = Vr - t, r = Vr + t;
|
|
3000
2991
|
return [
|
|
3001
|
-
`M${n} ${
|
|
3002
|
-
`M${
|
|
3003
|
-
`M${n} ${
|
|
2992
|
+
`M${n} ${Hr}H${r}`,
|
|
2993
|
+
`M${Vr} ${Hr}V${Ur}`,
|
|
2994
|
+
`M${n} ${Ur}H${r}`
|
|
3004
2995
|
].join("");
|
|
3005
2996
|
}
|
|
3006
2997
|
//#endregion
|
|
3007
2998
|
//#region src/components/rendering/WaveformSeriesLayer.vue?vue&type=script&setup=true&lang.ts
|
|
3008
|
-
var
|
|
2999
|
+
var Qr = ["clip-path"], $r = ["data-series-id", "data-series-name"], ei = [
|
|
3009
3000
|
"data-series-id",
|
|
3010
3001
|
"data-series-name",
|
|
3011
3002
|
"data-y-axis-index",
|
|
@@ -3014,11 +3005,11 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3014
3005
|
"d",
|
|
3015
3006
|
"stroke",
|
|
3016
3007
|
"stroke-dasharray"
|
|
3017
|
-
],
|
|
3008
|
+
], ti = ["data-series-id"], ni = [
|
|
3018
3009
|
"d",
|
|
3019
3010
|
"stroke",
|
|
3020
3011
|
"stroke-width"
|
|
3021
|
-
],
|
|
3012
|
+
], ri = ["data-series-id", "data-point-type"], ii = ["d", "fill"], ai = /*#__PURE__*/ Fe(/* @__PURE__ */ c({
|
|
3022
3013
|
__name: "WaveformSeriesLayer",
|
|
3023
3014
|
props: {
|
|
3024
3015
|
track: {},
|
|
@@ -3026,11 +3017,11 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3026
3017
|
},
|
|
3027
3018
|
setup(n) {
|
|
3028
3019
|
let a = n, o = t(() => a.track.seriesPaths.map((e) => {
|
|
3029
|
-
let t =
|
|
3020
|
+
let t = Jr(e.series.pointType, e.pointRenderPoints.map((t) => ({
|
|
3030
3021
|
x: a.track.xScale(t.x),
|
|
3031
3022
|
y: e.yScale(t.y)
|
|
3032
3023
|
}))), n = e.series.errorBar.capWidth / 2, r = e.errorBarRenderPoints.map((t) => {
|
|
3033
|
-
let { lower: r, upper: i } =
|
|
3024
|
+
let { lower: r, upper: i } = Pt(t), o = a.track.xScale(t.x), s = e.yScale(t.y - r), c = e.yScale(t.y + i);
|
|
3034
3025
|
return [
|
|
3035
3026
|
`M${o - n},${s}H${o + n}`,
|
|
3036
3027
|
`M${o},${s}V${c}`,
|
|
@@ -3063,8 +3054,8 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3063
3054
|
"data-line-style": e.series.lineStyle,
|
|
3064
3055
|
d: e.path,
|
|
3065
3056
|
stroke: e.series.color,
|
|
3066
|
-
"stroke-dasharray": w(
|
|
3067
|
-
}, null, 8,
|
|
3057
|
+
"stroke-dasharray": w(Xr)(e.series.lineStyle)
|
|
3058
|
+
}, null, 8, ei)) : r("", !0),
|
|
3068
3059
|
e.series.errorBar.visible ? (g(), i("g", {
|
|
3069
3060
|
key: 1,
|
|
3070
3061
|
class: "waveform-track__error-bars waveform-chart__error-bars",
|
|
@@ -3075,7 +3066,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3075
3066
|
d: e.errorBarPath,
|
|
3076
3067
|
stroke: e.series.errorBar.color || e.series.color,
|
|
3077
3068
|
"stroke-width": e.series.errorBar.width
|
|
3078
|
-
}, null, 8,
|
|
3069
|
+
}, null, 8, ni)) : r("", !0)], 8, ti)) : r("", !0),
|
|
3079
3070
|
e.series.pointType === "none" ? r("", !0) : (g(), i("g", {
|
|
3080
3071
|
key: 2,
|
|
3081
3072
|
class: "waveform-track__points waveform-chart__points",
|
|
@@ -3086,28 +3077,28 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3086
3077
|
class: "waveform-track__point waveform-chart__point",
|
|
3087
3078
|
d: e.pointPath,
|
|
3088
3079
|
fill: e.series.color
|
|
3089
|
-
}, null, 8,
|
|
3090
|
-
], 8,
|
|
3080
|
+
}, null, 8, ii)) : r("", !0)], 8, ri))
|
|
3081
|
+
], 8, $r))), 128))], 8, Qr)) : r("", !0);
|
|
3091
3082
|
}
|
|
3092
|
-
}), [["__scopeId", "data-v-42a3fd47"]]),
|
|
3083
|
+
}), [["__scopeId", "data-v-42a3fd47"]]), oi = ["transform"], si = ["transform"], ci = {
|
|
3093
3084
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--start waveform-chart__axis-endpoint waveform-chart__axis-endpoint--start",
|
|
3094
3085
|
x: "0",
|
|
3095
3086
|
y: "7",
|
|
3096
3087
|
dy: "0.71em",
|
|
3097
3088
|
"text-anchor": "start"
|
|
3098
|
-
},
|
|
3089
|
+
}, li = ["x"], ui = [
|
|
3099
3090
|
"data-y-axis-index",
|
|
3100
3091
|
"data-y-axis-side",
|
|
3101
3092
|
"transform"
|
|
3102
|
-
],
|
|
3093
|
+
], di = { key: 2 }, fi = [
|
|
3103
3094
|
"x",
|
|
3104
3095
|
"y",
|
|
3105
3096
|
"width"
|
|
3106
|
-
],
|
|
3097
|
+
], pi = ["fill", "transform"], mi = ["data-y-axis-title-index"], hi = [
|
|
3107
3098
|
"x",
|
|
3108
3099
|
"y",
|
|
3109
3100
|
"width"
|
|
3110
|
-
],
|
|
3101
|
+
], gi = ["fill", "transform"], _i = /* @__PURE__ */ c({
|
|
3111
3102
|
__name: "WaveformTrackAxes",
|
|
3112
3103
|
props: {
|
|
3113
3104
|
track: {},
|
|
@@ -3136,7 +3127,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3136
3127
|
if (n.track.yAxes.forEach((e, t) => {
|
|
3137
3128
|
let r = s.value[t];
|
|
3138
3129
|
if (!r) return;
|
|
3139
|
-
let [i, a] = e.scale.domain(), o = Math.max(...e.tickValues), c = e.seriesList[0]?.unit, l = (e.side === "left" ? M(e.scale) : N(e.scale)).tickFormat((e) =>
|
|
3130
|
+
let [i, a] = e.scale.domain(), o = Math.max(...e.tickValues), c = e.seriesList[0]?.unit, l = (e.side === "left" ? M(e.scale) : N(e.scale)).tickFormat((e) => ot(Number(e), {
|
|
3140
3131
|
axisMin: i,
|
|
3141
3132
|
axisMax: a,
|
|
3142
3133
|
topTickValue: o,
|
|
@@ -3145,7 +3136,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3145
3136
|
u.call(l), u.selectAll("path.domain").attr("display", n.axes?.y?.lineVisible === !1 ? "none" : null);
|
|
3146
3137
|
}), !o.value) return;
|
|
3147
3138
|
let e = H(o.value);
|
|
3148
|
-
e.call(j(n.track.xScale).tickValues(n.track.xAxisTickValues).tickFormat((e) =>
|
|
3139
|
+
e.call(j(n.track.xScale).tickValues(n.track.xAxisTickValues).tickFormat((e) => ut(Number(e), n.track.xScale.domain(), n.timeUnit, "tick", n.axes?.x?.labelFormatter)).tickSize(-4).tickPadding(7).tickSizeOuter(0)), e.selectAll("path.domain").attr("display", n.axes?.x?.lineVisible === !1 ? "none" : null);
|
|
3149
3140
|
}
|
|
3150
3141
|
return h(async () => {
|
|
3151
3142
|
await d(), m();
|
|
@@ -3167,7 +3158,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3167
3158
|
ref: o,
|
|
3168
3159
|
class: f(["waveform-track__axis waveform-track__axis--x waveform-chart__axis waveform-chart__axis--x", { "waveform-track__axis--line-hidden": t.axes?.x?.lineVisible === !1 }]),
|
|
3169
3160
|
transform: `translate(0, ${t.track.height})`
|
|
3170
|
-
}, null, 10,
|
|
3161
|
+
}, null, 10, oi)) : r("", !0),
|
|
3171
3162
|
t.track.showXAxis ? (g(), i("g", {
|
|
3172
3163
|
key: 1,
|
|
3173
3164
|
class: "waveform-track__axis-endpoints waveform-chart__axis-endpoints",
|
|
@@ -3175,13 +3166,13 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3175
3166
|
"font-family": "sans-serif",
|
|
3176
3167
|
"font-size": "10",
|
|
3177
3168
|
"aria-hidden": "true"
|
|
3178
|
-
}, [a("text",
|
|
3169
|
+
}, [a("text", ci, S(t.track.endpointLabels.start), 1), a("text", {
|
|
3179
3170
|
class: "waveform-track__axis-endpoint waveform-track__axis-endpoint--end waveform-chart__axis-endpoint waveform-chart__axis-endpoint--end",
|
|
3180
3171
|
x: t.track.width ?? t.innerWidth,
|
|
3181
3172
|
y: "7",
|
|
3182
3173
|
dy: "0.71em",
|
|
3183
3174
|
"text-anchor": "end"
|
|
3184
|
-
}, S(t.track.endpointLabels.end), 9,
|
|
3175
|
+
}, S(t.track.endpointLabels.end), 9, li)], 8, si)) : r("", !0),
|
|
3185
3176
|
(g(!0), i(e, null, y(t.track.isEmpty ? [] : t.track.yAxes, (e) => (g(), i("g", {
|
|
3186
3177
|
key: `y-axis-${t.track.index}-${e.index}`,
|
|
3187
3178
|
ref_for: !0,
|
|
@@ -3190,21 +3181,21 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3190
3181
|
"data-y-axis-index": e.index,
|
|
3191
3182
|
"data-y-axis-side": e.side,
|
|
3192
3183
|
transform: `translate(${e.x}, 0)`
|
|
3193
|
-
}, null, 10,
|
|
3194
|
-
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g",
|
|
3184
|
+
}, null, 10, ui))), 128)),
|
|
3185
|
+
!t.cleanView && !t.track.isEmpty && t.track.hasVisibleSeries && t.track.seriesList.length === 1 && t.track.showYAxisLabel && t.track.series && c(t.track.series) && p(t.track.height, t.track.index) ? (g(), i("g", di, [a("rect", {
|
|
3195
3186
|
class: "waveform-track__y-axis-label-bg waveform-chart__y-axis-label-bg",
|
|
3196
3187
|
x: t.track.yAxisLabelX - w(12) / 2,
|
|
3197
3188
|
y: t.track.height / 2 - 40,
|
|
3198
3189
|
width: w(12),
|
|
3199
3190
|
height: "80",
|
|
3200
3191
|
rx: "2"
|
|
3201
|
-
}, null, 8,
|
|
3192
|
+
}, null, 8, fi), a("text", {
|
|
3202
3193
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3203
|
-
fill: t.track.series
|
|
3194
|
+
fill: t.track.series?.color,
|
|
3204
3195
|
transform: `translate(${t.track.yAxisLabelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3205
3196
|
"text-anchor": "middle",
|
|
3206
3197
|
"dominant-baseline": "central"
|
|
3207
|
-
}, S(c(t.track.series)), 9,
|
|
3198
|
+
}, S(t.track.series ? c(t.track.series) : ""), 9, pi)])) : r("", !0),
|
|
3208
3199
|
(g(!0), i(e, null, y(!t.cleanView && t.track.yAxes.length > 1 ? t.track.yAxes.filter(l) : [], (e) => (g(), i("g", {
|
|
3209
3200
|
key: `y-axis-title-${t.track.index}-${e.index}`,
|
|
3210
3201
|
class: "waveform-track__multi-axis-title",
|
|
@@ -3216,40 +3207,40 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3216
3207
|
width: w(12),
|
|
3217
3208
|
height: "80",
|
|
3218
3209
|
rx: "2"
|
|
3219
|
-
}, null, 8,
|
|
3210
|
+
}, null, 8, hi), a("text", {
|
|
3220
3211
|
class: "waveform-track__y-axis-label waveform-chart__y-axis-label",
|
|
3221
3212
|
fill: e.seriesList[0].color,
|
|
3222
3213
|
transform: `translate(${e.labelX}, ${t.track.height / 2}) rotate(-90)`,
|
|
3223
3214
|
"text-anchor": "middle",
|
|
3224
3215
|
"dominant-baseline": "central"
|
|
3225
|
-
}, S(c(e.seriesList[0])), 9,
|
|
3216
|
+
}, S(c(e.seriesList[0])), 9, gi)], 8, mi))), 128))
|
|
3226
3217
|
], 64));
|
|
3227
3218
|
}
|
|
3228
|
-
}),
|
|
3219
|
+
}), vi = [
|
|
3229
3220
|
"width",
|
|
3230
3221
|
"height",
|
|
3231
3222
|
"fill"
|
|
3232
|
-
],
|
|
3223
|
+
], yi = ["clip-path"], bi = { class: "waveform-track__grid waveform-track__grid--minor waveform-chart__grid waveform-chart__grid--minor" }, xi = [
|
|
3233
3224
|
"stroke",
|
|
3234
3225
|
"x1",
|
|
3235
3226
|
"x2",
|
|
3236
3227
|
"y2"
|
|
3237
|
-
],
|
|
3228
|
+
], Si = [
|
|
3238
3229
|
"stroke",
|
|
3239
3230
|
"x2",
|
|
3240
3231
|
"y1",
|
|
3241
3232
|
"y2"
|
|
3242
|
-
],
|
|
3233
|
+
], Ci = { class: "waveform-track__grid waveform-track__grid--major waveform-chart__grid waveform-chart__grid--major" }, wi = [
|
|
3243
3234
|
"stroke",
|
|
3244
3235
|
"x1",
|
|
3245
3236
|
"x2",
|
|
3246
3237
|
"y2"
|
|
3247
|
-
],
|
|
3238
|
+
], Ti = [
|
|
3248
3239
|
"stroke",
|
|
3249
3240
|
"x2",
|
|
3250
3241
|
"y1",
|
|
3251
3242
|
"y2"
|
|
3252
|
-
],
|
|
3243
|
+
], Ei = ["clip-path"], Di = [
|
|
3253
3244
|
"data-y-axis-index",
|
|
3254
3245
|
"x2",
|
|
3255
3246
|
"y1",
|
|
@@ -3257,7 +3248,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3257
3248
|
"stroke",
|
|
3258
3249
|
"stroke-width",
|
|
3259
3250
|
"stroke-dasharray"
|
|
3260
|
-
],
|
|
3251
|
+
], Oi = ["x", "y"], ki = /* @__PURE__ */ c({
|
|
3261
3252
|
__name: "WaveformTrackBackdrop",
|
|
3262
3253
|
props: {
|
|
3263
3254
|
track: {},
|
|
@@ -3282,12 +3273,12 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3282
3273
|
height: t.track.height,
|
|
3283
3274
|
fill: t.frameStyle.backgroundColor,
|
|
3284
3275
|
"aria-hidden": "true"
|
|
3285
|
-
}, null, 8,
|
|
3276
|
+
}, null, 8, vi)) : r("", !0),
|
|
3286
3277
|
!t.track.isEmpty && t.track.hasVisibleSeries && !t.cleanView ? (g(), i("g", {
|
|
3287
3278
|
key: 1,
|
|
3288
3279
|
"clip-path": `url(#${t.clipPathId}-${t.track.index})`,
|
|
3289
3280
|
"aria-hidden": "true"
|
|
3290
|
-
}, [a("g",
|
|
3281
|
+
}, [a("g", bi, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMinorTicks, (e) => (g(), i("line", {
|
|
3291
3282
|
key: `x-minor-${t.track.index}-${e}`,
|
|
3292
3283
|
"data-grid-direction": "vertical",
|
|
3293
3284
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3295,7 +3286,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3295
3286
|
x2: t.track.xScale(e),
|
|
3296
3287
|
y1: "0",
|
|
3297
3288
|
y2: t.track.height
|
|
3298
|
-
}, null, 8,
|
|
3289
|
+
}, null, 8, xi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMinorTicks, (e) => (g(), i("line", {
|
|
3299
3290
|
key: `y-minor-${t.track.index}-${e}`,
|
|
3300
3291
|
"data-grid-direction": "horizontal",
|
|
3301
3292
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3303,7 +3294,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3303
3294
|
x2: t.track.width ?? t.innerWidth,
|
|
3304
3295
|
y1: t.track.yScale(e),
|
|
3305
3296
|
y2: t.track.yScale(e)
|
|
3306
|
-
}, null, 8,
|
|
3297
|
+
}, null, 8, Si))), 128)) : r("", !0)]), a("g", Ci, [t.track.gridLines.vertical ? (g(!0), i(e, { key: 0 }, y(t.track.xMajorTicks, (e) => (g(), i("line", {
|
|
3307
3298
|
key: `x-major-${t.track.index}-${e}`,
|
|
3308
3299
|
"data-grid-direction": "vertical",
|
|
3309
3300
|
stroke: t.track.gridLines.verticalColor,
|
|
@@ -3311,7 +3302,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3311
3302
|
x2: t.track.xScale(e),
|
|
3312
3303
|
y1: "0",
|
|
3313
3304
|
y2: t.track.height
|
|
3314
|
-
}, null, 8,
|
|
3305
|
+
}, null, 8, wi))), 128)) : r("", !0), t.track.gridLines.horizontal ? (g(!0), i(e, { key: 1 }, y(t.track.yMajorTicks, (e) => (g(), i("line", {
|
|
3315
3306
|
key: `y-major-${t.track.index}-${e}`,
|
|
3316
3307
|
"data-grid-direction": "horizontal",
|
|
3317
3308
|
stroke: t.track.gridLines.horizontalColor,
|
|
@@ -3319,7 +3310,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3319
3310
|
x2: t.track.width ?? t.innerWidth,
|
|
3320
3311
|
y1: t.track.yScale(e),
|
|
3321
3312
|
y2: t.track.yScale(e)
|
|
3322
|
-
}, null, 8,
|
|
3313
|
+
}, null, 8, Ti))), 128)) : r("", !0)])], 8, yi)) : r("", !0),
|
|
3323
3314
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.zeroLine.visible && !t.cleanView ? (g(), i("g", {
|
|
3324
3315
|
key: 2,
|
|
3325
3316
|
class: "waveform-track__zero-lines waveform-chart__zero-lines",
|
|
@@ -3336,7 +3327,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3336
3327
|
stroke: t.zeroLine.color,
|
|
3337
3328
|
"stroke-width": t.zeroLine.width,
|
|
3338
3329
|
"stroke-dasharray": t.zeroLine.dash || void 0
|
|
3339
|
-
}, null, 8,
|
|
3330
|
+
}, null, 8, Di))], 64))), 128))], 8, Ei)) : r("", !0),
|
|
3340
3331
|
!t.track.isEmpty && t.track.hasVisibleSeries && t.frameNumber !== void 0 && !t.cleanView ? (g(), i("text", {
|
|
3341
3332
|
key: 3,
|
|
3342
3333
|
class: "waveform-track__watermark waveform-chart__watermark",
|
|
@@ -3346,11 +3337,12 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3346
3337
|
"text-anchor": "middle",
|
|
3347
3338
|
"dominant-baseline": "central",
|
|
3348
3339
|
"aria-hidden": "true"
|
|
3349
|
-
}, S(t.frameNumber), 13,
|
|
3340
|
+
}, S(t.frameNumber), 13, Oi)) : r("", !0)
|
|
3350
3341
|
], 64));
|
|
3351
3342
|
}
|
|
3352
|
-
}),
|
|
3343
|
+
}), Ai = [
|
|
3353
3344
|
"data-track-index",
|
|
3345
|
+
"data-track-id",
|
|
3354
3346
|
"data-track-empty",
|
|
3355
3347
|
"data-track-left",
|
|
3356
3348
|
"data-track-width",
|
|
@@ -3358,19 +3350,19 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3358
3350
|
"data-track-top",
|
|
3359
3351
|
"data-track-height",
|
|
3360
3352
|
"transform"
|
|
3361
|
-
],
|
|
3353
|
+
], ji = [
|
|
3362
3354
|
"width",
|
|
3363
3355
|
"height",
|
|
3364
3356
|
"stroke",
|
|
3365
3357
|
"stroke-width",
|
|
3366
3358
|
"stroke-dasharray",
|
|
3367
3359
|
"stroke-linecap"
|
|
3368
|
-
],
|
|
3360
|
+
], Mi = [
|
|
3369
3361
|
"data-interactive",
|
|
3370
3362
|
"data-independent-overlay-index",
|
|
3371
3363
|
"width",
|
|
3372
3364
|
"height"
|
|
3373
|
-
],
|
|
3365
|
+
], Ni = ["x", "y"], Pi = /* @__PURE__ */ c({
|
|
3374
3366
|
__name: "WaveformTrack",
|
|
3375
3367
|
props: {
|
|
3376
3368
|
track: {},
|
|
@@ -3421,6 +3413,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3421
3413
|
return (t, n) => (g(), i("g", {
|
|
3422
3414
|
class: f(["waveform-track waveform-chart__track", { "waveform-track--empty waveform-chart__track--empty": e.track.isEmpty }]),
|
|
3423
3415
|
"data-track-index": e.track.index,
|
|
3416
|
+
"data-track-id": e.track.id,
|
|
3424
3417
|
"data-track-empty": e.track.isEmpty || void 0,
|
|
3425
3418
|
"data-track-left": e.track.left,
|
|
3426
3419
|
"data-track-width": e.track.width,
|
|
@@ -3429,7 +3422,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3429
3422
|
"data-track-height": e.track.height,
|
|
3430
3423
|
transform: `translate(${e.track.left ?? 0}, ${e.track.top})`
|
|
3431
3424
|
}, [
|
|
3432
|
-
s(
|
|
3425
|
+
s(ki, {
|
|
3433
3426
|
track: e.track,
|
|
3434
3427
|
"clip-path-id": e.clipPathId,
|
|
3435
3428
|
"inner-width": e.innerWidth,
|
|
@@ -3446,7 +3439,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3446
3439
|
"frame-style",
|
|
3447
3440
|
"zero-line"
|
|
3448
3441
|
]),
|
|
3449
|
-
s(
|
|
3442
|
+
s(_i, {
|
|
3450
3443
|
track: e.track,
|
|
3451
3444
|
"inner-width": e.innerWidth,
|
|
3452
3445
|
"clean-view": e.cleanView,
|
|
@@ -3472,8 +3465,8 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3472
3465
|
"stroke-dasharray": c.value.borderStyle === "dashed" ? "6 4" : c.value.borderStyle === "dotted" ? "1 3" : void 0,
|
|
3473
3466
|
"stroke-linecap": c.value.borderStyle === "dotted" ? "round" : void 0,
|
|
3474
3467
|
"aria-hidden": "true"
|
|
3475
|
-
}, null, 8,
|
|
3476
|
-
s(
|
|
3468
|
+
}, null, 8, ji)),
|
|
3469
|
+
s(ai, {
|
|
3477
3470
|
track: e.track,
|
|
3478
3471
|
"clip-path-id": e.clipPathId
|
|
3479
3472
|
}, null, 8, ["track", "clip-path-id"]),
|
|
@@ -3495,7 +3488,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3495
3488
|
onPointerleave: n[4] ||= (e) => o("pointer-leave"),
|
|
3496
3489
|
onClick: n[5] ||= (e) => o("click", e),
|
|
3497
3490
|
onContextmenu: n[6] ||= (e) => o("contextmenu", e)
|
|
3498
|
-
}, null, 42,
|
|
3491
|
+
}, null, 42, Mi)) : r("", !0),
|
|
3499
3492
|
!e.track.isEmpty && !e.track.hasVisibleSeries && !e.cleanView ? (g(), i("text", {
|
|
3500
3493
|
key: 2,
|
|
3501
3494
|
class: "waveform-track__no-visible-series",
|
|
@@ -3503,33 +3496,33 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3503
3496
|
y: e.track.height / 2,
|
|
3504
3497
|
"text-anchor": "middle",
|
|
3505
3498
|
"dominant-baseline": "central"
|
|
3506
|
-
}, " 暂无可见曲线 ", 8,
|
|
3507
|
-
], 10,
|
|
3499
|
+
}, " 暂无可见曲线 ", 8, Ni)) : r("", !0)
|
|
3500
|
+
], 10, Ai));
|
|
3508
3501
|
}
|
|
3509
|
-
}),
|
|
3502
|
+
}), Fi = [
|
|
3510
3503
|
"width",
|
|
3511
3504
|
"height",
|
|
3512
3505
|
"data-position",
|
|
3513
3506
|
"data-orientation"
|
|
3514
|
-
],
|
|
3507
|
+
], Ii = [
|
|
3515
3508
|
"disabled",
|
|
3516
3509
|
"aria-pressed",
|
|
3517
3510
|
"aria-label",
|
|
3518
3511
|
"onClick"
|
|
3519
|
-
],
|
|
3512
|
+
], Li = [
|
|
3520
3513
|
"data-line-type",
|
|
3521
3514
|
"data-line-style",
|
|
3522
3515
|
"data-point-type",
|
|
3523
3516
|
"data-error-bar-visible"
|
|
3524
|
-
],
|
|
3517
|
+
], Ri = [
|
|
3525
3518
|
"d",
|
|
3526
3519
|
"stroke",
|
|
3527
3520
|
"stroke-dasharray"
|
|
3528
|
-
],
|
|
3521
|
+
], zi = [
|
|
3529
3522
|
"d",
|
|
3530
3523
|
"stroke",
|
|
3531
3524
|
"stroke-width"
|
|
3532
|
-
],
|
|
3525
|
+
], Bi = ["d", "fill"], Vi = ["title"], Hi = /*#__PURE__*/ Fe(/* @__PURE__ */ c({
|
|
3533
3526
|
__name: "WaveformLegend",
|
|
3534
3527
|
props: {
|
|
3535
3528
|
series: {},
|
|
@@ -3587,45 +3580,45 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3587
3580
|
"data-point-type": e.pointType,
|
|
3588
3581
|
"data-error-bar-visible": e.errorBar.visible || void 0
|
|
3589
3582
|
}, [
|
|
3590
|
-
w(
|
|
3583
|
+
w(Yr)(e.lineType) ? (g(), i("path", {
|
|
3591
3584
|
key: 0,
|
|
3592
3585
|
class: "waveform-legend__line",
|
|
3593
|
-
d: w(
|
|
3586
|
+
d: w(Yr)(e.lineType) ?? void 0,
|
|
3594
3587
|
stroke: e.color,
|
|
3595
|
-
"stroke-dasharray": w(
|
|
3588
|
+
"stroke-dasharray": w(Xr)(e.lineStyle),
|
|
3596
3589
|
"stroke-width": "1.5",
|
|
3597
3590
|
fill: "none"
|
|
3598
|
-
}, null, 8,
|
|
3591
|
+
}, null, 8, Ri)) : r("", !0),
|
|
3599
3592
|
e.errorBar.visible ? (g(), i("path", {
|
|
3600
3593
|
key: 1,
|
|
3601
3594
|
class: "waveform-legend__error-bar",
|
|
3602
|
-
d: w(
|
|
3595
|
+
d: w(Zr)(e.errorBar.capWidth),
|
|
3603
3596
|
stroke: e.errorBar.color || e.color,
|
|
3604
3597
|
"stroke-width": e.errorBar.width,
|
|
3605
3598
|
"stroke-linecap": "butt",
|
|
3606
3599
|
fill: "none"
|
|
3607
|
-
}, null, 8,
|
|
3600
|
+
}, null, 8, zi)) : r("", !0),
|
|
3608
3601
|
e.pointType === "none" ? r("", !0) : (g(), i("path", {
|
|
3609
3602
|
key: 2,
|
|
3610
3603
|
class: "waveform-legend__point",
|
|
3611
|
-
d: w(
|
|
3604
|
+
d: w(qr)(e.pointType, 30) ?? void 0,
|
|
3612
3605
|
fill: e.color,
|
|
3613
3606
|
transform: "translate(13 8)"
|
|
3614
|
-
}, null, 8,
|
|
3615
|
-
], 8,
|
|
3607
|
+
}, null, 8, Bi))
|
|
3608
|
+
], 8, Li)), a("span", {
|
|
3616
3609
|
class: "waveform-legend__label",
|
|
3617
3610
|
title: e.name
|
|
3618
|
-
}, S(e.name), 9,
|
|
3611
|
+
}, S(e.name), 9, Vi)], 10, Ii))), 128))], 6)], 2)], 8, Fi));
|
|
3619
3612
|
}
|
|
3620
|
-
}), [["__scopeId", "data-v-2ae12e71"]]),
|
|
3613
|
+
}), [["__scopeId", "data-v-2ae12e71"]]), Ui = {
|
|
3621
3614
|
class: "waveform-chart__hover-layer",
|
|
3622
3615
|
"pointer-events": "none",
|
|
3623
3616
|
"aria-hidden": "true"
|
|
3624
|
-
},
|
|
3617
|
+
}, Wi = ["clip-path", "transform"], Gi = [
|
|
3625
3618
|
"x1",
|
|
3626
3619
|
"x2",
|
|
3627
3620
|
"y2"
|
|
3628
|
-
],
|
|
3621
|
+
], Ki = /*#__PURE__*/ Fe(/* @__PURE__ */ c({
|
|
3629
3622
|
__name: "WaveformHoverLayer",
|
|
3630
3623
|
props: {
|
|
3631
3624
|
state: {},
|
|
@@ -3638,7 +3631,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3638
3631
|
track: e,
|
|
3639
3632
|
x: e.xScale(r.state.queryX)
|
|
3640
3633
|
}] : []));
|
|
3641
|
-
return (t, r) => (g(), i("g",
|
|
3634
|
+
return (t, r) => (g(), i("g", Ui, [(g(!0), i(e, null, y(o.value, (e) => (g(), i("g", {
|
|
3642
3635
|
key: e.track.index,
|
|
3643
3636
|
class: "waveform-track__crosshair waveform-chart__crosshair",
|
|
3644
3637
|
"clip-path": `url(#${n.clipPathId}-${e.track.index})`,
|
|
@@ -3648,9 +3641,9 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3648
3641
|
x2: e.x,
|
|
3649
3642
|
y1: "0",
|
|
3650
3643
|
y2: e.track.height
|
|
3651
|
-
}, null, 8,
|
|
3644
|
+
}, null, 8, Gi)], 8, Wi))), 128))]));
|
|
3652
3645
|
}
|
|
3653
|
-
}), [["__scopeId", "data-v-044318c2"]]),
|
|
3646
|
+
}), [["__scopeId", "data-v-044318c2"]]), qi = [
|
|
3654
3647
|
"data-display-mode",
|
|
3655
3648
|
"data-interaction-mode",
|
|
3656
3649
|
"data-presentation-mode",
|
|
@@ -3659,36 +3652,36 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3659
3652
|
"data-plot-margin-top",
|
|
3660
3653
|
"data-plot-margin-bottom",
|
|
3661
3654
|
"data-title-area-height"
|
|
3662
|
-
],
|
|
3655
|
+
], Ji = [
|
|
3663
3656
|
"role",
|
|
3664
3657
|
"aria-level",
|
|
3665
3658
|
"aria-hidden"
|
|
3666
|
-
],
|
|
3659
|
+
], Yi = ["data-title-scale", "data-title-wrapped"], Xi = [
|
|
3667
3660
|
"width",
|
|
3668
3661
|
"height",
|
|
3669
3662
|
"aria-label"
|
|
3670
|
-
],
|
|
3663
|
+
], Zi = ["id"], Qi = ["width", "height"], $i = ["transform"], ea = {
|
|
3671
3664
|
key: 0,
|
|
3672
3665
|
class: "waveform-chart__grid-slots",
|
|
3673
3666
|
"aria-hidden": "true"
|
|
3674
|
-
},
|
|
3667
|
+
}, ta = ["transform"], na = ["width", "height"], ra = ["width", "height"], ia = [
|
|
3675
3668
|
"x",
|
|
3676
3669
|
"y",
|
|
3677
3670
|
"width",
|
|
3678
3671
|
"height"
|
|
3679
|
-
],
|
|
3672
|
+
], aa = {
|
|
3680
3673
|
key: 4,
|
|
3681
3674
|
class: "waveform-chart__legend-layer"
|
|
3682
|
-
},
|
|
3675
|
+
}, oa = [
|
|
3683
3676
|
"data-legend-track-index",
|
|
3684
3677
|
"data-legend-track-id",
|
|
3685
3678
|
"transform"
|
|
3686
|
-
],
|
|
3679
|
+
], sa = ["x", "y"], ca = ["x", "y"], la = /* @__PURE__ */ c({
|
|
3687
3680
|
__name: "WaveformChartView",
|
|
3688
3681
|
props: { controller: {} },
|
|
3689
3682
|
setup(t) {
|
|
3690
|
-
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: ie, finishViewportDrag: W, cancelViewportDrag: G, handlePointerLeave: K, handleAnnotationClick: q, handleAnnotationContextMenu: J, resolveFrameNumber: oe, frameStyle: se, axes: ce, resolvedZeroLine: le, timeUnit: ue, yLabel: de, handleIndependentPointerMove: fe, beginViewportDrag: pe, hoverState: me, showTooltip: he, selectionBox: ge, renderedAnnotations: Y, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: ye, handleAnnotationMove: be, endAnnotationDrag: xe, resolveLegendPosition: X, resolveLegendOrientation: Z, legendBackgroundColor: Se, legendInteractive: Ce, resolvedHiddenSeriesIds: we, toggleSeriesVisibility: Te, resolvedXLabel: Ee, xAxisTitleY: De, hasChartArea: Oe, gridOptions: ke, pageCount: Ae, currentPage: je, getPageSize: Me, chartTracks: Ne, goToPage: Pe, annotationInteraction: Fe, editorDraft: Re, contextMenu: Q, editorSeries: ze, editorSeriesOptions: Be, timeError: Ve, confirmAnnotation: He, cancelAnnotation: Ue, changeDraftSeries: We, changeDraftTime: Ge, editContextAnnotation: Ke, deleteContextAnnotation: qe, chartHeight: Je, setContainer: Ye, setSvgElement:
|
|
3691
|
-
function
|
|
3683
|
+
let { displayMode: o, activeInteractionMode: c, isCleanView: l, isPresentationMode: u, selection: d, containerStyle: m, overlayMode: h, resolvedChartLeftMargin: _, titleAreaHeight: v, resolvedPlotMargin: b, pointerInsideChart: x, handleNativeContextMenu: T, titleAreaReserved: E, titleAreaStyle: D, titleVisible: O, titleMeasureStyle: k, resolvedTitleText: A, titleVisualStyle: j, titleTextStyle: M, titleLayout: N, chartWidth: P, drawingHeight: F, hasWaveformData: I, requestViewportReset: L, trackLayouts: R, clipPathId: z, chartTopMargin: B, gridCells: V, hasVisibleWaveformData: H, zoomable: U, isZoomMode: ee, innerWidth: te, innerHeight: ne, handleSharedPointerMove: re, beginSharedViewportDrag: ie, finishViewportDrag: W, cancelViewportDrag: G, handlePointerLeave: K, handleAnnotationClick: q, handleAnnotationContextMenu: J, resolveFrameNumber: oe, frameStyle: se, axes: ce, resolvedZeroLine: le, timeUnit: ue, yLabel: de, handleIndependentPointerMove: fe, beginViewportDrag: pe, hoverState: me, showTooltip: he, selectionBox: ge, renderedAnnotations: Y, annotationsVisible: _e, handleExistingAnnotationContextMenu: ve, beginAnnotationDrag: ye, handleAnnotationMove: be, endAnnotationDrag: xe, resolveLegendPosition: X, resolveLegendOrientation: Z, legendBackgroundColor: Se, legendInteractive: Ce, resolvedHiddenSeriesIds: we, toggleSeriesVisibility: Te, resolvedXLabel: Ee, xAxisTitleY: De, hasChartArea: Oe, gridOptions: ke, pageCount: Ae, currentPage: je, getPageSize: Me, chartTracks: Ne, goToPage: Pe, annotationInteraction: Fe, editorDraft: Re, contextMenu: Q, editorSeries: ze, editorSeriesOptions: Be, timeError: Ve, confirmAnnotation: He, cancelAnnotation: Ue, changeDraftSeries: We, changeDraftTime: Ge, editContextAnnotation: Ke, deleteContextAnnotation: qe, chartHeight: Je, setContainer: Ye, setSvgElement: $, setTitleMeasureElement: Xe, setSharedOverlayElement: Ze } = C(t.controller);
|
|
3684
|
+
function Qe() {
|
|
3692
3685
|
x.value = !1, K.value();
|
|
3693
3686
|
}
|
|
3694
3687
|
return (t, C) => (g(), i("div", {
|
|
@@ -3712,7 +3705,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3712
3705
|
"data-plot-margin-bottom": w(b).bottom,
|
|
3713
3706
|
"data-title-area-height": w(v),
|
|
3714
3707
|
onPointerenter: C[8] ||= (e) => x.value = !0,
|
|
3715
|
-
onPointerleave:
|
|
3708
|
+
onPointerleave: Qe,
|
|
3716
3709
|
onContextmenuCapture: C[9] ||= (...e) => w(T) && w(T)(...e)
|
|
3717
3710
|
}, [
|
|
3718
3711
|
w(E) ? (g(), i("div", {
|
|
@@ -3723,7 +3716,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3723
3716
|
"aria-level": w(O) ? 2 : void 0,
|
|
3724
3717
|
"aria-hidden": w(l) || void 0
|
|
3725
3718
|
}, [a("span", {
|
|
3726
|
-
ref: w(
|
|
3719
|
+
ref: w(Xe),
|
|
3727
3720
|
class: "waveform-chart__title-measure",
|
|
3728
3721
|
style: p(w(k)),
|
|
3729
3722
|
"aria-hidden": "true"
|
|
@@ -3736,9 +3729,9 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3736
3729
|
style: p(w(M)),
|
|
3737
3730
|
"data-title-scale": w(N).scale,
|
|
3738
3731
|
"data-title-wrapped": w(N).wrapped || void 0
|
|
3739
|
-
}, S(w(A)), 13,
|
|
3732
|
+
}, S(w(A)), 13, Yi)], 4)) : r("", !0)], 12, Ji)) : r("", !0),
|
|
3740
3733
|
(g(), i("svg", {
|
|
3741
|
-
ref: w(
|
|
3734
|
+
ref: w($),
|
|
3742
3735
|
class: "waveform-chart__svg",
|
|
3743
3736
|
width: w(P),
|
|
3744
3737
|
height: w(F),
|
|
@@ -3753,9 +3746,9 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3753
3746
|
}, [a("rect", {
|
|
3754
3747
|
width: e.width,
|
|
3755
3748
|
height: e.height
|
|
3756
|
-
}, null, 8,
|
|
3749
|
+
}, null, 8, Qi)], 8, Zi))), 128))]),
|
|
3757
3750
|
a("g", { transform: `translate(${w(_)}, ${w(B)})` }, [
|
|
3758
|
-
w(o) !== "compact" && !w(l) ? (g(), i("g",
|
|
3751
|
+
w(o) !== "compact" && !w(l) ? (g(), i("g", ea, [(g(!0), i(e, null, y(w(V), (e) => (g(), i("g", {
|
|
3759
3752
|
key: `grid-slot-${e.slotIndex}`,
|
|
3760
3753
|
transform: `translate(${e.left}, ${e.top})`
|
|
3761
3754
|
}, [e.series ? r("", !0) : (g(), i("rect", {
|
|
@@ -3763,10 +3756,10 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3763
3756
|
class: "waveform-chart__grid-slot-placeholder",
|
|
3764
3757
|
width: e.width,
|
|
3765
3758
|
height: e.cellHeight
|
|
3766
|
-
}, null, 8,
|
|
3759
|
+
}, null, 8, na))], 8, ta))), 128))])) : r("", !0),
|
|
3767
3760
|
w(o) !== "independent" && w(R).length && w(H) ? (g(), i("rect", {
|
|
3768
3761
|
key: 1,
|
|
3769
|
-
ref: w(
|
|
3762
|
+
ref: w(Ze),
|
|
3770
3763
|
class: f(["waveform-chart__overlay waveform-chart__overlay--shared", {
|
|
3771
3764
|
"is-zoomable": !w(u) && w(U) && w(ee),
|
|
3772
3765
|
"is-annotating": !w(u) && w(c) === "annotation"
|
|
@@ -3780,9 +3773,9 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3780
3773
|
onPointerleave: C[4] ||= (...e) => w(K) && w(K)(...e),
|
|
3781
3774
|
onClick: C[5] ||= (...e) => w(q) && w(q)(...e),
|
|
3782
3775
|
onContextmenu: C[6] ||= (...e) => w(J) && w(J)(...e)
|
|
3783
|
-
}, null, 42,
|
|
3784
|
-
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(
|
|
3785
|
-
key: `${e.index}-${e.
|
|
3776
|
+
}, null, 42, ra)) : r("", !0),
|
|
3777
|
+
(g(!0), i(e, null, y(w(R), (e) => (g(), n(w(Pi), {
|
|
3778
|
+
key: `${e.index}-${e.id}`,
|
|
3786
3779
|
track: e,
|
|
3787
3780
|
"clip-path-id": w(z),
|
|
3788
3781
|
"inner-width": w(te),
|
|
@@ -3827,7 +3820,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3827
3820
|
"onClick",
|
|
3828
3821
|
"onContextmenu"
|
|
3829
3822
|
]))), 128)),
|
|
3830
|
-
s(w(
|
|
3823
|
+
s(w(Ki), {
|
|
3831
3824
|
state: w(me),
|
|
3832
3825
|
tracks: w(R),
|
|
3833
3826
|
"clip-path-id": w(z),
|
|
@@ -3846,7 +3839,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3846
3839
|
width: w(ge).width,
|
|
3847
3840
|
height: w(ge).height,
|
|
3848
3841
|
"aria-hidden": "true"
|
|
3849
|
-
}, null, 8,
|
|
3842
|
+
}, null, 8, ia)) : r("", !0),
|
|
3850
3843
|
w(l) ? r("", !0) : (g(), n(w(Ie), {
|
|
3851
3844
|
key: 3,
|
|
3852
3845
|
annotations: w(Y),
|
|
@@ -3865,13 +3858,13 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3865
3858
|
"onMove",
|
|
3866
3859
|
"onDragEnd"
|
|
3867
3860
|
])),
|
|
3868
|
-
w(l) ? r("", !0) : (g(), i("g",
|
|
3869
|
-
key: `legend-${e.index}-${e.
|
|
3861
|
+
w(l) ? r("", !0) : (g(), i("g", aa, [(g(!0), i(e, null, y(w(R), (e) => (g(), i("g", {
|
|
3862
|
+
key: `legend-${e.index}-${e.id}`,
|
|
3870
3863
|
class: "waveform-chart__legend-track",
|
|
3871
3864
|
"data-legend-track-index": e.index,
|
|
3872
3865
|
"data-legend-track-id": e.id,
|
|
3873
3866
|
transform: `translate(${e.left}, ${e.top})`
|
|
3874
|
-
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(
|
|
3867
|
+
}, [!e.isEmpty && e.legendSeries.length > 1 ? (g(), n(w(Hi), {
|
|
3875
3868
|
key: 0,
|
|
3876
3869
|
series: e.legendSeries,
|
|
3877
3870
|
position: w(X)(e.id),
|
|
@@ -3892,23 +3885,23 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3892
3885
|
"width",
|
|
3893
3886
|
"height",
|
|
3894
3887
|
"onToggle"
|
|
3895
|
-
])) : r("", !0)], 8,
|
|
3896
|
-
], 8,
|
|
3888
|
+
])) : r("", !0)], 8, oa))), 128))]))
|
|
3889
|
+
], 8, $i),
|
|
3897
3890
|
w(Ee) && !w(l) ? (g(), i("text", {
|
|
3898
3891
|
key: 0,
|
|
3899
3892
|
class: "waveform-chart__label waveform-chart__x-label",
|
|
3900
3893
|
x: w(_) + w(te) / 2,
|
|
3901
3894
|
y: w(De),
|
|
3902
3895
|
"text-anchor": "middle"
|
|
3903
|
-
}, S(w(Ee)), 9,
|
|
3896
|
+
}, S(w(Ee)), 9, sa)) : r("", !0),
|
|
3904
3897
|
w(Oe) && !w(I) ? (g(), i("text", {
|
|
3905
3898
|
key: 1,
|
|
3906
3899
|
class: "waveform-chart__empty",
|
|
3907
3900
|
x: w(P) / 2,
|
|
3908
3901
|
y: w(F) / 2,
|
|
3909
3902
|
"text-anchor": "middle"
|
|
3910
|
-
}, " 暂无有效波形数据 ", 8,
|
|
3911
|
-
], 40,
|
|
3903
|
+
}, " 暂无有效波形数据 ", 8, ca)) : r("", !0)
|
|
3904
|
+
], 40, Xi)),
|
|
3912
3905
|
w(ke).showPagination && w(Ae) > 1 && !w(l) ? (g(), n(w(ae), {
|
|
3913
3906
|
key: 1,
|
|
3914
3907
|
class: "waveform-chart__pagination",
|
|
@@ -3925,7 +3918,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3925
3918
|
"total",
|
|
3926
3919
|
"onChange"
|
|
3927
3920
|
])) : r("", !0),
|
|
3928
|
-
w(Re) && !w(l) && !w(u) ? (g(), n(
|
|
3921
|
+
w(Re) && !w(l) && !w(u) ? (g(), n(Or, {
|
|
3929
3922
|
key: 2,
|
|
3930
3923
|
annotation: w(Re).annotation,
|
|
3931
3924
|
mode: w(Re).mode,
|
|
@@ -3967,7 +3960,7 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3967
3960
|
"onDelete",
|
|
3968
3961
|
"onClose"
|
|
3969
3962
|
])) : r("", !0),
|
|
3970
|
-
s(w(
|
|
3963
|
+
s(w(Br), {
|
|
3971
3964
|
state: w(me),
|
|
3972
3965
|
visible: w(he) && !w(u),
|
|
3973
3966
|
"time-unit": w(ue),
|
|
@@ -3980,9 +3973,9 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
3980
3973
|
"container-width",
|
|
3981
3974
|
"container-height"
|
|
3982
3975
|
])
|
|
3983
|
-
], 46,
|
|
3976
|
+
], 46, qi));
|
|
3984
3977
|
}
|
|
3985
|
-
}),
|
|
3978
|
+
}), ua = /* @__PURE__ */ c({
|
|
3986
3979
|
__name: "WaveformChart",
|
|
3987
3980
|
props: {
|
|
3988
3981
|
data: {},
|
|
@@ -4060,12 +4053,12 @@ var Zr = ["clip-path"], Qr = ["data-series-id", "data-series-name"], $r = [
|
|
|
4060
4053
|
"page-change"
|
|
4061
4054
|
],
|
|
4062
4055
|
setup(e, { expose: t, emit: r }) {
|
|
4063
|
-
let i =
|
|
4056
|
+
let i = lr(e, r);
|
|
4064
4057
|
return t({
|
|
4065
4058
|
resetViewport: i.resetViewport,
|
|
4066
4059
|
setViewportDomain: i.setViewportDomain
|
|
4067
|
-
}), (e, t) => (g(), n(
|
|
4060
|
+
}), (e, t) => (g(), n(la, { controller: w(i) }, null, 8, ["controller"]));
|
|
4068
4061
|
}
|
|
4069
4062
|
});
|
|
4070
4063
|
//#endregion
|
|
4071
|
-
export {
|
|
4064
|
+
export { Ht as DEFAULT_WAVEFORM_RENDERING_OPTIONS, ua as WaveformChart, Xe as buildMinorTicks, gt as clamp, lt as displayTime, ft as formatAxisTime, dt as formatEndpointTime, pt as formatTooltipTime, Ft as normalizeWaveformData, It as normalizeWaveformSeries, $ as paddedDomain, Je as parseWaveformAnnotations, ht as resolveTrackGeometry, Ut as resolveWaveformRenderingOptions, Yt as selectRenderablePoints, qe as serializeWaveformAnnotations };
|