vvplot 0.5.0 → 0.5.2
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/dist/vvplot.esm.js +1050 -728
- package/dist/vvplot.esm.min.js +18 -18
- package/dist/vvplot.global.js +1047 -725
- package/dist/vvplot.global.min.js +19 -19
- package/package.json +1 -1
package/dist/vvplot.global.js
CHANGED
|
@@ -57,7 +57,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
57
57
|
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
58
58
|
const toString = Object.prototype.toString;
|
|
59
59
|
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
60
|
-
const noop$
|
|
60
|
+
const noop$2 = () => {
|
|
61
61
|
};
|
|
62
62
|
function pxValue(px) {
|
|
63
63
|
return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
|
|
@@ -196,7 +196,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
196
196
|
} = options;
|
|
197
197
|
const pixelRatio = vue.shallowRef(1);
|
|
198
198
|
const query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);
|
|
199
|
-
let stop = noop$
|
|
199
|
+
let stop = noop$2;
|
|
200
200
|
if (window2) {
|
|
201
201
|
stop = watchImmediate(query, () => pixelRatio.value = window2.devicePixelRatio);
|
|
202
202
|
}
|
|
@@ -2470,7 +2470,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2470
2470
|
coord_scale(ds, levels) {
|
|
2471
2471
|
let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0;
|
|
2472
2472
|
if (ds.x) {
|
|
2473
|
-
let x2 = psum$a(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), xmin = psum$a(x2, ds.width?.map?.((x3) => -x3 / 2) ?? -0.5
|
|
2473
|
+
let x2 = psum$a(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), xmin = psum$a(x2, ds.width?.map?.((x3) => -x3 / 2) ?? -0.5), xmax = psum$a(x2, ds.width?.map?.((x3) => +x3 / 2) ?? 0.5), lwisker = psum$a(ds.lwisker, ynudge), Q1 = psum$a(ds.Q1, ynudge), median = psum$a(ds.median, ynudge), Q3 = psum$a(ds.Q3, ynudge), uwisker = psum$a(ds.uwisker, ynudge), outliers = vecutils.apply(
|
|
2474
2474
|
($x, { y: ys, $raw }, nudge) => psum$a(ys, nudge).map(($y, i) => ({ x: $x, y: $y, $raw: $raw[i] })),
|
|
2475
2475
|
x2,
|
|
2476
2476
|
ds.outliers ?? [],
|
|
@@ -2492,7 +2492,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2492
2492
|
$ymax
|
|
2493
2493
|
};
|
|
2494
2494
|
} else if (ds.y) {
|
|
2495
|
-
let y2 = psum$a(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), ymin = psum$a(y2, ds.height?.map?.((y3) => -y3 / 2) ?? -0.5
|
|
2495
|
+
let y2 = psum$a(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), ymin = psum$a(y2, ds.height?.map?.((y3) => -y3 / 2) ?? -0.5), ymax = psum$a(y2, ds.height?.map?.((y3) => +y3 / 2) ?? 0.5), lwisker = psum$a(ds.lwisker, xnudge), Q1 = psum$a(ds.Q1, xnudge), median = psum$a(ds.median, xnudge), Q3 = psum$a(ds.Q3, xnudge), uwisker = psum$a(ds.uwisker, xnudge), outliers = vecutils.apply(
|
|
2496
2496
|
($y, { x: xs, $raw }, nudge) => psum$a(xs, nudge).map(($x, i) => ({ x: $x, y: $y, $raw: $raw[i] })),
|
|
2497
2497
|
y2,
|
|
2498
2498
|
ds.outliers ?? [],
|
|
@@ -2528,13 +2528,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
2528
2528
|
const curve$1 = {
|
|
2529
2529
|
scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
|
|
2530
2530
|
coord_scale(ds, levels) {
|
|
2531
|
-
let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => {
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
y: +(levels?.y?.[p.y] ?? p.y) + yn
|
|
2536
|
-
};
|
|
2537
|
-
}));
|
|
2531
|
+
let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => ({
|
|
2532
|
+
x: +(levels?.x?.[p.x] ?? p.x) + (xnudge?.[i] ?? 0),
|
|
2533
|
+
y: +(levels?.y?.[p.y] ?? p.y) + (ynudge?.[i] ?? 0)
|
|
2534
|
+
})));
|
|
2538
2535
|
return { points };
|
|
2539
2536
|
},
|
|
2540
2537
|
get_range(ds, orientation) {
|
|
@@ -2636,13 +2633,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
2636
2633
|
const polygon$1 = {
|
|
2637
2634
|
scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
|
|
2638
2635
|
coord_scale(ds, levels) {
|
|
2639
|
-
let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => {
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
y: +(levels?.y?.[p.y] ?? p.y) + yn
|
|
2644
|
-
};
|
|
2645
|
-
}));
|
|
2636
|
+
let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => ({
|
|
2637
|
+
x: +(levels?.x?.[p.x] ?? p.x) + (xnudge?.[i] ?? 0),
|
|
2638
|
+
y: +(levels?.y?.[p.y] ?? p.y) + (ynudge?.[i] ?? 0)
|
|
2639
|
+
})));
|
|
2646
2640
|
return { points };
|
|
2647
2641
|
},
|
|
2648
2642
|
get_range(ds, orientation) {
|
|
@@ -2670,6 +2664,28 @@ var VVPlot = (function(exports, vue) {
|
|
|
2670
2664
|
return d;
|
|
2671
2665
|
}
|
|
2672
2666
|
};
|
|
2667
|
+
const shape$1 = {
|
|
2668
|
+
scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
|
|
2669
|
+
coord_scale(ds, levels) {
|
|
2670
|
+
let x2 = levels.x?.apply?.(ds.x) ?? ds.x, y2 = levels.y?.apply?.(ds.y) ?? ds.y, xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => ({
|
|
2671
|
+
x: +(levels?.x?.[p.x] ?? p.x) + (xnudge?.[i] ?? 0) + x2[i],
|
|
2672
|
+
y: +(levels?.y?.[p.y] ?? p.y) + (ynudge?.[i] ?? 0) + y2[i]
|
|
2673
|
+
})));
|
|
2674
|
+
return { points };
|
|
2675
|
+
},
|
|
2676
|
+
get_values(ds, orientation) {
|
|
2677
|
+
if (orientation == "x") return ds.x;
|
|
2678
|
+
if (orientation == "y") return ds.y;
|
|
2679
|
+
},
|
|
2680
|
+
get_range(ds, orientation) {
|
|
2681
|
+
if (orientation == "x") return (ds.points ?? []).flatMap((ps, i) => ps.map((p) => p.x + ds.x[i]));
|
|
2682
|
+
if (orientation == "y") return (ds.points ?? []).flatMap((ps, i) => ps.map((p) => p.y + ds.y[i]));
|
|
2683
|
+
},
|
|
2684
|
+
validate(d) {
|
|
2685
|
+
if (!Array.isArray(d.points)) return null;
|
|
2686
|
+
return d;
|
|
2687
|
+
}
|
|
2688
|
+
};
|
|
2673
2689
|
let psum$3 = vecutils.sum;
|
|
2674
2690
|
const stick$1 = {
|
|
2675
2691
|
scale_attrs: ["color", "linewidth", "linetype", "alpha"],
|
|
@@ -2760,20 +2776,22 @@ var VVPlot = (function(exports, vue) {
|
|
|
2760
2776
|
point: point$3,
|
|
2761
2777
|
polygon: polygon$1,
|
|
2762
2778
|
rect: rect$2,
|
|
2779
|
+
shape: shape$1,
|
|
2763
2780
|
stick: stick$1,
|
|
2764
2781
|
text: text$3,
|
|
2765
2782
|
textsegment: textsegment$1,
|
|
2766
2783
|
tile: tile$1
|
|
2767
2784
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2768
|
-
const bar = Object.assign(function(data, { position = "stack", width =
|
|
2785
|
+
const bar = Object.assign(function(data, { position = "stack", width = 0.9, height = 0.9 }) {
|
|
2769
2786
|
if (data.x != null && data.y != null)
|
|
2770
2787
|
throw new Error(`"StatBar" only supports "x" or "y", not both`);
|
|
2771
|
-
let
|
|
2788
|
+
let cateAes = data.x ? "x" : "y";
|
|
2789
|
+
let values = data[cateAes];
|
|
2772
2790
|
if (values == null)
|
|
2773
2791
|
throw new Error(`Missing aesthetics for "StatBar": "x" or "y"`);
|
|
2774
2792
|
if (values.some((x2) => typeof x2 === "number"))
|
|
2775
2793
|
throw new Error(`"StatBar" requires a discrete aesthetic`);
|
|
2776
|
-
let keys = Object.keys(data).filter((k) => !
|
|
2794
|
+
let keys = Object.keys(data).filter((k) => !k.startsWith("$"));
|
|
2777
2795
|
let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
|
|
2778
2796
|
let inter = intraaction({ group: group ?? 0, value: values });
|
|
2779
2797
|
let groups = Map.groupBy(data.$raw, (_, i) => inter.categories[inter[i]]);
|
|
@@ -2785,42 +2803,54 @@ var VVPlot = (function(exports, vue) {
|
|
|
2785
2803
|
for (let key of keys) {
|
|
2786
2804
|
result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
|
|
2787
2805
|
}
|
|
2788
|
-
if (
|
|
2806
|
+
if (cateAes == "x") {
|
|
2789
2807
|
result.x = cates.map((v) => v.value);
|
|
2790
2808
|
result.height = $raw.map((v) => v.length);
|
|
2791
2809
|
} else {
|
|
2792
2810
|
result.y = cates.map((v) => v.value);
|
|
2793
2811
|
result.width = $raw.map((v) => v.length);
|
|
2794
2812
|
}
|
|
2795
|
-
if (position == "
|
|
2796
|
-
|
|
2813
|
+
if (position == "stack") {
|
|
2814
|
+
let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
|
|
2815
|
+
let offset = cates.map((_) => 0);
|
|
2816
|
+
for (let cate in cate_group) {
|
|
2817
|
+
let s = 0;
|
|
2818
|
+
for (let i of cate_group[cate]) {
|
|
2819
|
+
offset[i] = s;
|
|
2820
|
+
s += $raw[i].length;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
if (cateAes == "x") {
|
|
2824
|
+
result.y = result.height.map((v, i) => offset[i] + v / 2);
|
|
2825
|
+
result.width = cates.map((_) => width);
|
|
2826
|
+
} else {
|
|
2827
|
+
result.x = result.width.map((v, i) => offset[i] + v / 2);
|
|
2828
|
+
result.height = cates.map((_) => height);
|
|
2829
|
+
}
|
|
2830
|
+
} else if (position == "dodge") {
|
|
2831
|
+
let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
|
|
2832
|
+
let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
|
|
2833
|
+
if (cateAes == "x") {
|
|
2797
2834
|
result.y = result.height.map((v) => v / 2);
|
|
2798
|
-
result.width =
|
|
2799
|
-
result.xnudge =
|
|
2835
|
+
result.width = $group.map((arr) => width / arr.length);
|
|
2836
|
+
result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
|
|
2800
2837
|
} else {
|
|
2801
2838
|
result.x = result.width.map((v) => v / 2);
|
|
2802
|
-
result.height =
|
|
2803
|
-
result.ynudge =
|
|
2839
|
+
result.height = $group.map((arr) => height / arr.length);
|
|
2840
|
+
result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
|
|
2804
2841
|
}
|
|
2805
2842
|
} else {
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
let indices = cates.map((cate, i) => [cate, i]).sort(([{ group: a }], [{ group: b }]) => a - b);
|
|
2809
|
-
for (let [cate, i] of indices) {
|
|
2810
|
-
offset[i] = tmp[cate.value];
|
|
2811
|
-
tmp[cate.value] += $raw[i].length;
|
|
2812
|
-
}
|
|
2813
|
-
if (data.x) {
|
|
2814
|
-
result.y = result.height.map((v, i) => offset[i] + v / 2);
|
|
2843
|
+
if (cateAes == "x") {
|
|
2844
|
+
result.y = result.height.map((v) => v / 2);
|
|
2815
2845
|
result.width = cates.map((_) => width);
|
|
2816
2846
|
} else {
|
|
2817
|
-
result.x = result.width.map((v
|
|
2847
|
+
result.x = result.width.map((v) => v / 2);
|
|
2818
2848
|
result.height = cates.map((_) => height);
|
|
2819
2849
|
}
|
|
2820
2850
|
}
|
|
2821
2851
|
return result;
|
|
2822
2852
|
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
2823
|
-
const boxplot = Object.assign(function(data, {}) {
|
|
2853
|
+
const boxplot = Object.assign(function(data, { position = "dodge", width = 0.9, height = 0.9 }) {
|
|
2824
2854
|
let missingAes = ["x", "y"].filter((a) => data[a] == null);
|
|
2825
2855
|
if (missingAes.length > 0)
|
|
2826
2856
|
throw new Error(`Missing aesthetics for "StatBoxplot": "${missingAes.join('", "')}"`);
|
|
@@ -2855,11 +2885,28 @@ var VVPlot = (function(exports, vue) {
|
|
|
2855
2885
|
max,
|
|
2856
2886
|
outliers
|
|
2857
2887
|
};
|
|
2888
|
+
if (position == "dodge") {
|
|
2889
|
+
let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
|
|
2890
|
+
let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
|
|
2891
|
+
if (isXdiscrete) {
|
|
2892
|
+
result.width = $group.map((arr) => width / arr.length);
|
|
2893
|
+
result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
|
|
2894
|
+
} else {
|
|
2895
|
+
result.height = $group.map((arr) => height / arr.length);
|
|
2896
|
+
result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
|
|
2897
|
+
}
|
|
2898
|
+
} else {
|
|
2899
|
+
if (isXdiscrete) {
|
|
2900
|
+
result.width = cates.map((_) => width);
|
|
2901
|
+
} else {
|
|
2902
|
+
result.height = cates.map((_) => height);
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2858
2905
|
for (let key of keys) {
|
|
2859
2906
|
result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
|
|
2860
2907
|
}
|
|
2861
2908
|
return result;
|
|
2862
|
-
}, { core_attrs: ["x", "y", "
|
|
2909
|
+
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
2863
2910
|
const curve = Object.assign(function(data) {
|
|
2864
2911
|
if (data.points != null) return data;
|
|
2865
2912
|
let missingAes = ["x", "y"].filter((a) => data[a] == null);
|
|
@@ -2882,7 +2929,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2882
2929
|
}
|
|
2883
2930
|
return result;
|
|
2884
2931
|
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
2885
|
-
const density = Object.assign(function(data, { n = 512, kernel = "gaussian" } = {}) {
|
|
2932
|
+
const density = Object.assign(function(data, { n = 512, kernel = "gaussian", scale = "area" } = {}) {
|
|
2886
2933
|
if (data.x != null && data.y != null)
|
|
2887
2934
|
throw new Error(`"StatDensity" only supports "x" or "y", not both`);
|
|
2888
2935
|
let values = data.x ?? data.y;
|
|
@@ -2890,9 +2937,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
2890
2937
|
throw new Error(`Missing aesthetics for "StatDensity": "x" or "y"`);
|
|
2891
2938
|
if (values.some((x2) => typeof x2 !== "number"))
|
|
2892
2939
|
throw new Error(`"StatDensity" requires a continuous aesthetic`);
|
|
2893
|
-
kernel = density_kernels[kernel];
|
|
2940
|
+
kernel = density_kernels$1[kernel];
|
|
2894
2941
|
if (!kernel) {
|
|
2895
|
-
throw new Error(`kernel must be one of ${Object.keys(density_kernels).map((k) => `"${k}"`).join(", ")}`);
|
|
2942
|
+
throw new Error(`kernel must be one of ${Object.keys(density_kernels$1).map((k) => `"${k}"`).join(", ")}`);
|
|
2896
2943
|
}
|
|
2897
2944
|
let keys = Object.keys(data).filter((k) => !["x", "y"].includes(k) && !k.startsWith("$"));
|
|
2898
2945
|
let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
|
|
@@ -2907,13 +2954,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
2907
2954
|
$group: cates.map((x2) => x2.group)
|
|
2908
2955
|
};
|
|
2909
2956
|
let density2 = vs.map((v) => {
|
|
2910
|
-
let bandwidth = bw.nrd0(v);
|
|
2957
|
+
let bandwidth = bw$1.nrd0(v);
|
|
2911
2958
|
let { min, max } = numutils.extent(v);
|
|
2912
2959
|
min -= 3 * bandwidth;
|
|
2913
2960
|
max += 3 * bandwidth;
|
|
2914
2961
|
let step = (max - min) / (n - 1);
|
|
2915
2962
|
let breaks = Array.from({ length: n }, (_, i) => min + i * step);
|
|
2916
|
-
|
|
2963
|
+
let ratio2 = scale === "count" ? v.length : 1;
|
|
2964
|
+
return breaks.map((t) => [t, numutils.mean(v.map((d) => kernel((t - d) / bandwidth))) / bandwidth * ratio2]);
|
|
2917
2965
|
});
|
|
2918
2966
|
for (let key of keys) {
|
|
2919
2967
|
result[key] = cates.map((x2) => group.categories[x2.group][key]);
|
|
@@ -2925,7 +2973,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2925
2973
|
}
|
|
2926
2974
|
return result;
|
|
2927
2975
|
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
2928
|
-
const bw = {
|
|
2976
|
+
const bw$1 = {
|
|
2929
2977
|
nrd0: function(x2) {
|
|
2930
2978
|
x2 = x2.filter((v2) => (typeof v2 === "number" || v2 instanceof Date) && isFinite(v2));
|
|
2931
2979
|
let sd = numutils.sd(x2);
|
|
@@ -2941,7 +2989,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2941
2989
|
return 1.06 * v * x2.length ** -0.2;
|
|
2942
2990
|
}
|
|
2943
2991
|
};
|
|
2944
|
-
const density_kernels = {
|
|
2992
|
+
const density_kernels$1 = {
|
|
2945
2993
|
uniform: (x2) => Math.abs(x2) <= 1 ? 0.5 : 0,
|
|
2946
2994
|
triangular: (x2) => Math.abs(x2) <= 1 ? 1 - Math.abs(x2) : 0,
|
|
2947
2995
|
epanechnikov: (x2) => Math.abs(x2) <= 1 ? 0.75 * (1 - x2 ** 2) : 0,
|
|
@@ -3142,6 +3190,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
3142
3190
|
throw new Error(`Missing aesthetics for "StatSegment": "${missingAes.join('", "')}"`);
|
|
3143
3191
|
return data;
|
|
3144
3192
|
}, { core_attrs: ["x", "y", "xend", "yend", "xnudge", "ynudge"] });
|
|
3193
|
+
const shape = Object.assign(function(data) {
|
|
3194
|
+
let missingAes = ["x", "y", "points"].filter((a) => data[a] == null);
|
|
3195
|
+
if (missingAes.length > 0)
|
|
3196
|
+
throw new Error(`Missing aesthetics for "StatShape": "${missingAes.join('", "')}"`);
|
|
3197
|
+
return data;
|
|
3198
|
+
}, { core_attrs: ["x", "y", "points", "xnudge", "ynudge"] });
|
|
3145
3199
|
const stick = Object.assign(function(data) {
|
|
3146
3200
|
if (data.dx == null) data.dx = Array(data.x.length).fill(0);
|
|
3147
3201
|
if (data.dy == null) data.dy = Array(data.y.length).fill(0);
|
|
@@ -3176,6 +3230,103 @@ var VVPlot = (function(exports, vue) {
|
|
|
3176
3230
|
throw new Error(`Missing aesthetics for "StatTile": "${missingAes.join('", "')}"`);
|
|
3177
3231
|
return data;
|
|
3178
3232
|
}, { core_attrs: ["x", "y", "width", "height", "xnudge", "ynudge"] });
|
|
3233
|
+
const violin = Object.assign(function(data, {
|
|
3234
|
+
n = 512,
|
|
3235
|
+
kernel = "gaussian",
|
|
3236
|
+
scale = "width",
|
|
3237
|
+
position = "dodge",
|
|
3238
|
+
width = 0.9,
|
|
3239
|
+
height = 0.9
|
|
3240
|
+
} = {}) {
|
|
3241
|
+
let missingAes = ["x", "y"].filter((a) => data[a] == null);
|
|
3242
|
+
if (missingAes.length > 0)
|
|
3243
|
+
throw new Error(`Missing aesthetics for "StatViolin": "${missingAes.join('", "')}"`);
|
|
3244
|
+
let isXdiscrete = data.x.some(is_categorical);
|
|
3245
|
+
let isYdiscrete = data.y.some(is_categorical);
|
|
3246
|
+
if (isXdiscrete && isYdiscrete)
|
|
3247
|
+
throw new Error(`Both "x" and "y" are discrete, "StatViolin" requires one continuous and one discrete aesthetic`);
|
|
3248
|
+
if (!isXdiscrete && !isYdiscrete)
|
|
3249
|
+
throw new Error(`Both "x" and "y" are continuous, "StatViolin" requires one continuous and one discrete aesthetic`);
|
|
3250
|
+
kernel = density_kernels[kernel];
|
|
3251
|
+
if (!kernel) {
|
|
3252
|
+
throw new Error(`kernel must be one of ${Object.keys(density_kernels).map((k) => `"${k}"`).join(", ")}`);
|
|
3253
|
+
}
|
|
3254
|
+
let [valueAes, cateAes, size] = isXdiscrete ? ["y", "x", width] : ["x", "y", height];
|
|
3255
|
+
let values = data[valueAes];
|
|
3256
|
+
let keys = Object.keys(data).filter((k) => k != valueAes && !k.startsWith("$"));
|
|
3257
|
+
let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
|
|
3258
|
+
let cut = intraaction({
|
|
3259
|
+
group: group ?? new Array(values.length).fill(0)
|
|
3260
|
+
}).map((v, _, a) => a.categories[v]);
|
|
3261
|
+
let map2 = Map.groupBy(data.$raw, (_, i) => cut[i]);
|
|
3262
|
+
let $raw = Array.from(map2.values()), cates = Array.from(map2.keys());
|
|
3263
|
+
let vs = Array.from(Map.groupBy(values, (_, i) => cut[i]).values());
|
|
3264
|
+
let result = {
|
|
3265
|
+
$raw,
|
|
3266
|
+
$group: cates.map((x2) => x2.group),
|
|
3267
|
+
[valueAes]: cates.map((v) => 0)
|
|
3268
|
+
};
|
|
3269
|
+
let density2 = vs.map((v) => {
|
|
3270
|
+
let bandwidth = bw.nrd0(v);
|
|
3271
|
+
let { min, max } = numutils.extent(v);
|
|
3272
|
+
min -= 3 * bandwidth;
|
|
3273
|
+
max += 3 * bandwidth;
|
|
3274
|
+
let step = (max - min) / (n - 1);
|
|
3275
|
+
let breaks = Array.from({ length: n }, (_, i) => min + i * step);
|
|
3276
|
+
let res = breaks.map((t) => numutils.mean(v.map((d) => kernel((t - d) / bandwidth))) / bandwidth);
|
|
3277
|
+
let ratio2 = scale == "area" ? 1 : 1 / numutils.max(res);
|
|
3278
|
+
return breaks.map((t, i) => [t, res[i] * ratio2 / 2]);
|
|
3279
|
+
});
|
|
3280
|
+
for (let key of keys) {
|
|
3281
|
+
result[key] = cates.map((x2) => group.categories[x2.group][key]);
|
|
3282
|
+
}
|
|
3283
|
+
if (position == "dodge") {
|
|
3284
|
+
let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
|
|
3285
|
+
let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
|
|
3286
|
+
density2 = $group.map((arr, i) => density2[i].map(([x2, y2]) => [x2, y2 * size / arr.length]));
|
|
3287
|
+
if (isXdiscrete) {
|
|
3288
|
+
result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
|
|
3289
|
+
} else {
|
|
3290
|
+
result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
|
|
3291
|
+
}
|
|
3292
|
+
} else {
|
|
3293
|
+
density2 = density2.map((v) => v.map(([x2, y2]) => [x2, y2 * size]));
|
|
3294
|
+
}
|
|
3295
|
+
if (isXdiscrete) {
|
|
3296
|
+
result.points = density2.map((v) => v.map(([y2, x2]) => ({ x: x2, y: y2 })).concat(v.map(([y2, x2]) => ({ x: -x2, y: y2 })).reverse()));
|
|
3297
|
+
} else {
|
|
3298
|
+
result.points = density2.map((v) => v.map(([x2, y2]) => ({ x: x2, y: y2 })).concat(v.map(([x2, y2]) => ({ x: x2, y: -y2 })).reverse()));
|
|
3299
|
+
}
|
|
3300
|
+
return result;
|
|
3301
|
+
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
3302
|
+
const bw = {
|
|
3303
|
+
nrd0: function(x2) {
|
|
3304
|
+
x2 = x2.filter((v2) => (typeof v2 === "number" || v2 instanceof Date) && isFinite(v2));
|
|
3305
|
+
let sd = numutils.sd(x2);
|
|
3306
|
+
let iqr = numutils.quantile(x2, 0.75) - numutils.quantile(x2, 0.25);
|
|
3307
|
+
let v = Math.min(sd, iqr / 1.34) || 1;
|
|
3308
|
+
return 0.9 * v * x2.length ** -0.2;
|
|
3309
|
+
},
|
|
3310
|
+
nrd: function(x2) {
|
|
3311
|
+
x2 = x2.filter((v2) => (typeof v2 === "number" || v2 instanceof Date) && isFinite(v2));
|
|
3312
|
+
let sd = numutils.sd(x2);
|
|
3313
|
+
let iqr = numutils.quantile(x2, 0.75) - numutils.quantile(x2, 0.25);
|
|
3314
|
+
let v = Math.min(sd, iqr / 1.34) || 1;
|
|
3315
|
+
return 1.06 * v * x2.length ** -0.2;
|
|
3316
|
+
}
|
|
3317
|
+
};
|
|
3318
|
+
const density_kernels = {
|
|
3319
|
+
uniform: (x2) => Math.abs(x2) <= 1 ? 0.5 : 0,
|
|
3320
|
+
triangular: (x2) => Math.abs(x2) <= 1 ? 1 - Math.abs(x2) : 0,
|
|
3321
|
+
epanechnikov: (x2) => Math.abs(x2) <= 1 ? 0.75 * (1 - x2 ** 2) : 0,
|
|
3322
|
+
biweight: (x2) => Math.abs(x2) <= 1 ? 15 / 16 * (1 - x2 ** 2) ** 2 : 0,
|
|
3323
|
+
triweight: (x2) => Math.abs(x2) <= 1 ? 35 / 32 * (1 - x2 ** 2) ** 3 : 0,
|
|
3324
|
+
tricube: (x2) => Math.abs(x2) <= 1 ? 70 / 81 * (1 - Math.abs(x2) ** 3) ** 3 : 0,
|
|
3325
|
+
gaussian: (x2) => Math.exp(-0.5 * x2 ** 2) / Math.sqrt(2 * Math.PI),
|
|
3326
|
+
cosine: (x2) => Math.abs(x2) <= 1 ? Math.PI / 4 * Math.cos(Math.PI / 2 * x2) : 0,
|
|
3327
|
+
logistic: (x2) => 1 / Math.cosh(x2) ** 2 / Math.PI,
|
|
3328
|
+
sigmoid: (x2) => 2 / (Math.exp(x2) + Math.exp(-x2)) ** 2 / Math.PI
|
|
3329
|
+
};
|
|
3179
3330
|
const vvstat = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3180
3331
|
__proto__: null,
|
|
3181
3332
|
bar,
|
|
@@ -3192,10 +3343,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
3192
3343
|
polygon,
|
|
3193
3344
|
rect: rect$1,
|
|
3194
3345
|
segment,
|
|
3346
|
+
shape,
|
|
3195
3347
|
stick,
|
|
3196
3348
|
text: text$2,
|
|
3197
3349
|
textsegment,
|
|
3198
|
-
tile
|
|
3350
|
+
tile,
|
|
3351
|
+
violin
|
|
3199
3352
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3200
3353
|
function ascending$1(a, b) {
|
|
3201
3354
|
return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
@@ -3297,7 +3450,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
3297
3450
|
const reverse = stop < start2, inc = reverse ? tickIncrement(stop, start2, count) : tickIncrement(start2, stop, count);
|
|
3298
3451
|
return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
|
|
3299
3452
|
}
|
|
3300
|
-
var noop = { value: () => {
|
|
3453
|
+
var noop$1 = { value: () => {
|
|
3301
3454
|
} };
|
|
3302
3455
|
function dispatch() {
|
|
3303
3456
|
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
@@ -3357,7 +3510,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
3357
3510
|
function set$1(type, name, callback) {
|
|
3358
3511
|
for (var i = 0, n = type.length; i < n; ++i) {
|
|
3359
3512
|
if (type[i].name === name) {
|
|
3360
|
-
type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
|
|
3513
|
+
type[i] = noop$1, type = type.slice(0, i).concat(type.slice(i + 1));
|
|
3361
3514
|
break;
|
|
3362
3515
|
}
|
|
3363
3516
|
}
|
|
@@ -5923,9 +6076,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
5923
6076
|
};
|
|
5924
6077
|
}
|
|
5925
6078
|
const epsilon$1 = 1e-12;
|
|
5926
|
-
function withPath(
|
|
6079
|
+
function withPath(shape2) {
|
|
5927
6080
|
let digits = 3;
|
|
5928
|
-
|
|
6081
|
+
shape2.digits = function(_) {
|
|
5929
6082
|
if (!arguments.length) return digits;
|
|
5930
6083
|
if (_ == null) {
|
|
5931
6084
|
digits = null;
|
|
@@ -5934,7 +6087,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
5934
6087
|
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
5935
6088
|
digits = d;
|
|
5936
6089
|
}
|
|
5937
|
-
return
|
|
6090
|
+
return shape2;
|
|
5938
6091
|
};
|
|
5939
6092
|
return () => new Path(digits);
|
|
5940
6093
|
}
|
|
@@ -6016,6 +6169,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
6016
6169
|
};
|
|
6017
6170
|
return line2;
|
|
6018
6171
|
}
|
|
6172
|
+
function noop() {
|
|
6173
|
+
}
|
|
6019
6174
|
function point$1(that, x2, y2) {
|
|
6020
6175
|
that._context.bezierCurveTo(
|
|
6021
6176
|
that._x1 + that._k * (that._x2 - that._x0),
|
|
@@ -6084,6 +6239,69 @@ var VVPlot = (function(exports, vue) {
|
|
|
6084
6239
|
};
|
|
6085
6240
|
return cardinal2;
|
|
6086
6241
|
})(0);
|
|
6242
|
+
function CardinalClosed(context, tension) {
|
|
6243
|
+
this._context = context;
|
|
6244
|
+
this._k = (1 - tension) / 6;
|
|
6245
|
+
}
|
|
6246
|
+
CardinalClosed.prototype = {
|
|
6247
|
+
areaStart: noop,
|
|
6248
|
+
areaEnd: noop,
|
|
6249
|
+
lineStart: function() {
|
|
6250
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
|
|
6251
|
+
this._point = 0;
|
|
6252
|
+
},
|
|
6253
|
+
lineEnd: function() {
|
|
6254
|
+
switch (this._point) {
|
|
6255
|
+
case 1: {
|
|
6256
|
+
this._context.moveTo(this._x3, this._y3);
|
|
6257
|
+
this._context.closePath();
|
|
6258
|
+
break;
|
|
6259
|
+
}
|
|
6260
|
+
case 2: {
|
|
6261
|
+
this._context.lineTo(this._x3, this._y3);
|
|
6262
|
+
this._context.closePath();
|
|
6263
|
+
break;
|
|
6264
|
+
}
|
|
6265
|
+
case 3: {
|
|
6266
|
+
this.point(this._x3, this._y3);
|
|
6267
|
+
this.point(this._x4, this._y4);
|
|
6268
|
+
this.point(this._x5, this._y5);
|
|
6269
|
+
break;
|
|
6270
|
+
}
|
|
6271
|
+
}
|
|
6272
|
+
},
|
|
6273
|
+
point: function(x2, y2) {
|
|
6274
|
+
x2 = +x2, y2 = +y2;
|
|
6275
|
+
switch (this._point) {
|
|
6276
|
+
case 0:
|
|
6277
|
+
this._point = 1;
|
|
6278
|
+
this._x3 = x2, this._y3 = y2;
|
|
6279
|
+
break;
|
|
6280
|
+
case 1:
|
|
6281
|
+
this._point = 2;
|
|
6282
|
+
this._context.moveTo(this._x4 = x2, this._y4 = y2);
|
|
6283
|
+
break;
|
|
6284
|
+
case 2:
|
|
6285
|
+
this._point = 3;
|
|
6286
|
+
this._x5 = x2, this._y5 = y2;
|
|
6287
|
+
break;
|
|
6288
|
+
default:
|
|
6289
|
+
point$1(this, x2, y2);
|
|
6290
|
+
break;
|
|
6291
|
+
}
|
|
6292
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2;
|
|
6293
|
+
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
6294
|
+
}
|
|
6295
|
+
};
|
|
6296
|
+
const cardinalClosed = (function custom(tension) {
|
|
6297
|
+
function cardinal2(context) {
|
|
6298
|
+
return new CardinalClosed(context, tension);
|
|
6299
|
+
}
|
|
6300
|
+
cardinal2.tension = function(tension2) {
|
|
6301
|
+
return custom(+tension2);
|
|
6302
|
+
};
|
|
6303
|
+
return cardinal2;
|
|
6304
|
+
})(0);
|
|
6087
6305
|
function point(that, x2, y2) {
|
|
6088
6306
|
var x1 = that._x1, y1 = that._y1, x22 = that._x2, y22 = that._y2;
|
|
6089
6307
|
if (that._l01_a > epsilon$1) {
|
|
@@ -6161,6 +6379,96 @@ var VVPlot = (function(exports, vue) {
|
|
|
6161
6379
|
};
|
|
6162
6380
|
return catmullRom2;
|
|
6163
6381
|
})(0.5);
|
|
6382
|
+
function CatmullRomClosed(context, alpha2) {
|
|
6383
|
+
this._context = context;
|
|
6384
|
+
this._alpha = alpha2;
|
|
6385
|
+
}
|
|
6386
|
+
CatmullRomClosed.prototype = {
|
|
6387
|
+
areaStart: noop,
|
|
6388
|
+
areaEnd: noop,
|
|
6389
|
+
lineStart: function() {
|
|
6390
|
+
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
|
|
6391
|
+
this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
|
|
6392
|
+
},
|
|
6393
|
+
lineEnd: function() {
|
|
6394
|
+
switch (this._point) {
|
|
6395
|
+
case 1: {
|
|
6396
|
+
this._context.moveTo(this._x3, this._y3);
|
|
6397
|
+
this._context.closePath();
|
|
6398
|
+
break;
|
|
6399
|
+
}
|
|
6400
|
+
case 2: {
|
|
6401
|
+
this._context.lineTo(this._x3, this._y3);
|
|
6402
|
+
this._context.closePath();
|
|
6403
|
+
break;
|
|
6404
|
+
}
|
|
6405
|
+
case 3: {
|
|
6406
|
+
this.point(this._x3, this._y3);
|
|
6407
|
+
this.point(this._x4, this._y4);
|
|
6408
|
+
this.point(this._x5, this._y5);
|
|
6409
|
+
break;
|
|
6410
|
+
}
|
|
6411
|
+
}
|
|
6412
|
+
},
|
|
6413
|
+
point: function(x2, y2) {
|
|
6414
|
+
x2 = +x2, y2 = +y2;
|
|
6415
|
+
if (this._point) {
|
|
6416
|
+
var x23 = this._x2 - x2, y23 = this._y2 - y2;
|
|
6417
|
+
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
|
|
6418
|
+
}
|
|
6419
|
+
switch (this._point) {
|
|
6420
|
+
case 0:
|
|
6421
|
+
this._point = 1;
|
|
6422
|
+
this._x3 = x2, this._y3 = y2;
|
|
6423
|
+
break;
|
|
6424
|
+
case 1:
|
|
6425
|
+
this._point = 2;
|
|
6426
|
+
this._context.moveTo(this._x4 = x2, this._y4 = y2);
|
|
6427
|
+
break;
|
|
6428
|
+
case 2:
|
|
6429
|
+
this._point = 3;
|
|
6430
|
+
this._x5 = x2, this._y5 = y2;
|
|
6431
|
+
break;
|
|
6432
|
+
default:
|
|
6433
|
+
point(this, x2, y2);
|
|
6434
|
+
break;
|
|
6435
|
+
}
|
|
6436
|
+
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
|
|
6437
|
+
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
|
|
6438
|
+
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2;
|
|
6439
|
+
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
|
|
6440
|
+
}
|
|
6441
|
+
};
|
|
6442
|
+
const catmullRomClosed = (function custom(alpha2) {
|
|
6443
|
+
function catmullRom2(context) {
|
|
6444
|
+
return alpha2 ? new CatmullRomClosed(context, alpha2) : new CardinalClosed(context, 0);
|
|
6445
|
+
}
|
|
6446
|
+
catmullRom2.alpha = function(alpha3) {
|
|
6447
|
+
return custom(+alpha3);
|
|
6448
|
+
};
|
|
6449
|
+
return catmullRom2;
|
|
6450
|
+
})(0.5);
|
|
6451
|
+
function LinearClosed(context) {
|
|
6452
|
+
this._context = context;
|
|
6453
|
+
}
|
|
6454
|
+
LinearClosed.prototype = {
|
|
6455
|
+
areaStart: noop,
|
|
6456
|
+
areaEnd: noop,
|
|
6457
|
+
lineStart: function() {
|
|
6458
|
+
this._point = 0;
|
|
6459
|
+
},
|
|
6460
|
+
lineEnd: function() {
|
|
6461
|
+
if (this._point) this._context.closePath();
|
|
6462
|
+
},
|
|
6463
|
+
point: function(x2, y2) {
|
|
6464
|
+
x2 = +x2, y2 = +y2;
|
|
6465
|
+
if (this._point) this._context.lineTo(x2, y2);
|
|
6466
|
+
else this._point = 1, this._context.moveTo(x2, y2);
|
|
6467
|
+
}
|
|
6468
|
+
};
|
|
6469
|
+
function linearClosed(context) {
|
|
6470
|
+
return new LinearClosed(context);
|
|
6471
|
+
}
|
|
6164
6472
|
function Natural(context) {
|
|
6165
6473
|
this._context = context;
|
|
6166
6474
|
}
|
|
@@ -7042,9 +7350,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
7042
7350
|
}
|
|
7043
7351
|
getComputedLayers() {
|
|
7044
7352
|
return this.layers.map((layer) => {
|
|
7045
|
-
let data =
|
|
7353
|
+
let data = layer.data.$group.map(
|
|
7046
7354
|
(_, i) => vvgeom[layer.geom].validate(object_map(layer.data, (k, v) => v?.[i]))
|
|
7047
|
-
).filter((x2) => x2 != null)
|
|
7355
|
+
).filter((x2) => x2 != null);
|
|
7048
7356
|
return { data, geom: layer.geom, vBind: layer.vBind };
|
|
7049
7357
|
});
|
|
7050
7358
|
}
|
|
@@ -7231,7 +7539,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
7231
7539
|
}
|
|
7232
7540
|
const _hoisted_1$e = ["font-size"];
|
|
7233
7541
|
const _hoisted_2$8 = { key: 0 };
|
|
7234
|
-
const _sfc_main$
|
|
7542
|
+
const _sfc_main$17 = {
|
|
7235
7543
|
__name: "CoreText",
|
|
7236
7544
|
props: {
|
|
7237
7545
|
x: { type: Number, default: 0 },
|
|
@@ -14482,7 +14790,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
14482
14790
|
XmlRenderer.prototype.esc = escapeXml;
|
|
14483
14791
|
const _hoisted_1$d = ["text-anchor", "font-size"];
|
|
14484
14792
|
const _hoisted_2$7 = { key: 0 };
|
|
14485
|
-
const _sfc_main$
|
|
14793
|
+
const _sfc_main$16 = {
|
|
14486
14794
|
__name: "CoreMarkdown",
|
|
14487
14795
|
props: {
|
|
14488
14796
|
x: { type: Number, default: 0 },
|
|
@@ -14629,7 +14937,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
14629
14937
|
};
|
|
14630
14938
|
}
|
|
14631
14939
|
};
|
|
14632
|
-
const _sfc_main$
|
|
14940
|
+
const _sfc_main$15 = {
|
|
14633
14941
|
__name: "CoreAxisLabel",
|
|
14634
14942
|
props: {
|
|
14635
14943
|
type: String,
|
|
@@ -14691,7 +14999,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
14691
14999
|
}
|
|
14692
15000
|
};
|
|
14693
15001
|
return (_ctx, _cache) => {
|
|
14694
|
-
return __props.type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
15002
|
+
return __props.type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ key: 0 }, vue.toHandlers(vOn)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ key: 1 }, vue.toHandlers(vOn)), null, 16));
|
|
14695
15003
|
};
|
|
14696
15004
|
}
|
|
14697
15005
|
};
|
|
@@ -14708,7 +15016,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
14708
15016
|
fill: "transparent"
|
|
14709
15017
|
};
|
|
14710
15018
|
const _hoisted_6$2 = ["x"];
|
|
14711
|
-
const _sfc_main$
|
|
15019
|
+
const _sfc_main$14 = {
|
|
14712
15020
|
__name: "CoreAxisH",
|
|
14713
15021
|
props: {
|
|
14714
15022
|
coord: String,
|
|
@@ -15074,7 +15382,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15074
15382
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
15075
15383
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
|
|
15076
15384
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
|
|
15077
|
-
vue.createVNode(_sfc_main$
|
|
15385
|
+
vue.createVNode(_sfc_main$15, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
|
|
15078
15386
|
], 16);
|
|
15079
15387
|
}), 256)),
|
|
15080
15388
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
@@ -15107,7 +15415,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15107
15415
|
])) : vue.createCommentVNode("", true),
|
|
15108
15416
|
_cache[5] || (_cache[5] = vue.createTextVNode()),
|
|
15109
15417
|
axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
15110
|
-
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
15418
|
+
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$16, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$17, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
|
|
15111
15419
|
], 64)) : vue.createCommentVNode("", true)
|
|
15112
15420
|
], 12, _hoisted_1$c);
|
|
15113
15421
|
};
|
|
@@ -15126,7 +15434,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15126
15434
|
fill: "transparent"
|
|
15127
15435
|
};
|
|
15128
15436
|
const _hoisted_6$1 = ["y"];
|
|
15129
|
-
const _sfc_main$
|
|
15437
|
+
const _sfc_main$13 = {
|
|
15130
15438
|
__name: "CoreAxisV",
|
|
15131
15439
|
props: {
|
|
15132
15440
|
coord: String,
|
|
@@ -15492,7 +15800,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15492
15800
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
15493
15801
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
|
|
15494
15802
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
|
|
15495
|
-
vue.createVNode(_sfc_main$
|
|
15803
|
+
vue.createVNode(_sfc_main$15, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
|
|
15496
15804
|
], 16);
|
|
15497
15805
|
}), 256)),
|
|
15498
15806
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
@@ -15525,13 +15833,13 @@ var VVPlot = (function(exports, vue) {
|
|
|
15525
15833
|
])) : vue.createCommentVNode("", true),
|
|
15526
15834
|
_cache[5] || (_cache[5] = vue.createTextVNode()),
|
|
15527
15835
|
axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
15528
|
-
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
15836
|
+
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$16, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$17, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
|
|
15529
15837
|
], 64)) : vue.createCommentVNode("", true)
|
|
15530
15838
|
], 12, _hoisted_1$b);
|
|
15531
15839
|
};
|
|
15532
15840
|
}
|
|
15533
15841
|
};
|
|
15534
|
-
const _sfc_main$
|
|
15842
|
+
const _sfc_main$12 = {
|
|
15535
15843
|
__name: "CoreAxis",
|
|
15536
15844
|
props: {
|
|
15537
15845
|
theme: { type: Object, default: () => ({}) },
|
|
@@ -15540,8 +15848,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
15540
15848
|
},
|
|
15541
15849
|
setup(__props) {
|
|
15542
15850
|
const axis = {
|
|
15543
|
-
h: _sfc_main$
|
|
15544
|
-
v: _sfc_main$
|
|
15851
|
+
h: _sfc_main$14,
|
|
15852
|
+
v: _sfc_main$13
|
|
15545
15853
|
};
|
|
15546
15854
|
return (_ctx, _cache) => {
|
|
15547
15855
|
return __props.position != "none" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(axis[__props.orientation]), {
|
|
@@ -15552,7 +15860,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15552
15860
|
};
|
|
15553
15861
|
}
|
|
15554
15862
|
};
|
|
15555
|
-
const _sfc_main
|
|
15863
|
+
const _sfc_main$11 = {
|
|
15556
15864
|
__name: "CoreGridH",
|
|
15557
15865
|
props: {
|
|
15558
15866
|
breaks: { type: Array, default: () => [] },
|
|
@@ -15624,7 +15932,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15624
15932
|
};
|
|
15625
15933
|
}
|
|
15626
15934
|
};
|
|
15627
|
-
const _sfc_main$
|
|
15935
|
+
const _sfc_main$10 = {
|
|
15628
15936
|
__name: "CoreGridV",
|
|
15629
15937
|
props: {
|
|
15630
15938
|
breaks: { type: Array, default: () => [] },
|
|
@@ -15696,7 +16004,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15696
16004
|
};
|
|
15697
16005
|
}
|
|
15698
16006
|
};
|
|
15699
|
-
const _sfc_main
|
|
16007
|
+
const _sfc_main$$ = {
|
|
15700
16008
|
__name: "CoreCanvasBoxplot",
|
|
15701
16009
|
props: {
|
|
15702
16010
|
extendX: { type: Number, default: 0 },
|
|
@@ -15730,88 +16038,81 @@ var VVPlot = (function(exports, vue) {
|
|
|
15730
16038
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
15731
16039
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
15732
16040
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
15733
|
-
for (
|
|
15734
|
-
|
|
15735
|
-
|
|
15736
|
-
|
|
15737
|
-
|
|
15738
|
-
|
|
15739
|
-
|
|
15740
|
-
|
|
15741
|
-
|
|
15742
|
-
|
|
15743
|
-
|
|
15744
|
-
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15748
|
-
|
|
15749
|
-
|
|
15750
|
-
|
|
15751
|
-
|
|
15752
|
-
|
|
15753
|
-
|
|
15754
|
-
|
|
15755
|
-
|
|
15756
|
-
|
|
15757
|
-
|
|
15758
|
-
|
|
15759
|
-
}
|
|
15760
|
-
|
|
15761
|
-
|
|
15762
|
-
|
|
15763
|
-
|
|
15764
|
-
|
|
15765
|
-
|
|
15766
|
-
|
|
15767
|
-
|
|
15768
|
-
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
16041
|
+
for (let {
|
|
16042
|
+
x: x2,
|
|
16043
|
+
xmin,
|
|
16044
|
+
xmax,
|
|
16045
|
+
y: y2,
|
|
16046
|
+
ymin,
|
|
16047
|
+
ymax,
|
|
16048
|
+
lwisker,
|
|
16049
|
+
Q1,
|
|
16050
|
+
median,
|
|
16051
|
+
Q3,
|
|
16052
|
+
uwisker,
|
|
16053
|
+
outliers,
|
|
16054
|
+
$xmin,
|
|
16055
|
+
$xmax,
|
|
16056
|
+
$ymin,
|
|
16057
|
+
$ymax,
|
|
16058
|
+
fill = "white",
|
|
16059
|
+
color: color2 = "black",
|
|
16060
|
+
linewidth = 1,
|
|
16061
|
+
linetype,
|
|
16062
|
+
alpha: alpha2,
|
|
16063
|
+
"translate-x": translateX = 0,
|
|
16064
|
+
"translate-y": translateY = 0,
|
|
16065
|
+
$raw
|
|
16066
|
+
} of __props.data) {
|
|
16067
|
+
const { hmin: rx1, hmax: rx2, vmin: ry1, vmax: ry2 } = __props.coord2pos(x2 == null ? { ymin, ymax, xmin: Q1, xmax: Q3 } : { xmin, xmax, ymin: Q1, ymax: Q3 });
|
|
16068
|
+
const { h: lx1, v: ly1 } = __props.coord2pos(x2 == null ? { y: y2, x: lwisker } : { x: x2, y: lwisker });
|
|
16069
|
+
const { h: lx2, v: ly2 } = __props.coord2pos(x2 == null ? { y: y2, x: uwisker } : { x: x2, y: uwisker });
|
|
16070
|
+
const { h: mx1, v: my1 } = __props.coord2pos(x2 == null ? { y: ymin, x: median } : { x: xmin, y: median });
|
|
16071
|
+
const { h: mx2, v: my2 } = __props.coord2pos(x2 == null ? { y: ymax, x: median } : { x: xmax, y: median });
|
|
16072
|
+
const { h: uwx1, v: uwy1 } = __props.coord2pos(x2 == null ? { y: ymin * 0.25 + ymax * 0.75, x: uwisker } : { x: xmin * 0.25 + xmax * 0.75, y: uwisker });
|
|
16073
|
+
const { h: uwx2, v: uwy2 } = __props.coord2pos(x2 == null ? { y: ymin * 0.75 + ymax * 0.25, x: uwisker } : { x: xmin * 0.75 + xmax * 0.25, y: uwisker });
|
|
16074
|
+
const { h: lwx1, v: lwy1 } = __props.coord2pos(x2 == null ? { y: ymin * 0.25 + ymax * 0.75, x: lwisker } : { x: xmin * 0.25 + xmax * 0.75, y: lwisker });
|
|
16075
|
+
const { h: lwx2, v: lwy2 } = __props.coord2pos(x2 == null ? { y: ymin * 0.75 + ymax * 0.25, x: lwisker } : { x: xmin * 0.75 + xmax * 0.25, y: lwisker });
|
|
16076
|
+
ctx.globalAlpha = alpha2;
|
|
16077
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16078
|
+
const linepath2d = new Path2D();
|
|
16079
|
+
linepath2d.moveTo(lx1 + translateX, ly1 + translateY);
|
|
16080
|
+
linepath2d.lineTo(lx2 + translateX, ly2 + translateY);
|
|
16081
|
+
const wiskerpath2d = new Path2D();
|
|
16082
|
+
wiskerpath2d.moveTo(uwx1 + translateX, uwy1 + translateY);
|
|
16083
|
+
wiskerpath2d.lineTo(uwx2 + translateX, uwy2 + translateY);
|
|
16084
|
+
wiskerpath2d.moveTo(lwx1 + translateX, lwy1 + translateY);
|
|
16085
|
+
wiskerpath2d.lineTo(lwx2 + translateX, lwy2 + translateY);
|
|
16086
|
+
const rectpath2d = new Path2D();
|
|
16087
|
+
rectpath2d.rect(rx1 + translateX, ry1 + translateY, rx2 - rx1, ry2 - ry1);
|
|
16088
|
+
_path_data.set(rectpath2d, $raw);
|
|
16089
|
+
const medianpath2d = new Path2D();
|
|
16090
|
+
medianpath2d.moveTo(mx1 + translateX, my1 + translateY);
|
|
16091
|
+
medianpath2d.lineTo(mx2 + translateX, my2 + translateY);
|
|
16092
|
+
if (color2 != null && color2 !== "none") {
|
|
16093
|
+
ctx.strokeStyle = color2;
|
|
15780
16094
|
ctx.lineWidth = linewidth;
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15785
|
-
|
|
15786
|
-
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
ctx.fill(rectpath2d);
|
|
15791
|
-
}
|
|
15792
|
-
if (color2 != null) {
|
|
15793
|
-
ctx.strokeStyle = color2;
|
|
15794
|
-
ctx.stroke(rectpath2d);
|
|
15795
|
-
}
|
|
15796
|
-
_path_data.set(rectpath2d, $raw);
|
|
15797
|
-
const medianpath2d = new Path2D();
|
|
15798
|
-
medianpath2d.moveTo(mx1 + translateX, my1 + translateY);
|
|
15799
|
-
medianpath2d.lineTo(mx2 + translateX, my2 + translateY);
|
|
16095
|
+
ctx.stroke(linepath2d);
|
|
16096
|
+
ctx.stroke(wiskerpath2d);
|
|
16097
|
+
}
|
|
16098
|
+
if (fill !== "none") {
|
|
16099
|
+
ctx.fillStyle = fill;
|
|
16100
|
+
ctx.fill(rectpath2d);
|
|
16101
|
+
}
|
|
16102
|
+
if (color2 != null && color2 !== "none") {
|
|
16103
|
+
ctx.stroke(rectpath2d);
|
|
15800
16104
|
ctx.lineWidth = linewidth * 2;
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
}
|
|
15805
|
-
|
|
15806
|
-
|
|
15807
|
-
|
|
15808
|
-
|
|
15809
|
-
|
|
15810
|
-
ctx.fillStyle = color2;
|
|
15811
|
-
ctx.fill(outlierpath2d);
|
|
15812
|
-
}
|
|
15813
|
-
_path_data.set(outlierpath2d, $raw2);
|
|
16105
|
+
ctx.stroke(medianpath2d);
|
|
16106
|
+
}
|
|
16107
|
+
for (let { x: x3, y: y3, $raw: $raw2 } of outliers) {
|
|
16108
|
+
const { h: ox, v: oy } = __props.coord2pos({ x: x3, y: y3 });
|
|
16109
|
+
const outlierpath2d = new Path2D();
|
|
16110
|
+
outlierpath2d.arc(ox + translateX, oy + translateY, 2, 0, Math.PI * 2);
|
|
16111
|
+
if (color2 != null && color2 !== "none") {
|
|
16112
|
+
ctx.fillStyle = color2;
|
|
16113
|
+
ctx.fill(outlierpath2d);
|
|
15814
16114
|
}
|
|
16115
|
+
_path_data.set(outlierpath2d, $raw2);
|
|
15815
16116
|
}
|
|
15816
16117
|
}
|
|
15817
16118
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -15843,7 +16144,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15843
16144
|
};
|
|
15844
16145
|
}
|
|
15845
16146
|
};
|
|
15846
|
-
const _sfc_main$
|
|
16147
|
+
const _sfc_main$_ = {
|
|
15847
16148
|
__name: "CoreCanvasCurve",
|
|
15848
16149
|
props: {
|
|
15849
16150
|
extendX: { type: Number, default: 0 },
|
|
@@ -15877,41 +16178,39 @@ var VVPlot = (function(exports, vue) {
|
|
|
15877
16178
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
15878
16179
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
15879
16180
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
15880
|
-
for (
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
|
|
15891
|
-
|
|
15892
|
-
}
|
|
15893
|
-
|
|
15894
|
-
|
|
15895
|
-
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
|
|
15902
|
-
|
|
15903
|
-
|
|
15904
|
-
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
|
|
15913
|
-
ctx.stroke(path2d);
|
|
15914
|
-
}
|
|
16181
|
+
for (let {
|
|
16182
|
+
points,
|
|
16183
|
+
fill,
|
|
16184
|
+
color: color2,
|
|
16185
|
+
linewidth,
|
|
16186
|
+
linetype,
|
|
16187
|
+
alpha: alpha2,
|
|
16188
|
+
"translate-x": translateX = 0,
|
|
16189
|
+
"translate-y": translateY = 0,
|
|
16190
|
+
$raw,
|
|
16191
|
+
interpolate: interpolate2
|
|
16192
|
+
} of __props.data) {
|
|
16193
|
+
points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
|
|
16194
|
+
if (points.length === 0) continue;
|
|
16195
|
+
const path2d = new Path2D();
|
|
16196
|
+
let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
|
|
16197
|
+
let interpolator = interpolatorFn(path2d);
|
|
16198
|
+
interpolator.lineStart();
|
|
16199
|
+
for (let i = 0; i < points.length; i++) {
|
|
16200
|
+
interpolator.point(points[i].x + translateX, points[i].y + translateY);
|
|
16201
|
+
}
|
|
16202
|
+
interpolator.lineEnd();
|
|
16203
|
+
_path_data.set(path2d, $raw);
|
|
16204
|
+
ctx.lineWidth = linewidth;
|
|
16205
|
+
ctx.globalAlpha = alpha2;
|
|
16206
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16207
|
+
if (fill !== "none") {
|
|
16208
|
+
ctx.fillStyle = fill;
|
|
16209
|
+
ctx.fill(path2d);
|
|
16210
|
+
}
|
|
16211
|
+
if (color2 != null && color2 !== "none") {
|
|
16212
|
+
ctx.strokeStyle = color2;
|
|
16213
|
+
ctx.stroke(path2d);
|
|
15915
16214
|
}
|
|
15916
16215
|
}
|
|
15917
16216
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -15940,8 +16239,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
15940
16239
|
});
|
|
15941
16240
|
const interpolators = {
|
|
15942
16241
|
cardinal,
|
|
16242
|
+
cardinalClosed,
|
|
15943
16243
|
catmullRom,
|
|
16244
|
+
catmullRomClosed,
|
|
15944
16245
|
linear: curveLinear,
|
|
16246
|
+
linearClosed,
|
|
15945
16247
|
natural: natural$1
|
|
15946
16248
|
};
|
|
15947
16249
|
return (_ctx, _cache) => {
|
|
@@ -15949,7 +16251,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15949
16251
|
};
|
|
15950
16252
|
}
|
|
15951
16253
|
};
|
|
15952
|
-
const _sfc_main$
|
|
16254
|
+
const _sfc_main$Z = {
|
|
15953
16255
|
__name: "CoreCanvasEllipse",
|
|
15954
16256
|
props: {
|
|
15955
16257
|
extendX: { type: Number, default: 0 },
|
|
@@ -15983,46 +16285,44 @@ var VVPlot = (function(exports, vue) {
|
|
|
15983
16285
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
15984
16286
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
15985
16287
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
15986
|
-
for (
|
|
15987
|
-
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
|
|
16024
|
-
ctx.stroke(path2d);
|
|
16025
|
-
}
|
|
16288
|
+
for (let {
|
|
16289
|
+
cx,
|
|
16290
|
+
cy,
|
|
16291
|
+
A,
|
|
16292
|
+
B,
|
|
16293
|
+
C,
|
|
16294
|
+
fill,
|
|
16295
|
+
color: color2,
|
|
16296
|
+
linewidth,
|
|
16297
|
+
linetype,
|
|
16298
|
+
alpha: alpha2,
|
|
16299
|
+
"translate-x": translateX = 0,
|
|
16300
|
+
"translate-y": translateY = 0,
|
|
16301
|
+
$raw
|
|
16302
|
+
} of __props.data) {
|
|
16303
|
+
let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
|
|
16304
|
+
const { h: ch, v: cv } = __props.coord2pos({ x: cx, y: cy });
|
|
16305
|
+
let { h: h1, v: v1 } = __props.coord2pos({ x: cx - dx, y: cy - dy }), { h: h2, v: v2 } = __props.coord2pos({ x: cx + dx, y: cy + dy });
|
|
16306
|
+
let scaleX = (h2 - h1) / (2 * dx), scaleY = (v2 - v1) / (2 * dy);
|
|
16307
|
+
A /= scaleX * scaleX;
|
|
16308
|
+
B /= scaleX * scaleY;
|
|
16309
|
+
C /= scaleY * scaleY;
|
|
16310
|
+
const tr = A + C, det = A * C - B * B;
|
|
16311
|
+
const disc = Math.sqrt(Math.max(0, tr * tr / 4 - det));
|
|
16312
|
+
let rx2 = 1 / Math.sqrt(tr / 2 + disc), ry = 1 / Math.sqrt(tr / 2 - disc), angle2 = Math.atan2(2 * B, A - C) / 2;
|
|
16313
|
+
const path2d = new Path2D();
|
|
16314
|
+
path2d.ellipse(ch + translateX, cv + translateY, rx2, ry, angle2, 0, 2 * Math.PI);
|
|
16315
|
+
_path_data.set(path2d, $raw);
|
|
16316
|
+
ctx.lineWidth = linewidth;
|
|
16317
|
+
ctx.globalAlpha = alpha2;
|
|
16318
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16319
|
+
if (fill !== "none") {
|
|
16320
|
+
ctx.fillStyle = fill;
|
|
16321
|
+
ctx.fill(path2d);
|
|
16322
|
+
}
|
|
16323
|
+
if (color2 != null && color2 !== "none") {
|
|
16324
|
+
ctx.strokeStyle = color2;
|
|
16325
|
+
ctx.stroke(path2d);
|
|
16026
16326
|
}
|
|
16027
16327
|
}
|
|
16028
16328
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16054,7 +16354,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16054
16354
|
};
|
|
16055
16355
|
}
|
|
16056
16356
|
};
|
|
16057
|
-
const _sfc_main$
|
|
16357
|
+
const _sfc_main$Y = {
|
|
16058
16358
|
__name: "CoreCanvasLine",
|
|
16059
16359
|
props: {
|
|
16060
16360
|
extendX: { type: Number, default: 0 },
|
|
@@ -16088,34 +16388,31 @@ var VVPlot = (function(exports, vue) {
|
|
|
16088
16388
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16089
16389
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16090
16390
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16091
|
-
for (
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
|
|
16104
|
-
}
|
|
16105
|
-
|
|
16106
|
-
|
|
16107
|
-
|
|
16108
|
-
|
|
16109
|
-
|
|
16110
|
-
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
ctx.
|
|
16115
|
-
|
|
16116
|
-
ctx.strokeStyle = color2;
|
|
16117
|
-
ctx.stroke(path2d);
|
|
16118
|
-
}
|
|
16391
|
+
for (let {
|
|
16392
|
+
x: x2,
|
|
16393
|
+
y: y2,
|
|
16394
|
+
xend,
|
|
16395
|
+
yend,
|
|
16396
|
+
color: color2 = "black",
|
|
16397
|
+
linewidth,
|
|
16398
|
+
alpha: alpha2,
|
|
16399
|
+
linetype,
|
|
16400
|
+
"translate-x": translateX = 0,
|
|
16401
|
+
"translate-y": translateY = 0,
|
|
16402
|
+
$raw
|
|
16403
|
+
} of __props.data) {
|
|
16404
|
+
const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
|
|
16405
|
+
const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
|
|
16406
|
+
const path2d = new Path2D();
|
|
16407
|
+
path2d.moveTo(x1 + translateX, y1 + translateY);
|
|
16408
|
+
path2d.lineTo(x22 + translateX, y22 + translateY);
|
|
16409
|
+
_path_data.set(path2d, $raw);
|
|
16410
|
+
ctx.lineWidth = linewidth;
|
|
16411
|
+
ctx.globalAlpha = alpha2;
|
|
16412
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16413
|
+
if (color2 != null && color2 !== "none") {
|
|
16414
|
+
ctx.strokeStyle = color2;
|
|
16415
|
+
ctx.stroke(path2d);
|
|
16119
16416
|
}
|
|
16120
16417
|
}
|
|
16121
16418
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16147,7 +16444,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16147
16444
|
};
|
|
16148
16445
|
}
|
|
16149
16446
|
};
|
|
16150
|
-
const _sfc_main$
|
|
16447
|
+
const _sfc_main$X = {
|
|
16151
16448
|
__name: "CoreCanvasPoint",
|
|
16152
16449
|
props: {
|
|
16153
16450
|
extendX: { type: Number, default: 0 },
|
|
@@ -16189,55 +16486,53 @@ var VVPlot = (function(exports, vue) {
|
|
|
16189
16486
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16190
16487
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16191
16488
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16192
|
-
for (
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
}
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
ctx.stroke(path2d);
|
|
16240
|
-
}
|
|
16489
|
+
for (let {
|
|
16490
|
+
x: x2,
|
|
16491
|
+
y: y2,
|
|
16492
|
+
size = 6,
|
|
16493
|
+
shape: shape2,
|
|
16494
|
+
color: color2,
|
|
16495
|
+
stroke,
|
|
16496
|
+
linewidth,
|
|
16497
|
+
linetype,
|
|
16498
|
+
alpha: alpha2,
|
|
16499
|
+
"translate-x": translateX = 0,
|
|
16500
|
+
"translate-y": translateY = 0,
|
|
16501
|
+
angle: angle2 = 0,
|
|
16502
|
+
$raw
|
|
16503
|
+
} of __props.data) {
|
|
16504
|
+
const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
|
|
16505
|
+
if (typeof angle2 == "object") {
|
|
16506
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16507
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16508
|
+
angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
|
|
16509
|
+
}
|
|
16510
|
+
const path2d = new Path2D();
|
|
16511
|
+
if (String(shape2).startsWith("path:")) {
|
|
16512
|
+
path2d.addPath(
|
|
16513
|
+
new Path2D(shape2.slice(5)),
|
|
16514
|
+
new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
|
|
16515
|
+
);
|
|
16516
|
+
} else if (shape2 in paths) {
|
|
16517
|
+
path2d.addPath(
|
|
16518
|
+
new Path2D(paths[shape2](size)),
|
|
16519
|
+
new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
|
|
16520
|
+
);
|
|
16521
|
+
} else {
|
|
16522
|
+
path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
|
|
16523
|
+
}
|
|
16524
|
+
_path_data.set(path2d, $raw);
|
|
16525
|
+
ctx.lineWidth = linewidth;
|
|
16526
|
+
ctx.globalAlpha = alpha2;
|
|
16527
|
+
ctx.beginPath();
|
|
16528
|
+
if (color2 !== "none") {
|
|
16529
|
+
ctx.fillStyle = color2;
|
|
16530
|
+
ctx.fill(path2d);
|
|
16531
|
+
}
|
|
16532
|
+
if (stroke != null && stroke !== "none") {
|
|
16533
|
+
ctx.strokeStyle = stroke;
|
|
16534
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16535
|
+
ctx.stroke(path2d);
|
|
16241
16536
|
}
|
|
16242
16537
|
}
|
|
16243
16538
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16269,7 +16564,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16269
16564
|
};
|
|
16270
16565
|
}
|
|
16271
16566
|
};
|
|
16272
|
-
const _sfc_main$
|
|
16567
|
+
const _sfc_main$W = {
|
|
16273
16568
|
__name: "CoreCanvasPolygon",
|
|
16274
16569
|
props: {
|
|
16275
16570
|
extendX: { type: Number, default: 0 },
|
|
@@ -16303,38 +16598,36 @@ var VVPlot = (function(exports, vue) {
|
|
|
16303
16598
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16304
16599
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16305
16600
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16306
|
-
for (
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
}
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
|
|
16334
|
-
|
|
16335
|
-
|
|
16336
|
-
ctx.stroke(path2d);
|
|
16337
|
-
}
|
|
16601
|
+
for (let {
|
|
16602
|
+
points,
|
|
16603
|
+
fill,
|
|
16604
|
+
color: color2,
|
|
16605
|
+
linewidth,
|
|
16606
|
+
linetype,
|
|
16607
|
+
alpha: alpha2,
|
|
16608
|
+
"translate-x": translateX = 0,
|
|
16609
|
+
"translate-y": translateY = 0,
|
|
16610
|
+
$raw
|
|
16611
|
+
} of __props.data) {
|
|
16612
|
+
points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
|
|
16613
|
+
if (points.length === 0) continue;
|
|
16614
|
+
const path2d = new Path2D();
|
|
16615
|
+
path2d.moveTo(points[0].x + translateX, points[0].y + translateY);
|
|
16616
|
+
for (let i = 1; i < points.length; i++) {
|
|
16617
|
+
path2d.lineTo(points[i].x + translateX, points[i].y + translateY);
|
|
16618
|
+
}
|
|
16619
|
+
path2d.closePath();
|
|
16620
|
+
_path_data.set(path2d, $raw);
|
|
16621
|
+
ctx.lineWidth = linewidth;
|
|
16622
|
+
ctx.globalAlpha = alpha2;
|
|
16623
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16624
|
+
if (fill !== "none") {
|
|
16625
|
+
ctx.fillStyle = fill;
|
|
16626
|
+
ctx.fill(path2d);
|
|
16627
|
+
}
|
|
16628
|
+
if (color2 != null && color2 !== "none") {
|
|
16629
|
+
ctx.strokeStyle = color2;
|
|
16630
|
+
ctx.stroke(path2d);
|
|
16338
16631
|
}
|
|
16339
16632
|
}
|
|
16340
16633
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16366,7 +16659,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16366
16659
|
};
|
|
16367
16660
|
}
|
|
16368
16661
|
};
|
|
16369
|
-
const _sfc_main$
|
|
16662
|
+
const _sfc_main$V = {
|
|
16370
16663
|
__name: "CoreCanvasRect",
|
|
16371
16664
|
props: {
|
|
16372
16665
|
extendX: { type: Number, default: 0 },
|
|
@@ -16400,36 +16693,34 @@ var VVPlot = (function(exports, vue) {
|
|
|
16400
16693
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16401
16694
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16402
16695
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16403
|
-
for (
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
|
|
16409
|
-
|
|
16410
|
-
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
}
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
|
|
16422
|
-
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
-
|
|
16428
|
-
|
|
16429
|
-
|
|
16430
|
-
|
|
16431
|
-
ctx.stroke(path2d);
|
|
16432
|
-
}
|
|
16696
|
+
for (let {
|
|
16697
|
+
xmin,
|
|
16698
|
+
xmax,
|
|
16699
|
+
ymin,
|
|
16700
|
+
ymax,
|
|
16701
|
+
fill,
|
|
16702
|
+
color: color2,
|
|
16703
|
+
linewidth,
|
|
16704
|
+
linetype,
|
|
16705
|
+
alpha: alpha2,
|
|
16706
|
+
"translate-x": translateX = 0,
|
|
16707
|
+
"translate-y": translateY = 0,
|
|
16708
|
+
$raw
|
|
16709
|
+
} of __props.data) {
|
|
16710
|
+
const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
|
|
16711
|
+
const path2d = new Path2D();
|
|
16712
|
+
path2d.rect(x1 + translateX, y1 + translateY, x2 - x1, y2 - y1);
|
|
16713
|
+
_path_data.set(path2d, $raw);
|
|
16714
|
+
ctx.lineWidth = linewidth;
|
|
16715
|
+
ctx.globalAlpha = alpha2;
|
|
16716
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16717
|
+
if (fill !== "none") {
|
|
16718
|
+
ctx.fillStyle = fill;
|
|
16719
|
+
ctx.fill(path2d);
|
|
16720
|
+
}
|
|
16721
|
+
if (color2 !== "none" && color2 != null) {
|
|
16722
|
+
ctx.strokeStyle = color2;
|
|
16723
|
+
ctx.stroke(path2d);
|
|
16433
16724
|
}
|
|
16434
16725
|
}
|
|
16435
16726
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16461,7 +16752,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16461
16752
|
};
|
|
16462
16753
|
}
|
|
16463
16754
|
};
|
|
16464
|
-
const _sfc_main$
|
|
16755
|
+
const _sfc_main$U = {
|
|
16465
16756
|
__name: "CoreCanvasText",
|
|
16466
16757
|
props: {
|
|
16467
16758
|
extendX: { type: Number, default: 0 },
|
|
@@ -16495,77 +16786,75 @@ var VVPlot = (function(exports, vue) {
|
|
|
16495
16786
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16496
16787
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16497
16788
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16498
|
-
for (
|
|
16499
|
-
|
|
16500
|
-
|
|
16501
|
-
|
|
16502
|
-
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
|
|
16532
|
-
|
|
16533
|
-
|
|
16534
|
-
|
|
16535
|
-
|
|
16536
|
-
|
|
16537
|
-
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
}
|
|
16551
|
-
|
|
16552
|
-
|
|
16553
|
-
|
|
16554
|
-
|
|
16555
|
-
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
|
|
16559
|
-
|
|
16560
|
-
|
|
16561
|
-
ctx.fillText(label, 0, 0);
|
|
16562
|
-
}
|
|
16563
|
-
if (stroke != null) {
|
|
16564
|
-
ctx.strokeStyle = stroke;
|
|
16565
|
-
ctx.strokeText(label, 0, 0);
|
|
16566
|
-
}
|
|
16567
|
-
ctx.restore();
|
|
16789
|
+
for (let {
|
|
16790
|
+
x: x2,
|
|
16791
|
+
y: y2,
|
|
16792
|
+
color: color2,
|
|
16793
|
+
size = 4,
|
|
16794
|
+
label = "",
|
|
16795
|
+
title,
|
|
16796
|
+
stroke,
|
|
16797
|
+
linewidth,
|
|
16798
|
+
linetype,
|
|
16799
|
+
alpha: alpha2,
|
|
16800
|
+
"anchor-x": anchorX,
|
|
16801
|
+
"anchor-y": anchorY,
|
|
16802
|
+
"dock-x": dockX,
|
|
16803
|
+
"dock-y": dockY,
|
|
16804
|
+
"translate-x": translateX = 0,
|
|
16805
|
+
"translate-y": translateY = 0,
|
|
16806
|
+
angle: angle2,
|
|
16807
|
+
"text-length": textLength,
|
|
16808
|
+
"font-family": fontFamily = "sans-serif",
|
|
16809
|
+
$raw
|
|
16810
|
+
} of __props.data) {
|
|
16811
|
+
ctx.save();
|
|
16812
|
+
const { h: tx, v: ty } = __props.coord2pos({ x: x2, y: y2 });
|
|
16813
|
+
ctx.textAlign = "center";
|
|
16814
|
+
ctx.textBaseline = "middle";
|
|
16815
|
+
ctx.lineWidth = linewidth;
|
|
16816
|
+
ctx.globalAlpha = alpha2;
|
|
16817
|
+
ctx.font = `${size * 4}px ${fontFamily}`;
|
|
16818
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16819
|
+
ctx.translate(tx + translateX, ty + translateY);
|
|
16820
|
+
let { width: w, fontBoundingBoxAscent: a, fontBoundingBoxDescent: d } = ctx.measureText(label), width = w, height = a + d;
|
|
16821
|
+
if (typeof textLength == "object") {
|
|
16822
|
+
let { x: lx = 0, y: ly = 0 } = textLength;
|
|
16823
|
+
let { h: h1, v: v1 } = __props.coord2pos({ x: x2 + lx / 2, y: y2 + ly / 2 }), { h: h2, v: v2 } = __props.coord2pos({ x: x2 - lx / 2, y: y2 - ly / 2 });
|
|
16824
|
+
width = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
|
|
16825
|
+
} else if (textLength != null) {
|
|
16826
|
+
width = textLength;
|
|
16827
|
+
}
|
|
16828
|
+
if (typeof angle2 == "object") {
|
|
16829
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16830
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16831
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
16832
|
+
}
|
|
16833
|
+
if (dockX != null || dockY != null) {
|
|
16834
|
+
let alnX = { left: 0, center: 0.5, right: 1 }[dockX] ?? +(dockX ?? 0.5), alnY = { bottom: 0, center: 0.5, top: 1 }[dockY] ?? +(dockY ?? 0.5);
|
|
16835
|
+
if (isNaN(alnX)) alnX = 0.5;
|
|
16836
|
+
if (isNaN(alnY)) alnY = 0.5;
|
|
16837
|
+
let w2 = width * Math.abs(Math.cos(angle2 * Math.PI / 180)) + height * Math.abs(Math.sin(angle2 * Math.PI / 180)), h = width * Math.abs(Math.sin(angle2 * Math.PI / 180)) + height * Math.abs(Math.cos(angle2 * Math.PI / 180));
|
|
16838
|
+
ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
|
|
16839
|
+
ctx.rotate(angle2 * Math.PI / 180);
|
|
16840
|
+
} else {
|
|
16841
|
+
let alnX = { left: 0, center: 0.5, right: 1 }[anchorX] ?? +(anchorX ?? 0.5), alnY = { bottom: 0, center: 0.5, top: 1 }[anchorY] ?? +(anchorY ?? 0.5);
|
|
16842
|
+
if (isNaN(alnX)) alnX = 0.5;
|
|
16843
|
+
if (isNaN(alnY)) alnY = 0.5;
|
|
16844
|
+
let w2 = width, h = height;
|
|
16845
|
+
ctx.rotate(angle2 * Math.PI / 180);
|
|
16846
|
+
ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
|
|
16847
|
+
}
|
|
16848
|
+
if (width != w) ctx.scale(width / w, 1);
|
|
16849
|
+
if (color2 !== "none") {
|
|
16850
|
+
ctx.fillStyle = color2;
|
|
16851
|
+
ctx.fillText(label, 0, 0);
|
|
16568
16852
|
}
|
|
16853
|
+
if (stroke != null && stroke !== "none") {
|
|
16854
|
+
ctx.strokeStyle = stroke;
|
|
16855
|
+
ctx.strokeText(label, 0, 0);
|
|
16856
|
+
}
|
|
16857
|
+
ctx.restore();
|
|
16569
16858
|
}
|
|
16570
16859
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
16571
16860
|
path_data.set(path2, _path_data.get(path2));
|
|
@@ -16596,7 +16885,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16596
16885
|
};
|
|
16597
16886
|
}
|
|
16598
16887
|
};
|
|
16599
|
-
const _sfc_main$
|
|
16888
|
+
const _sfc_main$T = {
|
|
16600
16889
|
__name: "CoreCanvasTextsegment",
|
|
16601
16890
|
props: {
|
|
16602
16891
|
extendX: { type: Number, default: 0 },
|
|
@@ -16630,100 +16919,98 @@ var VVPlot = (function(exports, vue) {
|
|
|
16630
16919
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16631
16920
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16632
16921
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16633
|
-
for (
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
16638
|
-
|
|
16639
|
-
|
|
16640
|
-
|
|
16641
|
-
|
|
16642
|
-
|
|
16643
|
-
|
|
16644
|
-
|
|
16645
|
-
|
|
16646
|
-
|
|
16647
|
-
|
|
16648
|
-
|
|
16649
|
-
|
|
16650
|
-
|
|
16651
|
-
|
|
16652
|
-
|
|
16653
|
-
|
|
16654
|
-
|
|
16655
|
-
}
|
|
16656
|
-
|
|
16657
|
-
|
|
16658
|
-
|
|
16659
|
-
|
|
16660
|
-
|
|
16661
|
-
|
|
16662
|
-
|
|
16663
|
-
|
|
16664
|
-
|
|
16665
|
-
|
|
16666
|
-
|
|
16667
|
-
|
|
16668
|
-
|
|
16669
|
-
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16685
|
-
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
|
|
16922
|
+
for (let {
|
|
16923
|
+
x: x2,
|
|
16924
|
+
xend,
|
|
16925
|
+
y: y2,
|
|
16926
|
+
yend,
|
|
16927
|
+
size = 4,
|
|
16928
|
+
label = "",
|
|
16929
|
+
title,
|
|
16930
|
+
color: color2,
|
|
16931
|
+
stroke,
|
|
16932
|
+
linewidth,
|
|
16933
|
+
linetype,
|
|
16934
|
+
alpha: alpha2,
|
|
16935
|
+
"translate-x": translateX = 0,
|
|
16936
|
+
"translate-y": translateY = 0,
|
|
16937
|
+
"text-length": textLength,
|
|
16938
|
+
"font-family": fontFamily = "sans-serif",
|
|
16939
|
+
"text-align": textAlign = "justify",
|
|
16940
|
+
angle: angle2 = "auto",
|
|
16941
|
+
inset = 0,
|
|
16942
|
+
$raw
|
|
16943
|
+
} of __props.data) {
|
|
16944
|
+
const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
|
|
16945
|
+
const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
|
|
16946
|
+
ctx.save();
|
|
16947
|
+
ctx.translate(translateX, translateY);
|
|
16948
|
+
ctx.textBaseline = "middle";
|
|
16949
|
+
ctx.lineWidth = linewidth;
|
|
16950
|
+
ctx.globalAlpha = alpha2;
|
|
16951
|
+
ctx.font = `${size * 4}px ${fontFamily}`;
|
|
16952
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16953
|
+
if (["stretch", "pre", "start", "center", "end", "post"].includes(textAlign)) {
|
|
16954
|
+
let radian = Math.atan2(y22 - y1, x22 - x1);
|
|
16955
|
+
let text2 = String(label).replace(/\x01|\x02/g, "");
|
|
16956
|
+
let insetX = Math.cos(radian) * inset, insetY = Math.sin(radian) * inset;
|
|
16957
|
+
switch (textAlign) {
|
|
16958
|
+
case "stretch":
|
|
16959
|
+
case "center":
|
|
16960
|
+
ctx.translate((x1 + x22) / 2, (y1 + y22) / 2);
|
|
16961
|
+
ctx.textAlign = "center";
|
|
16962
|
+
break;
|
|
16963
|
+
case "pre":
|
|
16964
|
+
ctx.translate(x1 - insetX, y1 - insetY);
|
|
16965
|
+
ctx.textAlign = "end";
|
|
16966
|
+
break;
|
|
16967
|
+
case "start":
|
|
16968
|
+
ctx.translate(x1 + insetX, y1 + insetY);
|
|
16969
|
+
ctx.textAlign = "start";
|
|
16970
|
+
break;
|
|
16971
|
+
case "end":
|
|
16972
|
+
ctx.translate(x22 - insetX, y22 - insetY);
|
|
16973
|
+
ctx.textAlign = "end";
|
|
16974
|
+
break;
|
|
16975
|
+
case "post":
|
|
16976
|
+
ctx.translate(x22 + insetX, y22 + insetY);
|
|
16977
|
+
ctx.textAlign = "start";
|
|
16978
|
+
break;
|
|
16979
|
+
}
|
|
16980
|
+
ctx.rotate(radian);
|
|
16981
|
+
if (textAlign === "stretch") {
|
|
16982
|
+
ctx.scale(Math.hypot(x22 - x1 || 0, y22 - y1 || 0) / ctx.measureText(text2).width, 1);
|
|
16983
|
+
}
|
|
16984
|
+
if (color2 !== "none") {
|
|
16985
|
+
ctx.fillStyle = color2;
|
|
16986
|
+
ctx.fillText(text2, 0, 0);
|
|
16987
|
+
}
|
|
16988
|
+
if (stroke != null && stroke !== "none") {
|
|
16989
|
+
ctx.strokeStyle = stroke;
|
|
16990
|
+
ctx.strokeText(text2, 0, 0);
|
|
16991
|
+
}
|
|
16992
|
+
} else {
|
|
16993
|
+
let radian = angle2 === "auto" ? Math.atan2(y22 - y1, x22 - x1) : angle2 * Math.PI / 180;
|
|
16994
|
+
ctx.textAlign = "center";
|
|
16995
|
+
let parts = splitLabel(String(label));
|
|
16996
|
+
let dx = (x22 - x1) / (parts.length - 1 || 1), dy = (y22 - y1) / (parts.length - 1 || 1);
|
|
16997
|
+
for (let i = 0; i < parts.length; i++) {
|
|
16998
|
+
ctx.save();
|
|
16999
|
+
ctx.translate(x1 + i * dx, y1 + i * dy);
|
|
16692
17000
|
ctx.rotate(radian);
|
|
16693
|
-
|
|
16694
|
-
ctx.scale(Math.hypot(x22 - x1 || 0, y22 - y1 || 0) / ctx.measureText(text2).width, 1);
|
|
16695
|
-
}
|
|
17001
|
+
let text2 = parts[i];
|
|
16696
17002
|
if (color2 !== "none") {
|
|
16697
17003
|
ctx.fillStyle = color2;
|
|
16698
17004
|
ctx.fillText(text2, 0, 0);
|
|
16699
17005
|
}
|
|
16700
|
-
if (stroke != null) {
|
|
17006
|
+
if (stroke != null && stroke !== "none") {
|
|
16701
17007
|
ctx.strokeStyle = stroke;
|
|
16702
17008
|
ctx.strokeText(text2, 0, 0);
|
|
16703
17009
|
}
|
|
16704
|
-
|
|
16705
|
-
let radian = angle2 === "auto" ? Math.atan2(y22 - y1, x22 - x1) : angle2 * Math.PI / 180;
|
|
16706
|
-
ctx.textAlign = "center";
|
|
16707
|
-
let parts = splitLabel(String(label));
|
|
16708
|
-
let dx = (x22 - x1) / (parts.length - 1 || 1), dy = (y22 - y1) / (parts.length - 1 || 1);
|
|
16709
|
-
for (let i = 0; i < parts.length; i++) {
|
|
16710
|
-
ctx.save();
|
|
16711
|
-
ctx.translate(x1 + i * dx, y1 + i * dy);
|
|
16712
|
-
ctx.rotate(radian);
|
|
16713
|
-
let text2 = parts[i];
|
|
16714
|
-
if (color2 !== "none") {
|
|
16715
|
-
ctx.fillStyle = color2;
|
|
16716
|
-
ctx.fillText(text2, 0, 0);
|
|
16717
|
-
}
|
|
16718
|
-
if (stroke != null) {
|
|
16719
|
-
ctx.strokeStyle = stroke;
|
|
16720
|
-
ctx.strokeText(text2, 0, 0);
|
|
16721
|
-
}
|
|
16722
|
-
ctx.restore();
|
|
16723
|
-
}
|
|
17010
|
+
ctx.restore();
|
|
16724
17011
|
}
|
|
16725
|
-
ctx.restore();
|
|
16726
17012
|
}
|
|
17013
|
+
ctx.restore();
|
|
16727
17014
|
}
|
|
16728
17015
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
16729
17016
|
path_data.set(path2, _path_data.get(path2));
|
|
@@ -16770,19 +17057,20 @@ var VVPlot = (function(exports, vue) {
|
|
|
16770
17057
|
};
|
|
16771
17058
|
const canvas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16772
17059
|
__proto__: null,
|
|
16773
|
-
boxplot: _sfc_main
|
|
16774
|
-
curve: _sfc_main$
|
|
16775
|
-
ellipse: _sfc_main$
|
|
16776
|
-
line: _sfc_main$
|
|
16777
|
-
point: _sfc_main$
|
|
16778
|
-
polygon: _sfc_main$
|
|
16779
|
-
rect: _sfc_main$
|
|
16780
|
-
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
17060
|
+
boxplot: _sfc_main$$,
|
|
17061
|
+
curve: _sfc_main$_,
|
|
17062
|
+
ellipse: _sfc_main$Z,
|
|
17063
|
+
line: _sfc_main$Y,
|
|
17064
|
+
point: _sfc_main$X,
|
|
17065
|
+
polygon: _sfc_main$W,
|
|
17066
|
+
rect: _sfc_main$V,
|
|
17067
|
+
shape: _sfc_main$_,
|
|
17068
|
+
stick: _sfc_main$Y,
|
|
17069
|
+
text: _sfc_main$U,
|
|
17070
|
+
textsegment: _sfc_main$T,
|
|
17071
|
+
tile: _sfc_main$V
|
|
16784
17072
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16785
|
-
const _sfc_main$
|
|
17073
|
+
const _sfc_main$S = {
|
|
16786
17074
|
__name: "CoreSvgBlank",
|
|
16787
17075
|
props: {
|
|
16788
17076
|
extendX: { type: Number, default: 0 },
|
|
@@ -16802,7 +17090,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16802
17090
|
}
|
|
16803
17091
|
};
|
|
16804
17092
|
const _hoisted_1$a = { key: 0 };
|
|
16805
|
-
const _sfc_main$
|
|
17093
|
+
const _sfc_main$R = {
|
|
16806
17094
|
__name: "CoreTile",
|
|
16807
17095
|
props: {
|
|
16808
17096
|
x: { type: Number, default: 0 },
|
|
@@ -16844,7 +17132,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16844
17132
|
};
|
|
16845
17133
|
const _hoisted_1$9 = { key: 0 };
|
|
16846
17134
|
const _hoisted_2$4 = { key: 0 };
|
|
16847
|
-
const _sfc_main$
|
|
17135
|
+
const _sfc_main$Q = {
|
|
16848
17136
|
__name: "CorePoint",
|
|
16849
17137
|
props: {
|
|
16850
17138
|
x: { type: Number, default: 0 },
|
|
@@ -16903,7 +17191,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16903
17191
|
}
|
|
16904
17192
|
};
|
|
16905
17193
|
const _hoisted_1$8 = { key: 0 };
|
|
16906
|
-
const _sfc_main$
|
|
17194
|
+
const _sfc_main$P = {
|
|
16907
17195
|
__name: "CoreLine",
|
|
16908
17196
|
props: {
|
|
16909
17197
|
x1: { type: Number, default: 0 },
|
|
@@ -16941,7 +17229,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16941
17229
|
};
|
|
16942
17230
|
}
|
|
16943
17231
|
};
|
|
16944
|
-
const _sfc_main$
|
|
17232
|
+
const _sfc_main$O = {
|
|
16945
17233
|
__name: "CoreSvgBoxplot",
|
|
16946
17234
|
props: {
|
|
16947
17235
|
extendX: { type: Number, default: 0 },
|
|
@@ -16959,7 +17247,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16959
17247
|
const emit = __emit;
|
|
16960
17248
|
const binds = vue.computed(() => {
|
|
16961
17249
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
16962
|
-
return __props.data.map((group) => group.map(({
|
|
17250
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
16963
17251
|
x: x2,
|
|
16964
17252
|
xmin,
|
|
16965
17253
|
xmax,
|
|
@@ -17104,18 +17392,18 @@ var VVPlot = (function(exports, vue) {
|
|
|
17104
17392
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17105
17393
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbinds, von]) => {
|
|
17106
17394
|
return vue.openBlock(), vue.createElementBlock("g", null, [
|
|
17107
|
-
vue.createVNode(_sfc_main$
|
|
17395
|
+
vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
|
|
17108
17396
|
_cache[0] || (_cache[0] = vue.createTextVNode()),
|
|
17109
|
-
vue.createVNode(_sfc_main$
|
|
17397
|
+
vue.createVNode(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbinds.rect, vue.toHandlers(von)), null, 16),
|
|
17110
17398
|
_cache[1] || (_cache[1] = vue.createTextVNode()),
|
|
17111
|
-
vue.createVNode(_sfc_main$
|
|
17399
|
+
vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.midline), null, 16),
|
|
17112
17400
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
17113
|
-
vue.createVNode(_sfc_main$
|
|
17401
|
+
vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
|
|
17114
17402
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
17115
|
-
vue.createVNode(_sfc_main$
|
|
17403
|
+
vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
|
|
17116
17404
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
17117
17405
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vbinds.outliers, ([vbind, von2]) => {
|
|
17118
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17406
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von2)), null, 16);
|
|
17119
17407
|
}), 256))
|
|
17120
17408
|
]);
|
|
17121
17409
|
}), 256))
|
|
@@ -17126,14 +17414,13 @@ var VVPlot = (function(exports, vue) {
|
|
|
17126
17414
|
}
|
|
17127
17415
|
};
|
|
17128
17416
|
const _hoisted_1$7 = { key: 0 };
|
|
17129
|
-
const _sfc_main$
|
|
17417
|
+
const _sfc_main$N = {
|
|
17130
17418
|
__name: "CoreCurve",
|
|
17131
17419
|
props: {
|
|
17132
17420
|
points: { type: Array, default: () => [] },
|
|
17133
17421
|
interpolate: { default: "natural" },
|
|
17134
|
-
fill:
|
|
17422
|
+
fill: String,
|
|
17135
17423
|
color: String,
|
|
17136
|
-
stroke: String,
|
|
17137
17424
|
linewidth: Number,
|
|
17138
17425
|
linetype: String,
|
|
17139
17426
|
alpha: { type: Number, default: 1 },
|
|
@@ -17158,8 +17445,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
17158
17445
|
});
|
|
17159
17446
|
const interpolators = {
|
|
17160
17447
|
cardinal,
|
|
17448
|
+
cardinalClosed,
|
|
17161
17449
|
catmullRom,
|
|
17450
|
+
catmullRomClosed,
|
|
17162
17451
|
linear: curveLinear,
|
|
17452
|
+
linearClosed,
|
|
17163
17453
|
natural: natural$1
|
|
17164
17454
|
};
|
|
17165
17455
|
return (_ctx, _cache) => {
|
|
@@ -17169,7 +17459,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17169
17459
|
};
|
|
17170
17460
|
}
|
|
17171
17461
|
};
|
|
17172
|
-
const _sfc_main$
|
|
17462
|
+
const _sfc_main$M = {
|
|
17173
17463
|
__name: "CoreSvgCurve",
|
|
17174
17464
|
props: {
|
|
17175
17465
|
extendX: { type: Number, default: 0 },
|
|
@@ -17187,10 +17477,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
17187
17477
|
const emit = __emit;
|
|
17188
17478
|
const binds = vue.computed(() => {
|
|
17189
17479
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17190
|
-
return __props.data.map((group) => group.map(({
|
|
17480
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17191
17481
|
points,
|
|
17192
|
-
fill
|
|
17193
|
-
color: color2
|
|
17482
|
+
fill,
|
|
17483
|
+
color: color2,
|
|
17194
17484
|
linewidth,
|
|
17195
17485
|
linetype,
|
|
17196
17486
|
alpha: alpha2,
|
|
@@ -17233,7 +17523,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17233
17523
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17234
17524
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17235
17525
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17236
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17526
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17237
17527
|
}), 256))
|
|
17238
17528
|
], 16);
|
|
17239
17529
|
}), 256))
|
|
@@ -17242,7 +17532,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17242
17532
|
}
|
|
17243
17533
|
};
|
|
17244
17534
|
const _hoisted_1$6 = { key: 0 };
|
|
17245
|
-
const _sfc_main$
|
|
17535
|
+
const _sfc_main$L = {
|
|
17246
17536
|
__name: "CoreEllipse",
|
|
17247
17537
|
props: {
|
|
17248
17538
|
cx: { type: Number, default: 0 },
|
|
@@ -17287,7 +17577,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17287
17577
|
};
|
|
17288
17578
|
}
|
|
17289
17579
|
};
|
|
17290
|
-
const _sfc_main$
|
|
17580
|
+
const _sfc_main$K = {
|
|
17291
17581
|
__name: "CoreSvgEllipse",
|
|
17292
17582
|
props: {
|
|
17293
17583
|
extendX: { type: Number, default: 0 },
|
|
@@ -17305,14 +17595,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
17305
17595
|
const emit = __emit;
|
|
17306
17596
|
const binds = vue.computed(() => {
|
|
17307
17597
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17308
|
-
return __props.data.map((group) => group.map(({
|
|
17598
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17309
17599
|
cx,
|
|
17310
17600
|
cy,
|
|
17311
17601
|
A,
|
|
17312
17602
|
B,
|
|
17313
17603
|
C,
|
|
17314
|
-
fill
|
|
17315
|
-
color: color2
|
|
17604
|
+
fill,
|
|
17605
|
+
color: color2,
|
|
17316
17606
|
linewidth,
|
|
17317
17607
|
linetype,
|
|
17318
17608
|
alpha: alpha2,
|
|
@@ -17361,7 +17651,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17361
17651
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17362
17652
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17363
17653
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17364
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17654
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$L, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17365
17655
|
}), 256))
|
|
17366
17656
|
], 16);
|
|
17367
17657
|
}), 256))
|
|
@@ -17369,7 +17659,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17369
17659
|
};
|
|
17370
17660
|
}
|
|
17371
17661
|
};
|
|
17372
|
-
const _sfc_main$
|
|
17662
|
+
const _sfc_main$J = {
|
|
17373
17663
|
__name: "CoreSvgLine",
|
|
17374
17664
|
props: {
|
|
17375
17665
|
extendX: { type: Number, default: 0 },
|
|
@@ -17387,7 +17677,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17387
17677
|
const emit = __emit;
|
|
17388
17678
|
const binds = vue.computed(() => {
|
|
17389
17679
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17390
|
-
return __props.data.map((group) => group.map(({
|
|
17680
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17391
17681
|
x: x2,
|
|
17392
17682
|
y: y2,
|
|
17393
17683
|
xend,
|
|
@@ -17436,7 +17726,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17436
17726
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17437
17727
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17438
17728
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17439
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17729
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17440
17730
|
}), 256))
|
|
17441
17731
|
], 16);
|
|
17442
17732
|
}), 256))
|
|
@@ -17444,7 +17734,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17444
17734
|
};
|
|
17445
17735
|
}
|
|
17446
17736
|
};
|
|
17447
|
-
const _sfc_main$
|
|
17737
|
+
const _sfc_main$I = {
|
|
17448
17738
|
__name: "CoreSvgMarkdown",
|
|
17449
17739
|
props: {
|
|
17450
17740
|
extendX: { type: Number, default: 0 },
|
|
@@ -17462,7 +17752,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17462
17752
|
const emit = __emit;
|
|
17463
17753
|
const binds = vue.computed(() => {
|
|
17464
17754
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17465
|
-
return __props.data.map((group) => group.map(({
|
|
17755
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17466
17756
|
x: x2,
|
|
17467
17757
|
y: y2,
|
|
17468
17758
|
size = 4,
|
|
@@ -17535,7 +17825,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17535
17825
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17536
17826
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17537
17827
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17538
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17828
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17539
17829
|
}), 256))
|
|
17540
17830
|
], 16);
|
|
17541
17831
|
}), 256))
|
|
@@ -17543,7 +17833,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17543
17833
|
};
|
|
17544
17834
|
}
|
|
17545
17835
|
};
|
|
17546
|
-
const _sfc_main$
|
|
17836
|
+
const _sfc_main$H = {
|
|
17547
17837
|
__name: "CoreSvgMarkdownsegment",
|
|
17548
17838
|
props: {
|
|
17549
17839
|
extendX: { type: Number, default: 0 },
|
|
@@ -17561,7 +17851,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17561
17851
|
const emit = __emit;
|
|
17562
17852
|
const binds = vue.computed(() => {
|
|
17563
17853
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17564
|
-
return __props.data.map((group) => group.map(({
|
|
17854
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17565
17855
|
x: x2,
|
|
17566
17856
|
xend,
|
|
17567
17857
|
y: y2,
|
|
@@ -17656,7 +17946,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17656
17946
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17657
17947
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17658
17948
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17659
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17949
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17660
17950
|
}), 256))
|
|
17661
17951
|
], 16);
|
|
17662
17952
|
}), 256))
|
|
@@ -17664,7 +17954,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17664
17954
|
};
|
|
17665
17955
|
}
|
|
17666
17956
|
};
|
|
17667
|
-
const _sfc_main$
|
|
17957
|
+
const _sfc_main$G = {
|
|
17668
17958
|
__name: "CoreSvgPoint",
|
|
17669
17959
|
props: {
|
|
17670
17960
|
extendX: { type: Number, default: 0 },
|
|
@@ -17682,10 +17972,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
17682
17972
|
const emit = __emit;
|
|
17683
17973
|
const binds = vue.computed(() => {
|
|
17684
17974
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17685
|
-
return __props.data.map((group) => group.map(({
|
|
17975
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17686
17976
|
x: x2,
|
|
17687
17977
|
y: y2,
|
|
17688
|
-
shape,
|
|
17978
|
+
shape: shape2,
|
|
17689
17979
|
size = 6,
|
|
17690
17980
|
color: color2,
|
|
17691
17981
|
stroke,
|
|
@@ -17710,7 +18000,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17710
18000
|
let vbind = {
|
|
17711
18001
|
x: cx,
|
|
17712
18002
|
y: cy,
|
|
17713
|
-
shape,
|
|
18003
|
+
shape: shape2,
|
|
17714
18004
|
size,
|
|
17715
18005
|
color: color2,
|
|
17716
18006
|
stroke,
|
|
@@ -17735,7 +18025,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17735
18025
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17736
18026
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17737
18027
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17738
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18028
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17739
18029
|
}), 256))
|
|
17740
18030
|
], 16);
|
|
17741
18031
|
}), 256))
|
|
@@ -17744,7 +18034,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17744
18034
|
}
|
|
17745
18035
|
};
|
|
17746
18036
|
const _hoisted_1$5 = { key: 0 };
|
|
17747
|
-
const _sfc_main$
|
|
18037
|
+
const _sfc_main$F = {
|
|
17748
18038
|
__name: "CorePolygon",
|
|
17749
18039
|
props: {
|
|
17750
18040
|
points: { type: Array, default: () => [] },
|
|
@@ -17778,7 +18068,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17778
18068
|
};
|
|
17779
18069
|
}
|
|
17780
18070
|
};
|
|
17781
|
-
const _sfc_main$
|
|
18071
|
+
const _sfc_main$E = {
|
|
17782
18072
|
__name: "CoreSvgPolygon",
|
|
17783
18073
|
props: {
|
|
17784
18074
|
extendX: { type: Number, default: 0 },
|
|
@@ -17796,7 +18086,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17796
18086
|
const emit = __emit;
|
|
17797
18087
|
const binds = vue.computed(() => {
|
|
17798
18088
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17799
|
-
return __props.data.map((group) => group.map(({
|
|
18089
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17800
18090
|
points,
|
|
17801
18091
|
fill,
|
|
17802
18092
|
color: color2,
|
|
@@ -17842,7 +18132,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17842
18132
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17843
18133
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17844
18134
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17845
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18135
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$F, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17846
18136
|
}), 256))
|
|
17847
18137
|
], 16);
|
|
17848
18138
|
}), 256))
|
|
@@ -17850,7 +18140,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17850
18140
|
};
|
|
17851
18141
|
}
|
|
17852
18142
|
};
|
|
17853
|
-
const _sfc_main$
|
|
18143
|
+
const _sfc_main$D = {
|
|
17854
18144
|
__name: "CoreSvgRect",
|
|
17855
18145
|
props: {
|
|
17856
18146
|
extendX: { type: Number, default: 0 },
|
|
@@ -17868,12 +18158,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
17868
18158
|
const emit = __emit;
|
|
17869
18159
|
const binds = vue.computed(() => {
|
|
17870
18160
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17871
|
-
return __props.data.map((group) => group.map(({
|
|
18161
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17872
18162
|
xmin,
|
|
17873
18163
|
xmax,
|
|
17874
18164
|
ymin,
|
|
17875
18165
|
ymax,
|
|
17876
|
-
fill
|
|
18166
|
+
fill,
|
|
17877
18167
|
color: color2,
|
|
17878
18168
|
linewidth,
|
|
17879
18169
|
linetype,
|
|
@@ -17914,7 +18204,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17914
18204
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17915
18205
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17916
18206
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17917
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18207
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17918
18208
|
}), 256))
|
|
17919
18209
|
], 16);
|
|
17920
18210
|
}), 256))
|
|
@@ -17922,7 +18212,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17922
18212
|
};
|
|
17923
18213
|
}
|
|
17924
18214
|
};
|
|
17925
|
-
const _sfc_main$
|
|
18215
|
+
const _sfc_main$C = {
|
|
17926
18216
|
__name: "CoreSvgText",
|
|
17927
18217
|
props: {
|
|
17928
18218
|
extendX: { type: Number, default: 0 },
|
|
@@ -17940,7 +18230,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17940
18230
|
const emit = __emit;
|
|
17941
18231
|
const binds = vue.computed(() => {
|
|
17942
18232
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17943
|
-
return __props.data.map((group) => group.map(({
|
|
18233
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17944
18234
|
x: x2,
|
|
17945
18235
|
y: y2,
|
|
17946
18236
|
size = 4,
|
|
@@ -18013,7 +18303,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18013
18303
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
18014
18304
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
18015
18305
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
18016
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18306
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
18017
18307
|
}), 256))
|
|
18018
18308
|
], 16);
|
|
18019
18309
|
}), 256))
|
|
@@ -18021,7 +18311,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18021
18311
|
};
|
|
18022
18312
|
}
|
|
18023
18313
|
};
|
|
18024
|
-
const _sfc_main$
|
|
18314
|
+
const _sfc_main$B = {
|
|
18025
18315
|
__name: "CoreSvgTextsegment",
|
|
18026
18316
|
props: {
|
|
18027
18317
|
extendX: { type: Number, default: 0 },
|
|
@@ -18039,7 +18329,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18039
18329
|
const emit = __emit;
|
|
18040
18330
|
const binds = vue.computed(() => {
|
|
18041
18331
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
18042
|
-
return __props.data.map((group) => group.map(({
|
|
18332
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
18043
18333
|
x: x2,
|
|
18044
18334
|
xend,
|
|
18045
18335
|
y: y2,
|
|
@@ -18200,22 +18490,23 @@ var VVPlot = (function(exports, vue) {
|
|
|
18200
18490
|
};
|
|
18201
18491
|
const svg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18202
18492
|
__proto__: null,
|
|
18203
|
-
blank: _sfc_main$
|
|
18204
|
-
boxplot: _sfc_main$
|
|
18205
|
-
curve: _sfc_main$
|
|
18206
|
-
ellipse: _sfc_main$
|
|
18207
|
-
line: _sfc_main$
|
|
18208
|
-
markdown: _sfc_main$
|
|
18209
|
-
markdownsegment: _sfc_main$
|
|
18210
|
-
point: _sfc_main$
|
|
18211
|
-
polygon: _sfc_main$
|
|
18212
|
-
rect: _sfc_main$
|
|
18213
|
-
|
|
18214
|
-
|
|
18215
|
-
|
|
18216
|
-
|
|
18493
|
+
blank: _sfc_main$S,
|
|
18494
|
+
boxplot: _sfc_main$O,
|
|
18495
|
+
curve: _sfc_main$M,
|
|
18496
|
+
ellipse: _sfc_main$K,
|
|
18497
|
+
line: _sfc_main$J,
|
|
18498
|
+
markdown: _sfc_main$I,
|
|
18499
|
+
markdownsegment: _sfc_main$H,
|
|
18500
|
+
point: _sfc_main$G,
|
|
18501
|
+
polygon: _sfc_main$E,
|
|
18502
|
+
rect: _sfc_main$D,
|
|
18503
|
+
shape: _sfc_main$M,
|
|
18504
|
+
stick: _sfc_main$J,
|
|
18505
|
+
text: _sfc_main$C,
|
|
18506
|
+
textsegment: _sfc_main$B,
|
|
18507
|
+
tile: _sfc_main$D
|
|
18217
18508
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18218
|
-
const _sfc_main$
|
|
18509
|
+
const _sfc_main$A = {
|
|
18219
18510
|
__name: "CoreLayer",
|
|
18220
18511
|
props: {
|
|
18221
18512
|
data: Object,
|
|
@@ -18256,7 +18547,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18256
18547
|
};
|
|
18257
18548
|
const _hoisted_1$4 = { key: 0 };
|
|
18258
18549
|
const _hoisted_2$3 = ["onPointerdown"];
|
|
18259
|
-
const _sfc_main$
|
|
18550
|
+
const _sfc_main$z = {
|
|
18260
18551
|
__name: "CoreSelection",
|
|
18261
18552
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
18262
18553
|
coord2pos: Function,
|
|
@@ -18513,7 +18804,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18513
18804
|
const _hoisted_1$3 = ["height", "width"];
|
|
18514
18805
|
const _hoisted_2$2 = ["y1", "y2"];
|
|
18515
18806
|
const _hoisted_3$2 = ["y"];
|
|
18516
|
-
const _sfc_main$
|
|
18807
|
+
const _sfc_main$y = {
|
|
18517
18808
|
__name: "CoreGuideGradientbar",
|
|
18518
18809
|
props: {
|
|
18519
18810
|
scales: Array,
|
|
@@ -18553,7 +18844,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18553
18844
|
ref: "svg"
|
|
18554
18845
|
}, [
|
|
18555
18846
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(gradient_values.value, (v, i) => {
|
|
18556
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18847
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({
|
|
18557
18848
|
width: 10,
|
|
18558
18849
|
height: 3.1,
|
|
18559
18850
|
x: 10,
|
|
@@ -18585,12 +18876,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
18585
18876
|
};
|
|
18586
18877
|
const element = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18587
18878
|
__proto__: null,
|
|
18588
|
-
curve: _sfc_main$
|
|
18589
|
-
line: _sfc_main$
|
|
18590
|
-
point: _sfc_main$
|
|
18591
|
-
polygon: _sfc_main$
|
|
18592
|
-
text: _sfc_main$
|
|
18593
|
-
tile: _sfc_main$
|
|
18879
|
+
curve: _sfc_main$N,
|
|
18880
|
+
line: _sfc_main$P,
|
|
18881
|
+
point: _sfc_main$Q,
|
|
18882
|
+
polygon: _sfc_main$F,
|
|
18883
|
+
text: _sfc_main$17,
|
|
18884
|
+
tile: _sfc_main$R
|
|
18594
18885
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18595
18886
|
const _hoisted_1$2 = ["height", "width"];
|
|
18596
18887
|
const _hoisted_2$1 = ["transform"];
|
|
@@ -18600,7 +18891,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18600
18891
|
y: "10",
|
|
18601
18892
|
"alignment-baseline": "central"
|
|
18602
18893
|
};
|
|
18603
|
-
const _sfc_main$
|
|
18894
|
+
const _sfc_main$x = {
|
|
18604
18895
|
__name: "CoreGuideLegendkey",
|
|
18605
18896
|
props: {
|
|
18606
18897
|
scales: Array,
|
|
@@ -18630,7 +18921,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18630
18921
|
const geoms = vue.computed(() => {
|
|
18631
18922
|
let { text: text2, line: line2, point: point2, tile: tile2 } = __props.appearances;
|
|
18632
18923
|
let result = {};
|
|
18633
|
-
if (tile2 != null) result.tile = { width: 10, height: 10, fill: "
|
|
18924
|
+
if (tile2 != null) result.tile = { width: 10, height: 10, fill: "none", ...tile2 };
|
|
18634
18925
|
if (line2 != null) result.line = { x1: -5, x2: 5, color: "black", ...line2 };
|
|
18635
18926
|
if (point2 != null) result.point = { size: 6, ...point2 };
|
|
18636
18927
|
if (text2 != null) result.text = { size: 4, text: "a", ...text2 };
|
|
@@ -18667,7 +18958,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18667
18958
|
};
|
|
18668
18959
|
}
|
|
18669
18960
|
};
|
|
18670
|
-
const _sfc_main$
|
|
18961
|
+
const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
18671
18962
|
__name: "CoreGuide",
|
|
18672
18963
|
props: {
|
|
18673
18964
|
scales: Array,
|
|
@@ -18675,8 +18966,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
18675
18966
|
},
|
|
18676
18967
|
setup(__props) {
|
|
18677
18968
|
const guide = {
|
|
18678
|
-
legendkey: _sfc_main$
|
|
18679
|
-
gradientbar: _sfc_main$
|
|
18969
|
+
legendkey: _sfc_main$x,
|
|
18970
|
+
gradientbar: _sfc_main$y
|
|
18680
18971
|
};
|
|
18681
18972
|
const title = vue.computed(() => {
|
|
18682
18973
|
return __props.scales.reduce((v, [s]) => v ?? s.title, null) ?? __props.scales.reduce((v, [s]) => v ?? s._title, null);
|
|
@@ -18720,7 +19011,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18720
19011
|
};
|
|
18721
19012
|
}
|
|
18722
19013
|
});
|
|
18723
|
-
const _sfc_main$
|
|
19014
|
+
const _sfc_main$v = {
|
|
18724
19015
|
__name: "CoreLegend",
|
|
18725
19016
|
props: {
|
|
18726
19017
|
theme: { type: Object, default: () => ({}) },
|
|
@@ -18754,7 +19045,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18754
19045
|
style: vue.normalizeStyle({ gap: __props.theme.spacing + "px" })
|
|
18755
19046
|
}, [
|
|
18756
19047
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(guides.value, ([[key, type], scales]) => {
|
|
18757
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19048
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$w, {
|
|
18758
19049
|
key,
|
|
18759
19050
|
type,
|
|
18760
19051
|
scales
|
|
@@ -18772,7 +19063,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18772
19063
|
const _hoisted_6 = ["transform"];
|
|
18773
19064
|
const _hoisted_7 = ["clip-path"];
|
|
18774
19065
|
const _hoisted_8 = { key: 1 };
|
|
18775
|
-
const _sfc_main$
|
|
19066
|
+
const _sfc_main$u = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
18776
19067
|
__name: "CorePlot",
|
|
18777
19068
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
18778
19069
|
schema: Object,
|
|
@@ -19471,7 +19762,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19471
19762
|
transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`,
|
|
19472
19763
|
style: { "pointer-events": "none" }
|
|
19473
19764
|
}, [
|
|
19474
|
-
vue.createVNode(_sfc_main
|
|
19765
|
+
vue.createVNode(_sfc_main$11, {
|
|
19475
19766
|
breaks: gridBreaks.value.h,
|
|
19476
19767
|
layout: vue.unref(innerRect),
|
|
19477
19768
|
activeTransform: activeTransform.value,
|
|
@@ -19479,7 +19770,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19479
19770
|
transition: transition.value
|
|
19480
19771
|
}, null, 8, ["breaks", "layout", "activeTransform", "transition"]),
|
|
19481
19772
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
19482
|
-
vue.createVNode(_sfc_main$
|
|
19773
|
+
vue.createVNode(_sfc_main$10, {
|
|
19483
19774
|
breaks: gridBreaks.value.v,
|
|
19484
19775
|
layout: vue.unref(innerRect),
|
|
19485
19776
|
activeTransform: activeTransform.value,
|
|
@@ -19496,7 +19787,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19496
19787
|
style: { transition: transition.value }
|
|
19497
19788
|
}), [
|
|
19498
19789
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vplot.value.layers, (layer) => {
|
|
19499
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19790
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$A, vue.mergeProps({
|
|
19500
19791
|
ref_for: true,
|
|
19501
19792
|
ref_key: "layers",
|
|
19502
19793
|
ref: layers,
|
|
@@ -19513,7 +19804,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19513
19804
|
], 16),
|
|
19514
19805
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
19515
19806
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.selections, (sel) => {
|
|
19516
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19807
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$z, vue.mergeProps({
|
|
19517
19808
|
coord2pos,
|
|
19518
19809
|
pos2coord,
|
|
19519
19810
|
layout: vue.unref(innerRect),
|
|
@@ -19524,7 +19815,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19524
19815
|
}, { ref_for: true }, sel, { flip: __props.flip }), null, 16, ["layout", "transition", "activeTransform", "flip"]);
|
|
19525
19816
|
}), 256)),
|
|
19526
19817
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
19527
|
-
vue.createVNode(_sfc_main$
|
|
19818
|
+
vue.createVNode(_sfc_main$z, {
|
|
19528
19819
|
coord2pos,
|
|
19529
19820
|
pos2coord,
|
|
19530
19821
|
layout: vue.unref(innerRect),
|
|
@@ -19540,7 +19831,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19540
19831
|
transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`
|
|
19541
19832
|
}, [
|
|
19542
19833
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position !== "number"), (axis) => {
|
|
19543
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19834
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
|
|
19544
19835
|
transition: transition.value,
|
|
19545
19836
|
"onUpdate:transition": _cache[0] || (_cache[0] = ($event) => transition.value = $event),
|
|
19546
19837
|
activeTransform: activeTransform.value
|
|
@@ -19551,7 +19842,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19551
19842
|
"clip-path": props.clip ? `url(#${vue.unref(vid)}-plot-clip)` : null
|
|
19552
19843
|
}, [
|
|
19553
19844
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position === "number"), (axis) => {
|
|
19554
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19845
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
|
|
19555
19846
|
transition: transition.value,
|
|
19556
19847
|
"onUpdate:transition": _cache[1] || (_cache[1] = ($event) => transition.value = $event),
|
|
19557
19848
|
activeTransform: activeTransform.value
|
|
@@ -19567,7 +19858,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19567
19858
|
defer: "",
|
|
19568
19859
|
to: props.legendTeleport
|
|
19569
19860
|
}, [
|
|
19570
|
-
vue.createVNode(_sfc_main$
|
|
19861
|
+
vue.createVNode(_sfc_main$v, {
|
|
19571
19862
|
scales: vplot.value?.scales,
|
|
19572
19863
|
theme: __props.theme.legend
|
|
19573
19864
|
}, null, 8, ["scales", "theme"])
|
|
@@ -19577,14 +19868,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
19577
19868
|
};
|
|
19578
19869
|
}
|
|
19579
19870
|
});
|
|
19580
|
-
const _sfc_main$
|
|
19871
|
+
const _sfc_main$t = {
|
|
19581
19872
|
$_type: "action",
|
|
19582
19873
|
$_props: {}
|
|
19583
19874
|
};
|
|
19584
|
-
const _sfc_main$
|
|
19875
|
+
const _sfc_main$s = {
|
|
19585
19876
|
$_type: "layer"
|
|
19586
19877
|
};
|
|
19587
|
-
const _sfc_main$
|
|
19878
|
+
const _sfc_main$r = {
|
|
19588
19879
|
$_props: {
|
|
19589
19880
|
geom: "tile",
|
|
19590
19881
|
stat: "bar"
|
|
@@ -19592,45 +19883,52 @@ var VVPlot = (function(exports, vue) {
|
|
|
19592
19883
|
$_type: "layer",
|
|
19593
19884
|
$_argnames: ["width", "height", "position"]
|
|
19594
19885
|
};
|
|
19595
|
-
const _sfc_main$
|
|
19886
|
+
const _sfc_main$q = {
|
|
19596
19887
|
$_props: {
|
|
19597
19888
|
geom: "blank",
|
|
19598
19889
|
stat: "identity"
|
|
19599
19890
|
},
|
|
19600
19891
|
$_type: "layer"
|
|
19601
19892
|
};
|
|
19602
|
-
const _sfc_main$
|
|
19893
|
+
const _sfc_main$p = {
|
|
19603
19894
|
$_props: {
|
|
19604
19895
|
geom: "boxplot",
|
|
19605
19896
|
stat: "boxplot"
|
|
19606
19897
|
},
|
|
19607
|
-
$_type: "layer"
|
|
19898
|
+
$_type: "layer",
|
|
19899
|
+
$_argnames: ["width", "height", "position"]
|
|
19608
19900
|
};
|
|
19609
|
-
const _sfc_main$
|
|
19901
|
+
const _sfc_main$o = {
|
|
19610
19902
|
$_props: {
|
|
19611
19903
|
geom: "curve",
|
|
19612
|
-
stat: "curve"
|
|
19904
|
+
stat: "curve",
|
|
19905
|
+
fill: "none",
|
|
19906
|
+
color: "black"
|
|
19613
19907
|
},
|
|
19614
19908
|
$_type: "layer",
|
|
19615
19909
|
$_attrnames: ["interpolate"]
|
|
19616
19910
|
};
|
|
19617
|
-
const _sfc_main$
|
|
19911
|
+
const _sfc_main$n = {
|
|
19618
19912
|
$_props: {
|
|
19619
19913
|
geom: "curve",
|
|
19620
|
-
stat: "density"
|
|
19914
|
+
stat: "density",
|
|
19915
|
+
fill: "none",
|
|
19916
|
+
color: "black"
|
|
19621
19917
|
},
|
|
19622
19918
|
$_type: "layer",
|
|
19623
|
-
$_argnames: ["n", "kernel"]
|
|
19919
|
+
$_argnames: ["n", "kernel", "scale"]
|
|
19624
19920
|
};
|
|
19625
|
-
const _sfc_main$
|
|
19921
|
+
const _sfc_main$m = {
|
|
19626
19922
|
$_props: {
|
|
19627
19923
|
geom: "ellipse",
|
|
19628
|
-
stat: "ellipse"
|
|
19924
|
+
stat: "ellipse",
|
|
19925
|
+
fill: "none",
|
|
19926
|
+
color: "black"
|
|
19629
19927
|
},
|
|
19630
19928
|
$_type: "layer",
|
|
19631
19929
|
$_argnames: ["CI"]
|
|
19632
19930
|
};
|
|
19633
|
-
const _sfc_main$
|
|
19931
|
+
const _sfc_main$l = {
|
|
19634
19932
|
$_props: {
|
|
19635
19933
|
geom: "rect",
|
|
19636
19934
|
stat: "histogram"
|
|
@@ -19638,7 +19936,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19638
19936
|
$_type: "layer",
|
|
19639
19937
|
$_argnames: ["bins", "binwidth", "breaks"]
|
|
19640
19938
|
};
|
|
19641
|
-
const _sfc_main$
|
|
19939
|
+
const _sfc_main$k = {
|
|
19642
19940
|
$_props: {
|
|
19643
19941
|
geom: "line",
|
|
19644
19942
|
stat: "line"
|
|
@@ -19646,113 +19944,132 @@ var VVPlot = (function(exports, vue) {
|
|
|
19646
19944
|
$_type: "layer",
|
|
19647
19945
|
$_argnames: ["orientation"]
|
|
19648
19946
|
};
|
|
19649
|
-
const _sfc_main$
|
|
19947
|
+
const _sfc_main$j = {
|
|
19650
19948
|
$_props: {
|
|
19651
19949
|
geom: "line",
|
|
19652
19950
|
stat: "linerange"
|
|
19653
19951
|
},
|
|
19654
19952
|
$_type: "layer"
|
|
19655
19953
|
};
|
|
19656
|
-
const _sfc_main$
|
|
19954
|
+
const _sfc_main$i = {
|
|
19657
19955
|
$_props: {
|
|
19658
19956
|
geom: "markdown",
|
|
19659
19957
|
stat: "text"
|
|
19660
19958
|
},
|
|
19661
19959
|
$_type: "layer"
|
|
19662
19960
|
};
|
|
19663
|
-
const _sfc_main$
|
|
19961
|
+
const _sfc_main$h = {
|
|
19664
19962
|
$_props: {
|
|
19665
19963
|
geom: "markdownsegment",
|
|
19666
19964
|
stat: "textsegment"
|
|
19667
19965
|
},
|
|
19668
19966
|
$_type: "layer"
|
|
19669
19967
|
};
|
|
19670
|
-
const _sfc_main$
|
|
19968
|
+
const _sfc_main$g = {
|
|
19671
19969
|
$_props: {
|
|
19672
19970
|
geom: "line",
|
|
19673
19971
|
stat: "path"
|
|
19674
19972
|
},
|
|
19675
19973
|
$_type: "layer"
|
|
19676
19974
|
};
|
|
19677
|
-
const _sfc_main$
|
|
19975
|
+
const _sfc_main$f = {
|
|
19678
19976
|
$_props: {
|
|
19679
19977
|
geom: "point",
|
|
19680
19978
|
stat: "point"
|
|
19681
19979
|
},
|
|
19682
19980
|
$_type: "layer"
|
|
19683
19981
|
};
|
|
19684
|
-
const _sfc_main$
|
|
19982
|
+
const _sfc_main$e = {
|
|
19685
19983
|
$_props: {
|
|
19686
19984
|
geom: "polygon",
|
|
19687
19985
|
stat: "polygon"
|
|
19688
19986
|
},
|
|
19689
19987
|
$_type: "layer"
|
|
19690
19988
|
};
|
|
19691
|
-
const _sfc_main$
|
|
19989
|
+
const _sfc_main$d = {
|
|
19692
19990
|
$_props: {
|
|
19693
19991
|
geom: "rect",
|
|
19694
19992
|
stat: "rect"
|
|
19695
19993
|
},
|
|
19696
19994
|
$_type: "layer"
|
|
19697
19995
|
};
|
|
19698
|
-
const _sfc_main$
|
|
19996
|
+
const _sfc_main$c = {
|
|
19699
19997
|
$_props: {
|
|
19700
19998
|
geom: "line",
|
|
19701
19999
|
stat: "segment"
|
|
19702
20000
|
},
|
|
19703
20001
|
$_type: "layer"
|
|
19704
20002
|
};
|
|
19705
|
-
const _sfc_main$
|
|
20003
|
+
const _sfc_main$b = {
|
|
20004
|
+
$_props: {
|
|
20005
|
+
geom: "shape",
|
|
20006
|
+
stat: "shape",
|
|
20007
|
+
interpolate: "catmullRomClosed"
|
|
20008
|
+
},
|
|
20009
|
+
$_type: "layer",
|
|
20010
|
+
$_attrnames: ["interpolate"]
|
|
20011
|
+
};
|
|
20012
|
+
const _sfc_main$a = {
|
|
19706
20013
|
$_props: {
|
|
19707
20014
|
geom: "stick",
|
|
19708
20015
|
stat: "stick"
|
|
19709
20016
|
},
|
|
19710
20017
|
$_type: "layer"
|
|
19711
20018
|
};
|
|
19712
|
-
const _sfc_main$
|
|
20019
|
+
const _sfc_main$9 = {
|
|
19713
20020
|
$_props: {
|
|
19714
20021
|
geom: "text",
|
|
19715
20022
|
stat: "text"
|
|
19716
20023
|
},
|
|
19717
20024
|
$_type: "layer"
|
|
19718
20025
|
};
|
|
19719
|
-
const _sfc_main$
|
|
20026
|
+
const _sfc_main$8 = {
|
|
19720
20027
|
$_props: {
|
|
19721
20028
|
geom: "textsegment",
|
|
19722
20029
|
stat: "textsegment"
|
|
19723
20030
|
},
|
|
19724
20031
|
$_type: "layer"
|
|
19725
20032
|
};
|
|
19726
|
-
const _sfc_main$
|
|
20033
|
+
const _sfc_main$7 = {
|
|
19727
20034
|
$_props: {
|
|
19728
20035
|
geom: "tile",
|
|
19729
20036
|
stat: "tile"
|
|
19730
20037
|
},
|
|
19731
20038
|
$_type: "layer"
|
|
19732
20039
|
};
|
|
20040
|
+
const _sfc_main$6 = {
|
|
20041
|
+
$_props: {
|
|
20042
|
+
geom: "shape",
|
|
20043
|
+
stat: "violin"
|
|
20044
|
+
},
|
|
20045
|
+
$_type: "layer",
|
|
20046
|
+
$_argnames: ["n", "kernel", "scale", "width", "height", "position"]
|
|
20047
|
+
};
|
|
19733
20048
|
const geom_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19734
20049
|
__proto__: null,
|
|
19735
|
-
VVGeom: _sfc_main$
|
|
19736
|
-
VVGeomBar: _sfc_main$
|
|
19737
|
-
VVGeomBlank: _sfc_main$
|
|
19738
|
-
VVGeomBoxplot: _sfc_main$
|
|
19739
|
-
VVGeomCurve: _sfc_main$
|
|
19740
|
-
VVGeomDensity: _sfc_main$
|
|
19741
|
-
VVGeomEllipse: _sfc_main$
|
|
19742
|
-
VVGeomHistogram: _sfc_main$
|
|
19743
|
-
VVGeomLine: _sfc_main$
|
|
19744
|
-
VVGeomLinerange: _sfc_main$
|
|
19745
|
-
VVGeomMarkdown: _sfc_main$
|
|
19746
|
-
VVGeomMarkdownsegment: _sfc_main$
|
|
19747
|
-
VVGeomPath: _sfc_main$
|
|
19748
|
-
VVGeomPoint: _sfc_main$
|
|
19749
|
-
VVGeomPolygon: _sfc_main$
|
|
19750
|
-
VVGeomRect: _sfc_main$
|
|
19751
|
-
VVGeomSegment: _sfc_main$
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
|
|
19755
|
-
|
|
20050
|
+
VVGeom: _sfc_main$s,
|
|
20051
|
+
VVGeomBar: _sfc_main$r,
|
|
20052
|
+
VVGeomBlank: _sfc_main$q,
|
|
20053
|
+
VVGeomBoxplot: _sfc_main$p,
|
|
20054
|
+
VVGeomCurve: _sfc_main$o,
|
|
20055
|
+
VVGeomDensity: _sfc_main$n,
|
|
20056
|
+
VVGeomEllipse: _sfc_main$m,
|
|
20057
|
+
VVGeomHistogram: _sfc_main$l,
|
|
20058
|
+
VVGeomLine: _sfc_main$k,
|
|
20059
|
+
VVGeomLinerange: _sfc_main$j,
|
|
20060
|
+
VVGeomMarkdown: _sfc_main$i,
|
|
20061
|
+
VVGeomMarkdownsegment: _sfc_main$h,
|
|
20062
|
+
VVGeomPath: _sfc_main$g,
|
|
20063
|
+
VVGeomPoint: _sfc_main$f,
|
|
20064
|
+
VVGeomPolygon: _sfc_main$e,
|
|
20065
|
+
VVGeomRect: _sfc_main$d,
|
|
20066
|
+
VVGeomSegment: _sfc_main$c,
|
|
20067
|
+
VVGeomShape: _sfc_main$b,
|
|
20068
|
+
VVGeomStick: _sfc_main$a,
|
|
20069
|
+
VVGeomText: _sfc_main$9,
|
|
20070
|
+
VVGeomTextsegment: _sfc_main$8,
|
|
20071
|
+
VVGeomTile: _sfc_main$7,
|
|
20072
|
+
VVGeomViolin: _sfc_main$6
|
|
19756
20073
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19757
20074
|
const _sfc_main$5 = {
|
|
19758
20075
|
$_type: "axis",
|
|
@@ -19822,8 +20139,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
19822
20139
|
const components = {
|
|
19823
20140
|
...geom_components,
|
|
19824
20141
|
...axis_components,
|
|
19825
|
-
VVAction: _sfc_main$
|
|
19826
|
-
VVSelection: _sfc_main$
|
|
20142
|
+
VVAction: _sfc_main$t,
|
|
20143
|
+
VVSelection: _sfc_main$t
|
|
19827
20144
|
};
|
|
19828
20145
|
const opponents = {
|
|
19829
20146
|
x: "y",
|
|
@@ -20299,6 +20616,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20299
20616
|
let oldSize = { width: 0, height: 0 };
|
|
20300
20617
|
useResizeObserver(plotRef, (e) => {
|
|
20301
20618
|
let { width: w, height: h } = e[0].contentRect;
|
|
20619
|
+
if (width.value - w < 0.5 && height.value - h < 0.5) return;
|
|
20302
20620
|
if (wrapperRef.value.style.width) width.value = w;
|
|
20303
20621
|
if (wrapperRef.value.style.height) height.value = h;
|
|
20304
20622
|
if ((w > 0 || h > 0) && (oldSize.width > 0 || oldSize.height > 0))
|
|
@@ -20340,7 +20658,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20340
20658
|
class: "vvplot",
|
|
20341
20659
|
style: wrapperStyle.value
|
|
20342
20660
|
}, vBind.value.wrapper), [
|
|
20343
|
-
vue.createVNode(_sfc_main$
|
|
20661
|
+
vue.createVNode(_sfc_main$u, vue.mergeProps({
|
|
20344
20662
|
ref: "plot",
|
|
20345
20663
|
paddings,
|
|
20346
20664
|
schema: schema.value,
|
|
@@ -20402,61 +20720,65 @@ var VVPlot = (function(exports, vue) {
|
|
|
20402
20720
|
};
|
|
20403
20721
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20404
20722
|
__proto__: null,
|
|
20405
|
-
VVAction: _sfc_main$
|
|
20723
|
+
VVAction: _sfc_main$t,
|
|
20406
20724
|
VVAxis: _sfc_main$5,
|
|
20407
20725
|
VVAxisBreak: _sfc_main$2,
|
|
20408
20726
|
VVAxisX: _sfc_main$4,
|
|
20409
20727
|
VVAxisY: _sfc_main$3,
|
|
20410
|
-
VVGeom: _sfc_main$
|
|
20411
|
-
VVGeomBar: _sfc_main$
|
|
20412
|
-
VVGeomBlank: _sfc_main$
|
|
20413
|
-
VVGeomBoxplot: _sfc_main$
|
|
20414
|
-
VVGeomCurve: _sfc_main$
|
|
20415
|
-
VVGeomDensity: _sfc_main$
|
|
20416
|
-
VVGeomEllipse: _sfc_main$
|
|
20417
|
-
VVGeomHistogram: _sfc_main$
|
|
20418
|
-
VVGeomLine: _sfc_main$
|
|
20419
|
-
VVGeomLinerange: _sfc_main$
|
|
20420
|
-
VVGeomMarkdown: _sfc_main$
|
|
20421
|
-
VVGeomMarkdownsegment: _sfc_main$
|
|
20422
|
-
VVGeomPath: _sfc_main$
|
|
20423
|
-
VVGeomPoint: _sfc_main$
|
|
20424
|
-
VVGeomPolygon: _sfc_main$
|
|
20425
|
-
VVGeomRect: _sfc_main$
|
|
20426
|
-
VVGeomSegment: _sfc_main$
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20728
|
+
VVGeom: _sfc_main$s,
|
|
20729
|
+
VVGeomBar: _sfc_main$r,
|
|
20730
|
+
VVGeomBlank: _sfc_main$q,
|
|
20731
|
+
VVGeomBoxplot: _sfc_main$p,
|
|
20732
|
+
VVGeomCurve: _sfc_main$o,
|
|
20733
|
+
VVGeomDensity: _sfc_main$n,
|
|
20734
|
+
VVGeomEllipse: _sfc_main$m,
|
|
20735
|
+
VVGeomHistogram: _sfc_main$l,
|
|
20736
|
+
VVGeomLine: _sfc_main$k,
|
|
20737
|
+
VVGeomLinerange: _sfc_main$j,
|
|
20738
|
+
VVGeomMarkdown: _sfc_main$i,
|
|
20739
|
+
VVGeomMarkdownsegment: _sfc_main$h,
|
|
20740
|
+
VVGeomPath: _sfc_main$g,
|
|
20741
|
+
VVGeomPoint: _sfc_main$f,
|
|
20742
|
+
VVGeomPolygon: _sfc_main$e,
|
|
20743
|
+
VVGeomRect: _sfc_main$d,
|
|
20744
|
+
VVGeomSegment: _sfc_main$c,
|
|
20745
|
+
VVGeomShape: _sfc_main$b,
|
|
20746
|
+
VVGeomStick: _sfc_main$a,
|
|
20747
|
+
VVGeomText: _sfc_main$9,
|
|
20748
|
+
VVGeomTextsegment: _sfc_main$8,
|
|
20749
|
+
VVGeomTile: _sfc_main$7,
|
|
20750
|
+
VVGeomViolin: _sfc_main$6,
|
|
20431
20751
|
VVPlot: _sfc_main$1,
|
|
20432
20752
|
VVSelection: _sfc_main
|
|
20433
20753
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
20434
|
-
exports.VVAction = _sfc_main$
|
|
20754
|
+
exports.VVAction = _sfc_main$t;
|
|
20435
20755
|
exports.VVAxis = _sfc_main$5;
|
|
20436
20756
|
exports.VVAxisBreak = _sfc_main$2;
|
|
20437
20757
|
exports.VVAxisX = _sfc_main$4;
|
|
20438
20758
|
exports.VVAxisY = _sfc_main$3;
|
|
20439
|
-
exports.VVGeom = _sfc_main$
|
|
20440
|
-
exports.VVGeomBar = _sfc_main$
|
|
20441
|
-
exports.VVGeomBlank = _sfc_main$
|
|
20442
|
-
exports.VVGeomBoxplot = _sfc_main$
|
|
20443
|
-
exports.VVGeomCurve = _sfc_main$
|
|
20444
|
-
exports.VVGeomDensity = _sfc_main$
|
|
20445
|
-
exports.VVGeomEllipse = _sfc_main$
|
|
20446
|
-
exports.VVGeomHistogram = _sfc_main$
|
|
20447
|
-
exports.VVGeomLine = _sfc_main$
|
|
20448
|
-
exports.VVGeomLinerange = _sfc_main$
|
|
20449
|
-
exports.VVGeomMarkdown = _sfc_main$
|
|
20450
|
-
exports.VVGeomMarkdownsegment = _sfc_main$
|
|
20451
|
-
exports.VVGeomPath = _sfc_main$
|
|
20452
|
-
exports.VVGeomPoint = _sfc_main$
|
|
20453
|
-
exports.VVGeomPolygon = _sfc_main$
|
|
20454
|
-
exports.VVGeomRect = _sfc_main$
|
|
20455
|
-
exports.VVGeomSegment = _sfc_main$
|
|
20456
|
-
exports.
|
|
20457
|
-
exports.
|
|
20458
|
-
exports.
|
|
20459
|
-
exports.
|
|
20759
|
+
exports.VVGeom = _sfc_main$s;
|
|
20760
|
+
exports.VVGeomBar = _sfc_main$r;
|
|
20761
|
+
exports.VVGeomBlank = _sfc_main$q;
|
|
20762
|
+
exports.VVGeomBoxplot = _sfc_main$p;
|
|
20763
|
+
exports.VVGeomCurve = _sfc_main$o;
|
|
20764
|
+
exports.VVGeomDensity = _sfc_main$n;
|
|
20765
|
+
exports.VVGeomEllipse = _sfc_main$m;
|
|
20766
|
+
exports.VVGeomHistogram = _sfc_main$l;
|
|
20767
|
+
exports.VVGeomLine = _sfc_main$k;
|
|
20768
|
+
exports.VVGeomLinerange = _sfc_main$j;
|
|
20769
|
+
exports.VVGeomMarkdown = _sfc_main$i;
|
|
20770
|
+
exports.VVGeomMarkdownsegment = _sfc_main$h;
|
|
20771
|
+
exports.VVGeomPath = _sfc_main$g;
|
|
20772
|
+
exports.VVGeomPoint = _sfc_main$f;
|
|
20773
|
+
exports.VVGeomPolygon = _sfc_main$e;
|
|
20774
|
+
exports.VVGeomRect = _sfc_main$d;
|
|
20775
|
+
exports.VVGeomSegment = _sfc_main$c;
|
|
20776
|
+
exports.VVGeomShape = _sfc_main$b;
|
|
20777
|
+
exports.VVGeomStick = _sfc_main$a;
|
|
20778
|
+
exports.VVGeomText = _sfc_main$9;
|
|
20779
|
+
exports.VVGeomTextsegment = _sfc_main$8;
|
|
20780
|
+
exports.VVGeomTile = _sfc_main$7;
|
|
20781
|
+
exports.VVGeomViolin = _sfc_main$6;
|
|
20460
20782
|
exports.VVPlot = _sfc_main$1;
|
|
20461
20783
|
exports.VVSelection = _sfc_main;
|
|
20462
20784
|
exports.components = index;
|