vvplot 0.5.1 → 0.5.3

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.
@@ -1958,6 +1958,16 @@ var VVPlot = (function(exports, vue) {
1958
1958
  if (infinity_rm) arr = arr.filter((x2) => isFinite(x2));
1959
1959
  return Array.from(arr).reduce((a, b) => a > b ? a : b, -Infinity);
1960
1960
  },
1961
+ sum(arr, { na_rm = true, infinity_rm = true } = {}) {
1962
+ if (na_rm) arr = arr.filter(is_continuous);
1963
+ if (infinity_rm) arr = arr.filter((x2) => isFinite(x2));
1964
+ return Array.from(arr).reduce((a, b) => a + b, 0);
1965
+ },
1966
+ diff(arr, { na_rm = true, infinity_rm = true } = {}) {
1967
+ if (na_rm) arr = arr.filter(is_continuous);
1968
+ if (infinity_rm) arr = arr.filter((x2) => isFinite(x2));
1969
+ return Array.from(arr).slice(1).map((v, i) => v - arr[i]);
1970
+ },
1961
1971
  mean(arr, { na_rm = true, infinity_rm = true } = {}) {
1962
1972
  if (na_rm) arr = arr.filter(is_continuous);
1963
1973
  if (infinity_rm) arr = arr.filter((x2) => isFinite(x2));
@@ -1989,6 +1999,14 @@ var VVPlot = (function(exports, vue) {
1989
1999
  }
1990
2000
  };
1991
2001
  const vecutils = {
2002
+ coalesce(value, defaultValue) {
2003
+ if (Array.isArray(defaultValue)) {
2004
+ if (!Array.isArray(value) || value.length != defaultValue.length) throw new Error("Value and defaultValue must be arrays of the same length");
2005
+ return value.map((v, i) => v == null ? defaultValue[i] : v);
2006
+ }
2007
+ if (Array.isArray(value)) return value.map((v) => v ?? defaultValue);
2008
+ return value ?? defaultValue;
2009
+ },
1992
2010
  /* vectorized summation of numbers */
1993
2011
  sum(...values) {
1994
2012
  if (values.some((x2) => x2 == null)) return null;
@@ -1998,12 +2016,10 @@ var VVPlot = (function(exports, vue) {
1998
2016
  values = values.filter((x2) => Array.isArray(x2));
1999
2017
  if (values.length == 0)
2000
2018
  return [nums];
2001
- if (values.some((v) => v.length == 0))
2002
- return [];
2003
2019
  let length = values[0].length;
2004
2020
  if (values.some((v) => v.length != length))
2005
2021
  throw new Error("Arrays must have the same length");
2006
- return Array.from({ length }, (_, i) => values.reduce((s, a) => +(a[i] ?? 0) + s, nums));
2022
+ return Array.from({ length }, (_, i) => values.reduce((s, a) => +(a[i] ?? void 0) + s, nums));
2007
2023
  },
2008
2024
  /* vectorized opposite of numbers */
2009
2025
  opposite(value) {
@@ -2257,7 +2273,7 @@ var VVPlot = (function(exports, vue) {
2257
2273
  },
2258
2274
  axis_v: {
2259
2275
  title_offset: 30,
2260
- title_angle: 90
2276
+ title_angle: -90
2261
2277
  },
2262
2278
  axis_left: {
2263
2279
  tick_position: "left",
@@ -2343,7 +2359,8 @@ var VVPlot = (function(exports, vue) {
2343
2359
  line_color: "black",
2344
2360
  tick_color: "black",
2345
2361
  label_color: "black",
2346
- title_color: "black"
2362
+ title_color: "black",
2363
+ grid_color: null
2347
2364
  }
2348
2365
  };
2349
2366
  const theme_void = {
@@ -2464,11 +2481,11 @@ var VVPlot = (function(exports, vue) {
2464
2481
  return null;
2465
2482
  }
2466
2483
  };
2467
- let psum$a = vecutils.sum;
2484
+ let { sum: psum$a, coalesce: coalesce$a } = vecutils;
2468
2485
  const boxplot$1 = {
2469
2486
  scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2470
2487
  coord_scale(ds, levels) {
2471
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0;
2488
+ let xnudge = coalesce$a(ds.xnudge, 0), ynudge = coalesce$a(ds.ynudge, 0);
2472
2489
  if (ds.x) {
2473
2490
  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
2491
  ($x, { y: ys, $raw }, nudge) => psum$a(ys, nudge).map(($y, i) => ({ x: $x, y: $y, $raw: $raw[i] })),
@@ -2543,12 +2560,12 @@ var VVPlot = (function(exports, vue) {
2543
2560
  return d;
2544
2561
  }
2545
2562
  };
2546
- let psum$9 = vecutils.sum;
2563
+ let { sum: psum$9, coalesce: coalesce$9 } = vecutils;
2547
2564
  const ellipse$1 = {
2548
2565
  scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2549
2566
  coord_scale(ds, levels) {
2550
2567
  let { A, B, C } = ds;
2551
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, cx = psum$9(levels.x?.apply?.(ds.cx) ?? ds.cx, xnudge), cy = psum$9(levels.y?.apply?.(ds.cy) ?? ds.cy, ynudge);
2568
+ let xnudge = coalesce$9(ds.xnudge, 0), ynudge = coalesce$9(ds.ynudge, 0), cx = psum$9(levels.x?.apply?.(ds.cx) ?? ds.cx, xnudge), cy = psum$9(levels.y?.apply?.(ds.cy) ?? ds.cy, ynudge);
2552
2569
  return { cx, cy, A, B, C };
2553
2570
  },
2554
2571
  get_range(ds, orientation) {
@@ -2566,11 +2583,11 @@ var VVPlot = (function(exports, vue) {
2566
2583
  return d;
2567
2584
  }
2568
2585
  };
2569
- let psum$8 = vecutils.sum;
2586
+ let { sum: psum$8, coalesce: coalesce$8 } = vecutils;
2570
2587
  const line$2 = {
2571
2588
  scale_attrs: ["color", "linewidth", "linetype", "alpha"],
2572
2589
  coord_scale(ds, levels) {
2573
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$8(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$8(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$8(levels.x?.apply?.(ds.xend) ?? ds.xend, xnudge), yend = psum$8(levels.y?.apply?.(ds.yend) ?? ds.yend, ynudge);
2590
+ let xnudge = coalesce$8(ds.xnudge, 0), ynudge = coalesce$8(ds.ynudge, 0), x2 = psum$8(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$8(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$8(levels.x?.apply?.(ds.xend) ?? ds.xend, xnudge), yend = psum$8(levels.y?.apply?.(ds.yend) ?? ds.yend, ynudge);
2574
2591
  return { x: x2, y: y2, xend, yend };
2575
2592
  },
2576
2593
  get_range(ds, orientation) {
@@ -2582,11 +2599,11 @@ var VVPlot = (function(exports, vue) {
2582
2599
  return d;
2583
2600
  }
2584
2601
  };
2585
- let psum$7 = vecutils.sum;
2602
+ let { sum: psum$7, coalesce: coalesce$7 } = vecutils;
2586
2603
  const markdown = {
2587
2604
  scale_attrs: ["size", "color", "stroke", "linewidth", "linetype", "alpha"],
2588
2605
  coord_scale(ds, levels) {
2589
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$7(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$7(levels.y?.apply?.(ds.y) ?? ds.y, ynudge);
2606
+ let xnudge = coalesce$7(ds.xnudge, 0), ynudge = coalesce$7(ds.ynudge, 0), x2 = psum$7(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$7(levels.y?.apply?.(ds.y) ?? ds.y, ynudge);
2590
2607
  return { x: x2, y: y2 };
2591
2608
  },
2592
2609
  get_range(ds, orientation) {
@@ -2598,11 +2615,11 @@ var VVPlot = (function(exports, vue) {
2598
2615
  return d;
2599
2616
  }
2600
2617
  };
2601
- let psum$6 = vecutils.sum;
2618
+ let { sum: psum$6, coalesce: coalesce$6 } = vecutils;
2602
2619
  const markdownsegment = {
2603
2620
  scale_attrs: ["size", "color", "stroke", "linewidth", "linetype", "alpha"],
2604
2621
  coord_scale(ds, levels) {
2605
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$6(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$6(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$6(levels.x?.apply?.(ds.xend) ?? ds.xend, xnudge), yend = psum$6(levels.y?.apply?.(ds.yend) ?? ds.yend, ynudge);
2622
+ let xnudge = coalesce$6(ds.xnudge, 0), ynudge = coalesce$6(ds.ynudge, 0), x2 = psum$6(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$6(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$6(levels.x?.apply?.(ds.xend) ?? ds.xend, xnudge), yend = psum$6(levels.y?.apply?.(ds.yend) ?? ds.yend, ynudge);
2606
2623
  return { x: x2, y: y2, xend, yend };
2607
2624
  },
2608
2625
  get_range(ds, orientation) {
@@ -2614,11 +2631,11 @@ var VVPlot = (function(exports, vue) {
2614
2631
  return d;
2615
2632
  }
2616
2633
  };
2617
- let psum$5 = vecutils.sum;
2634
+ let { sum: psum$5, coalesce: coalesce$5 } = vecutils;
2618
2635
  const point$3 = {
2619
2636
  scale_attrs: ["shape", "size", "color", "stroke", "linewidth", "linetype", "alpha"],
2620
2637
  coord_scale(ds, levels) {
2621
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$5(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$5(levels.y?.apply?.(ds.y) ?? ds.y, ynudge);
2638
+ let xnudge = coalesce$5(ds.xnudge, 0), ynudge = coalesce$5(ds.ynudge, 0), x2 = psum$5(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$5(levels.y?.apply?.(ds.y) ?? ds.y, ynudge);
2622
2639
  return { x: x2, y: y2 };
2623
2640
  },
2624
2641
  get_range(ds, orientation) {
@@ -2648,11 +2665,11 @@ var VVPlot = (function(exports, vue) {
2648
2665
  return d;
2649
2666
  }
2650
2667
  };
2651
- let psum$4 = vecutils.sum;
2668
+ let { sum: psum$4, coalesce: coalesce$4 } = vecutils;
2652
2669
  const rect$2 = {
2653
2670
  scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2654
2671
  coord_scale(ds, levels) {
2655
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, xmin = psum$4(levels.x?.apply?.(ds.xmin) ?? ds.xmin, xnudge), xmax = psum$4(levels.x?.apply?.(ds.xmax) ?? ds.xmax, xnudge), ymin = psum$4(levels.y?.apply?.(ds.ymin) ?? ds.ymin, ynudge), ymax = psum$4(levels.y?.apply?.(ds.ymax) ?? ds.ymax, ynudge);
2672
+ let xnudge = coalesce$4(ds.xnudge, 0), ynudge = coalesce$4(ds.ynudge, 0), xmin = psum$4(levels.x?.apply?.(ds.xmin) ?? ds.xmin, xnudge), xmax = psum$4(levels.x?.apply?.(ds.xmax) ?? ds.xmax, xnudge), ymin = psum$4(levels.y?.apply?.(ds.ymin) ?? ds.ymin, ynudge), ymax = psum$4(levels.y?.apply?.(ds.ymax) ?? ds.ymax, ynudge);
2656
2673
  return { xmin, xmax, ymin, ymax };
2657
2674
  },
2658
2675
  get_range(ds, orientation) {
@@ -2686,11 +2703,11 @@ var VVPlot = (function(exports, vue) {
2686
2703
  return d;
2687
2704
  }
2688
2705
  };
2689
- let psum$3 = vecutils.sum;
2706
+ let { sum: psum$3, coalesce: coalesce$3 } = vecutils;
2690
2707
  const stick$1 = {
2691
2708
  scale_attrs: ["color", "linewidth", "linetype", "alpha"],
2692
2709
  coord_scale(ds, levels) {
2693
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$3(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$3(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$3(x2, ds.dx), yend = psum$3(y2, ds.dy);
2710
+ let xnudge = coalesce$3(ds.xnudge, 0), ynudge = coalesce$3(ds.ynudge, 0), x2 = psum$3(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$3(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$3(x2, ds.dx), yend = psum$3(y2, ds.dy);
2694
2711
  return { x: x2, y: y2, xend, yend };
2695
2712
  },
2696
2713
  get_values(ds, orientation) {
@@ -2706,11 +2723,11 @@ var VVPlot = (function(exports, vue) {
2706
2723
  return d;
2707
2724
  }
2708
2725
  };
2709
- let psum$2 = vecutils.sum;
2726
+ let { sum: psum$2, coalesce: coalesce$2 } = vecutils;
2710
2727
  const text$3 = {
2711
2728
  scale_attrs: ["size", "color", "stroke", "linewidth", "linetype", "alpha"],
2712
2729
  coord_scale(ds, levels) {
2713
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$2(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$2(levels.y?.apply?.(ds.y) ?? ds.y, ynudge);
2730
+ let xnudge = coalesce$2(ds.xnudge, 0), ynudge = coalesce$2(ds.ynudge, 0), x2 = psum$2(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$2(levels.y?.apply?.(ds.y) ?? ds.y, ynudge);
2714
2731
  return { x: x2, y: y2 };
2715
2732
  },
2716
2733
  get_range(ds, orientation) {
@@ -2722,11 +2739,11 @@ var VVPlot = (function(exports, vue) {
2722
2739
  return d;
2723
2740
  }
2724
2741
  };
2725
- let psum$1 = vecutils.sum;
2742
+ let { sum: psum$1, coalesce: coalesce$1 } = vecutils;
2726
2743
  const textsegment$1 = {
2727
2744
  scale_attrs: ["size", "color", "stroke", "linewidth", "linetype", "alpha"],
2728
2745
  coord_scale(ds, levels) {
2729
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = psum$1(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$1(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$1(levels.x?.apply?.(ds.xend) ?? ds.xend, xnudge), yend = psum$1(levels.y?.apply?.(ds.yend) ?? ds.yend, ynudge);
2746
+ let xnudge = coalesce$1(ds.xnudge, 0), ynudge = coalesce$1(ds.ynudge, 0), x2 = psum$1(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), y2 = psum$1(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), xend = psum$1(levels.x?.apply?.(ds.xend) ?? ds.xend, xnudge), yend = psum$1(levels.y?.apply?.(ds.yend) ?? ds.yend, ynudge);
2730
2747
  return { x: x2, y: y2, xend, yend };
2731
2748
  },
2732
2749
  get_range(ds, orientation) {
@@ -2738,11 +2755,11 @@ var VVPlot = (function(exports, vue) {
2738
2755
  return d;
2739
2756
  }
2740
2757
  };
2741
- let psum = vecutils.sum;
2758
+ let { sum: psum, coalesce } = vecutils;
2742
2759
  const tile$1 = {
2743
2760
  scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2744
2761
  coord_scale(ds, levels) {
2745
- let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0, x2 = levels.x?.apply?.(ds.x) ?? ds.x, y2 = levels.y?.apply?.(ds.y) ?? ds.y, xmin = psum(x2, ds.width?.map?.((x3) => -x3 / 2) ?? -0.5, xnudge), xmax = psum(x2, ds.width?.map?.((x3) => +x3 / 2) ?? 0.5, xnudge), ymin = psum(y2, ds.height?.map?.((x3) => -x3 / 2) ?? -0.5, ynudge), ymax = psum(y2, ds.height?.map?.((x3) => +x3 / 2) ?? 0.5, ynudge);
2762
+ let xnudge = coalesce(ds.xnudge, 0), ynudge = coalesce(ds.ynudge, 0), x2 = levels.x?.apply?.(ds.x) ?? ds.x, y2 = levels.y?.apply?.(ds.y) ?? ds.y, xmin = psum(x2, ds.width?.map?.((x3) => -x3 / 2) ?? -0.5, xnudge), xmax = psum(x2, ds.width?.map?.((x3) => +x3 / 2) ?? 0.5, xnudge), ymin = psum(y2, ds.height?.map?.((x3) => -x3 / 2) ?? -0.5, ynudge), ymax = psum(y2, ds.height?.map?.((x3) => +x3 / 2) ?? 0.5, ynudge);
2746
2763
  return { xmin, xmax, ymin, ymax };
2747
2764
  },
2748
2765
  get_values(ds, orientation) {
@@ -2795,20 +2812,21 @@ var VVPlot = (function(exports, vue) {
2795
2812
  let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
2796
2813
  let inter = intraaction({ group: group ?? 0, value: values });
2797
2814
  let groups = Map.groupBy(data.$raw, (_, i) => inter.categories[inter[i]]);
2798
- let $raw = Array.from(groups.values()), cates = Array.from(groups.keys());
2815
+ let $raw = Array.from(groups.values()), cates = Array.from(groups.keys()), val = $raw.map((v) => v.length);
2799
2816
  let result = {
2800
2817
  $raw,
2801
- $group: cates.map((x2) => x2.group)
2818
+ $group: cates.map((x2) => x2.group),
2819
+ [cateAes]: cates.map((v) => v.value)
2802
2820
  };
2803
2821
  for (let key of keys) {
2804
2822
  result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
2805
2823
  }
2806
2824
  if (cateAes == "x") {
2807
- result.x = cates.map((v) => v.value);
2808
- result.height = $raw.map((v) => v.length);
2825
+ width ??= 0.9;
2826
+ result.height = val;
2809
2827
  } else {
2810
- result.y = cates.map((v) => v.value);
2811
- result.width = $raw.map((v) => v.length);
2828
+ height ??= 0.9;
2829
+ result.width = val;
2812
2830
  }
2813
2831
  if (position == "stack") {
2814
2832
  let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
@@ -2817,7 +2835,7 @@ var VVPlot = (function(exports, vue) {
2817
2835
  let s = 0;
2818
2836
  for (let i of cate_group[cate]) {
2819
2837
  offset[i] = s;
2820
- s += $raw[i].length;
2838
+ s += val[i];
2821
2839
  }
2822
2840
  }
2823
2841
  if (cateAes == "x") {
@@ -2907,6 +2925,85 @@ var VVPlot = (function(exports, vue) {
2907
2925
  }
2908
2926
  return result;
2909
2927
  }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2928
+ const col = Object.assign(function(data, { position = "stack", width, height, orientation = "x" }) {
2929
+ let missingAes = ["x", "y"].filter((a) => data[a] == null);
2930
+ if (missingAes.length > 0)
2931
+ throw new Error(`Missing aesthetics for "StatCol": "${missingAes.join('", "')}"`);
2932
+ let isXdiscrete = data.x.some(is_categorical);
2933
+ let isYdiscrete = data.y.some(is_categorical);
2934
+ if (isXdiscrete && isYdiscrete)
2935
+ throw new Error(`Both "x" and "y" are discrete, "StatCol" requires at most one discrete aesthetic`);
2936
+ let cateAes = isXdiscrete == isYdiscrete ? orientation != "y" ? "x" : "y" : isXdiscrete ? "x" : "y";
2937
+ let valueAes = cateAes == "x" ? "y" : "x";
2938
+ let keys = Object.keys(data).filter((k) => k != valueAes && !k.startsWith("$"));
2939
+ let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
2940
+ let inter = intraaction({ group: group ?? 0, cate: data[cateAes] });
2941
+ let groupIdx = Map.groupBy(inter.map((_, i) => i), (_, i) => inter.categories[inter[i]]);
2942
+ let groups = Map.groupBy(data.$raw, (_, i) => inter.categories[inter[i]]);
2943
+ let cates = Array.from(groups.keys()), $raw = Array.from(groupIdx.values()).map((arr) => arr.map((idx) => data.$raw[idx])), val = Array.from(groupIdx.values()).map((arr) => numutils.sum(arr.map((idx) => data[valueAes][idx])));
2944
+ let result = {
2945
+ $raw,
2946
+ $group: cates.map((x2) => x2.group),
2947
+ [cateAes]: cates.map((v) => v.value)
2948
+ };
2949
+ for (let key of keys) {
2950
+ result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
2951
+ }
2952
+ if (cateAes == "x") {
2953
+ if (isXdiscrete) {
2954
+ width ??= 0.9;
2955
+ } else {
2956
+ width ??= numutils.min(numutils.diff(Array.from(new Set(data[cateAes])).sort((a, b) => a - b))) * 0.9;
2957
+ }
2958
+ result.height = val;
2959
+ } else {
2960
+ if (isYdiscrete) {
2961
+ height ??= 0.9;
2962
+ } else {
2963
+ height ??= numutils.min(numutils.diff(Array.from(new Set(data[cateAes])).sort((a, b) => a - b))) * 0.9;
2964
+ }
2965
+ result.width = val;
2966
+ }
2967
+ if (position == "stack") {
2968
+ let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
2969
+ let offset = cates.map((_) => 0);
2970
+ for (let cate in cate_group) {
2971
+ let s = 0;
2972
+ for (let i of cate_group[cate]) {
2973
+ offset[i] = s;
2974
+ s += val[i];
2975
+ }
2976
+ }
2977
+ if (cateAes == "x") {
2978
+ result.y = result.height.map((v, i) => offset[i] + v / 2);
2979
+ result.width = cates.map((_) => width);
2980
+ } else {
2981
+ result.x = result.width.map((v, i) => offset[i] + v / 2);
2982
+ result.height = cates.map((_) => height);
2983
+ }
2984
+ } else if (position == "dodge") {
2985
+ let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
2986
+ let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
2987
+ if (cateAes == "x") {
2988
+ result.y = result.height.map((v) => v / 2);
2989
+ result.width = $group.map((arr) => width / arr.length);
2990
+ result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
2991
+ } else {
2992
+ result.x = result.width.map((v) => v / 2);
2993
+ result.height = $group.map((arr) => height / arr.length);
2994
+ result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
2995
+ }
2996
+ } else {
2997
+ if (cateAes == "x") {
2998
+ result.y = result.height.map((v) => v / 2);
2999
+ result.width = cates.map((_) => width);
3000
+ } else {
3001
+ result.x = result.width.map((v) => v / 2);
3002
+ result.height = cates.map((_) => height);
3003
+ }
3004
+ }
3005
+ return result;
3006
+ }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2910
3007
  const curve = Object.assign(function(data) {
2911
3008
  if (data.points != null) return data;
2912
3009
  let missingAes = ["x", "y"].filter((a) => data[a] == null);
@@ -3331,6 +3428,7 @@ var VVPlot = (function(exports, vue) {
3331
3428
  __proto__: null,
3332
3429
  bar,
3333
3430
  boxplot,
3431
+ col,
3334
3432
  curve,
3335
3433
  density,
3336
3434
  ellipse,
@@ -7350,9 +7448,9 @@ var VVPlot = (function(exports, vue) {
7350
7448
  }
7351
7449
  getComputedLayers() {
7352
7450
  return this.layers.map((layer) => {
7353
- let data = Object.values(Object.groupBy(layer.data.$group.map(
7451
+ let data = layer.data.$group.map(
7354
7452
  (_, i) => vvgeom[layer.geom].validate(object_map(layer.data, (k, v) => v?.[i]))
7355
- ).filter((x2) => x2 != null), (d) => d.$group));
7453
+ ).filter((x2) => x2 != null);
7356
7454
  return { data, geom: layer.geom, vBind: layer.vBind };
7357
7455
  });
7358
7456
  }
@@ -7537,9 +7635,9 @@ var VVPlot = (function(exports, vue) {
7537
7635
  return breaks;
7538
7636
  }
7539
7637
  }
7540
- const _hoisted_1$e = ["font-size"];
7638
+ const _hoisted_1$q = ["font-size"];
7541
7639
  const _hoisted_2$8 = { key: 0 };
7542
- const _sfc_main$17 = {
7640
+ const _sfc_main$18 = {
7543
7641
  __name: "CoreText",
7544
7642
  props: {
7545
7643
  x: { type: Number, default: 0 },
@@ -7567,8 +7665,9 @@ var VVPlot = (function(exports, vue) {
7567
7665
  setup(__props) {
7568
7666
  const ele = vue.useTemplateRef("ele");
7569
7667
  const textBox = vue.reactive({ width: 0, height: 0 });
7668
+ const visible = vue.inject("vvplot-visible", true);
7570
7669
  vue.watch(
7571
- [ele, () => __props.fontSize, () => __props.size, () => __props.text, () => __props.textLength, () => __props.fontFamily],
7670
+ [ele, visible, () => __props.fontSize, () => __props.size, () => __props.text, () => __props.textLength, () => __props.fontFamily],
7572
7671
  async ([e]) => {
7573
7672
  if (!e) return;
7574
7673
  await vue.nextTick();
@@ -7626,7 +7725,7 @@ var VVPlot = (function(exports, vue) {
7626
7725
  __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_2$8, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
7627
7726
  vue.createTextVNode(" " + vue.toDisplayString(__props.text?.replace(/ /g, " ")), 1)
7628
7727
  ])
7629
- ], 16, _hoisted_1$e);
7728
+ ], 16, _hoisted_1$q);
7630
7729
  };
7631
7730
  }
7632
7731
  };
@@ -14788,9 +14887,9 @@ var VVPlot = (function(exports, vue) {
14788
14887
  XmlRenderer.prototype.cr = cr;
14789
14888
  XmlRenderer.prototype.tag = tag;
14790
14889
  XmlRenderer.prototype.esc = escapeXml;
14791
- const _hoisted_1$d = ["text-anchor", "font-size"];
14890
+ const _hoisted_1$p = ["text-anchor", "font-size"];
14792
14891
  const _hoisted_2$7 = { key: 0 };
14793
- const _sfc_main$16 = {
14892
+ const _sfc_main$17 = {
14794
14893
  __name: "CoreMarkdown",
14795
14894
  props: {
14796
14895
  x: { type: Number, default: 0 },
@@ -14819,8 +14918,9 @@ var VVPlot = (function(exports, vue) {
14819
14918
  const parser = new Parser();
14820
14919
  const ele = vue.useTemplateRef("ele");
14821
14920
  const textBox = vue.reactive({ width: 0, height: 0 });
14921
+ const visible = vue.inject("vvplot-visible", true);
14822
14922
  vue.watch(
14823
- [ele, () => __props.fontSize, () => __props.size, () => __props.text, () => __props.textLength, () => __props.fontFamily],
14923
+ [ele, visible, () => __props.fontSize, () => __props.size, () => __props.text, () => __props.textLength, () => __props.fontFamily],
14824
14924
  async ([e]) => {
14825
14925
  if (!e) return;
14826
14926
  await vue.nextTick();
@@ -14933,11 +15033,11 @@ var VVPlot = (function(exports, vue) {
14933
15033
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(textFragments.value, (span) => {
14934
15034
  return vue.openBlock(), vue.createElementBlock("tspan", vue.mergeProps({ ref_for: true }, span.vbind), vue.toDisplayString(span.text), 17);
14935
15035
  }), 256))
14936
- ], 16, _hoisted_1$d);
15036
+ ], 16, _hoisted_1$p);
14937
15037
  };
14938
15038
  }
14939
15039
  };
14940
- const _sfc_main$15 = {
15040
+ const _sfc_main$16 = {
14941
15041
  __name: "CoreAxisLabel",
14942
15042
  props: {
14943
15043
  type: String,
@@ -14999,11 +15099,11 @@ var VVPlot = (function(exports, vue) {
14999
15099
  }
15000
15100
  };
15001
15101
  return (_ctx, _cache) => {
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));
15102
+ return __props.type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ key: 0 }, vue.toHandlers(vOn)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$18, vue.mergeProps({ key: 1 }, vue.toHandlers(vOn)), null, 16));
15003
15103
  };
15004
15104
  }
15005
15105
  };
15006
- const _hoisted_1$c = ["transform"];
15106
+ const _hoisted_1$o = ["transform"];
15007
15107
  const _hoisted_2$6 = ["x2"];
15008
15108
  const _hoisted_3$4 = {
15009
15109
  class: "vvplot-interactive",
@@ -15016,7 +15116,7 @@ var VVPlot = (function(exports, vue) {
15016
15116
  fill: "transparent"
15017
15117
  };
15018
15118
  const _hoisted_6$2 = ["x"];
15019
- const _sfc_main$14 = {
15119
+ const _sfc_main$15 = {
15020
15120
  __name: "CoreAxisH",
15021
15121
  props: {
15022
15122
  coord: String,
@@ -15205,16 +15305,15 @@ var VVPlot = (function(exports, vue) {
15205
15305
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({ hmin: hmin0 + dh, hmax: hmax0 + dh });
15206
15306
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15207
15307
  };
15208
- e.target.onpointerup = (ev) => {
15308
+ e.target.addEventListener("pointerup", function(ev) {
15209
15309
  e.target.onpointermove = null;
15210
- e.target.onpointerup = null;
15211
15310
  e.target.style.cursor = null;
15212
15311
  if (!pointerMoved) return;
15213
15312
  moveTimer = setTimeout(() => {
15214
15313
  applyTransform(act, ev);
15215
15314
  movementX = 0;
15216
15315
  }, 300);
15217
- };
15316
+ }, { once: true });
15218
15317
  }
15219
15318
  function axisRescaleLeftPointerdown(e) {
15220
15319
  let act = __props.action.find((a) => a.action == "rescale");
@@ -15240,11 +15339,10 @@ var VVPlot = (function(exports, vue) {
15240
15339
  });
15241
15340
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15242
15341
  };
15243
- e.target.onpointerup = (ev) => {
15342
+ e.target.addEventListener("pointerup", function(ev) {
15244
15343
  e.target.onpointermove = null;
15245
- e.target.onpointerup = null;
15246
15344
  applyTransform(act, ev);
15247
- };
15345
+ }, { once: true });
15248
15346
  }
15249
15347
  function axisRescaleRightPointerdown(e) {
15250
15348
  let act = __props.action.find((a) => a.action == "rescale");
@@ -15270,11 +15368,10 @@ var VVPlot = (function(exports, vue) {
15270
15368
  });
15271
15369
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15272
15370
  };
15273
- e.target.onpointerup = (ev) => {
15371
+ e.target.addEventListener("pointerup", function(ev) {
15274
15372
  e.target.onpointermove = null;
15275
- e.target.onpointerup = null;
15276
15373
  applyTransform(act, ev);
15277
- };
15374
+ }, { once: true });
15278
15375
  }
15279
15376
  let wheelDelta = 0, wheelTimer;
15280
15377
  function axisWheel(e) {
@@ -15382,7 +15479,7 @@ var VVPlot = (function(exports, vue) {
15382
15479
  _cache[2] || (_cache[2] = vue.createTextVNode()),
15383
15480
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
15384
15481
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
15385
- vue.createVNode(_sfc_main$15, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
15482
+ vue.createVNode(_sfc_main$16, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
15386
15483
  ], 16);
15387
15484
  }), 256)),
15388
15485
  _cache[3] || (_cache[3] = vue.createTextVNode()),
@@ -15415,13 +15512,13 @@ var VVPlot = (function(exports, vue) {
15415
15512
  ])) : vue.createCommentVNode("", true),
15416
15513
  _cache[5] || (_cache[5] = vue.createTextVNode()),
15417
15514
  axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
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))
15515
+ __props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$17, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$18, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
15419
15516
  ], 64)) : vue.createCommentVNode("", true)
15420
- ], 12, _hoisted_1$c);
15517
+ ], 12, _hoisted_1$o);
15421
15518
  };
15422
15519
  }
15423
15520
  };
15424
- const _hoisted_1$b = ["transform"];
15521
+ const _hoisted_1$n = ["transform"];
15425
15522
  const _hoisted_2$5 = ["y2"];
15426
15523
  const _hoisted_3$3 = {
15427
15524
  class: "vvplot-interactive",
@@ -15434,7 +15531,7 @@ var VVPlot = (function(exports, vue) {
15434
15531
  fill: "transparent"
15435
15532
  };
15436
15533
  const _hoisted_6$1 = ["y"];
15437
- const _sfc_main$13 = {
15534
+ const _sfc_main$14 = {
15438
15535
  __name: "CoreAxisV",
15439
15536
  props: {
15440
15537
  coord: String,
@@ -15623,16 +15720,15 @@ var VVPlot = (function(exports, vue) {
15623
15720
  let { xmin, xmax, ymin, ymax } = __props.pos2coord({ vmin: vmin0 + dv, vmax: vmax0 + dv });
15624
15721
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15625
15722
  };
15626
- e.target.onpointerup = (ev) => {
15723
+ e.target.addEventListener("pointerup", function(ev) {
15627
15724
  e.target.onpointermove = null;
15628
- e.target.onpointerup = null;
15629
15725
  e.target.style.cursor = null;
15630
15726
  if (!pointerMoved) return;
15631
15727
  moveTimer = setTimeout(() => {
15632
15728
  applyTransform(act, ev);
15633
15729
  movementY = 0;
15634
15730
  }, 300);
15635
- };
15731
+ }, { once: true });
15636
15732
  }
15637
15733
  function axisRescaleTopPointerdown(e) {
15638
15734
  let act = __props.action.find((a) => a.action == "rescale");
@@ -15658,11 +15754,10 @@ var VVPlot = (function(exports, vue) {
15658
15754
  });
15659
15755
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15660
15756
  };
15661
- e.target.onpointerup = (ev) => {
15757
+ e.target.addEventListener("pointerup", function(ev) {
15662
15758
  e.target.onpointermove = null;
15663
- e.target.onpointerup = null;
15664
15759
  applyTransform(act, ev);
15665
- };
15760
+ }, { once: true });
15666
15761
  }
15667
15762
  function axisRescaleBottomPointerdown(e) {
15668
15763
  let act = __props.action.find((a) => a.action == "rescale");
@@ -15688,11 +15783,10 @@ var VVPlot = (function(exports, vue) {
15688
15783
  });
15689
15784
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
15690
15785
  };
15691
- e.target.onpointerup = (ev) => {
15786
+ e.target.addEventListener("pointerup", function(ev) {
15692
15787
  e.target.onpointermove = null;
15693
- e.target.onpointerup = null;
15694
15788
  applyTransform(act, ev);
15695
- };
15789
+ }, { once: true });
15696
15790
  }
15697
15791
  let wheelDelta = 0, wheelTimer;
15698
15792
  function axisWheel(e) {
@@ -15800,7 +15894,7 @@ var VVPlot = (function(exports, vue) {
15800
15894
  _cache[2] || (_cache[2] = vue.createTextVNode()),
15801
15895
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
15802
15896
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
15803
- vue.createVNode(_sfc_main$15, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
15897
+ vue.createVNode(_sfc_main$16, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
15804
15898
  ], 16);
15805
15899
  }), 256)),
15806
15900
  _cache[3] || (_cache[3] = vue.createTextVNode()),
@@ -15833,13 +15927,13 @@ var VVPlot = (function(exports, vue) {
15833
15927
  ])) : vue.createCommentVNode("", true),
15834
15928
  _cache[5] || (_cache[5] = vue.createTextVNode()),
15835
15929
  axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
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))
15930
+ __props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$17, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$18, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
15837
15931
  ], 64)) : vue.createCommentVNode("", true)
15838
- ], 12, _hoisted_1$b);
15932
+ ], 12, _hoisted_1$n);
15839
15933
  };
15840
15934
  }
15841
15935
  };
15842
- const _sfc_main$12 = {
15936
+ const _sfc_main$13 = {
15843
15937
  __name: "CoreAxis",
15844
15938
  props: {
15845
15939
  theme: { type: Object, default: () => ({}) },
@@ -15848,8 +15942,8 @@ var VVPlot = (function(exports, vue) {
15848
15942
  },
15849
15943
  setup(__props) {
15850
15944
  const axis = {
15851
- h: _sfc_main$14,
15852
- v: _sfc_main$13
15945
+ h: _sfc_main$15,
15946
+ v: _sfc_main$14
15853
15947
  };
15854
15948
  return (_ctx, _cache) => {
15855
15949
  return __props.position != "none" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(axis[__props.orientation]), {
@@ -15860,7 +15954,7 @@ var VVPlot = (function(exports, vue) {
15860
15954
  };
15861
15955
  }
15862
15956
  };
15863
- const _sfc_main$11 = {
15957
+ const _sfc_main$12 = {
15864
15958
  __name: "CoreGridH",
15865
15959
  props: {
15866
15960
  breaks: { type: Array, default: () => [] },
@@ -15932,7 +16026,7 @@ var VVPlot = (function(exports, vue) {
15932
16026
  };
15933
16027
  }
15934
16028
  };
15935
- const _sfc_main$10 = {
16029
+ const _sfc_main$11 = {
15936
16030
  __name: "CoreGridV",
15937
16031
  props: {
15938
16032
  breaks: { type: Array, default: () => [] },
@@ -16004,7 +16098,7 @@ var VVPlot = (function(exports, vue) {
16004
16098
  };
16005
16099
  }
16006
16100
  };
16007
- const _sfc_main$$ = {
16101
+ const _sfc_main$10 = {
16008
16102
  __name: "CoreCanvasBoxplot",
16009
16103
  props: {
16010
16104
  extendX: { type: Number, default: 0 },
@@ -16038,83 +16132,81 @@ var VVPlot = (function(exports, vue) {
16038
16132
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16039
16133
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16040
16134
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16041
- for (const group of __props.data) {
16042
- for (let {
16043
- x: x2,
16044
- xmin,
16045
- xmax,
16046
- y: y2,
16047
- ymin,
16048
- ymax,
16049
- lwisker,
16050
- Q1,
16051
- median,
16052
- Q3,
16053
- uwisker,
16054
- outliers,
16055
- $xmin,
16056
- $xmax,
16057
- $ymin,
16058
- $ymax,
16059
- fill = "white",
16060
- color: color2 = "black",
16061
- linewidth = 1,
16062
- linetype,
16063
- alpha: alpha2,
16064
- "translate-x": translateX = 0,
16065
- "translate-y": translateY = 0,
16066
- $raw
16067
- } of group) {
16068
- 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 });
16069
- const { h: lx1, v: ly1 } = __props.coord2pos(x2 == null ? { y: y2, x: lwisker } : { x: x2, y: lwisker });
16070
- const { h: lx2, v: ly2 } = __props.coord2pos(x2 == null ? { y: y2, x: uwisker } : { x: x2, y: uwisker });
16071
- const { h: mx1, v: my1 } = __props.coord2pos(x2 == null ? { y: ymin, x: median } : { x: xmin, y: median });
16072
- const { h: mx2, v: my2 } = __props.coord2pos(x2 == null ? { y: ymax, x: median } : { x: xmax, y: median });
16073
- 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 });
16074
- 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 });
16075
- 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 });
16076
- 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 });
16077
- ctx.globalAlpha = alpha2;
16078
- ctx.setLineDash(parseLinetype(linetype));
16079
- const linepath2d = new Path2D();
16080
- linepath2d.moveTo(lx1 + translateX, ly1 + translateY);
16081
- linepath2d.lineTo(lx2 + translateX, ly2 + translateY);
16082
- const wiskerpath2d = new Path2D();
16083
- wiskerpath2d.moveTo(uwx1 + translateX, uwy1 + translateY);
16084
- wiskerpath2d.lineTo(uwx2 + translateX, uwy2 + translateY);
16085
- wiskerpath2d.moveTo(lwx1 + translateX, lwy1 + translateY);
16086
- wiskerpath2d.lineTo(lwx2 + translateX, lwy2 + translateY);
16087
- const rectpath2d = new Path2D();
16088
- rectpath2d.rect(rx1 + translateX, ry1 + translateY, rx2 - rx1, ry2 - ry1);
16089
- _path_data.set(rectpath2d, $raw);
16090
- const medianpath2d = new Path2D();
16091
- medianpath2d.moveTo(mx1 + translateX, my1 + translateY);
16092
- medianpath2d.lineTo(mx2 + translateX, my2 + translateY);
16093
- if (color2 != null && color2 !== "none") {
16094
- ctx.strokeStyle = color2;
16095
- ctx.lineWidth = linewidth;
16096
- ctx.stroke(linepath2d);
16097
- ctx.stroke(wiskerpath2d);
16098
- }
16099
- if (fill !== "none") {
16100
- ctx.fillStyle = fill;
16101
- ctx.fill(rectpath2d);
16102
- }
16135
+ for (let {
16136
+ x: x2,
16137
+ xmin,
16138
+ xmax,
16139
+ y: y2,
16140
+ ymin,
16141
+ ymax,
16142
+ lwisker,
16143
+ Q1,
16144
+ median,
16145
+ Q3,
16146
+ uwisker,
16147
+ outliers,
16148
+ $xmin,
16149
+ $xmax,
16150
+ $ymin,
16151
+ $ymax,
16152
+ fill = "white",
16153
+ color: color2 = "black",
16154
+ linewidth = 1,
16155
+ linetype,
16156
+ alpha: alpha2,
16157
+ "translate-x": translateX = 0,
16158
+ "translate-y": translateY = 0,
16159
+ $raw
16160
+ } of __props.data) {
16161
+ 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 });
16162
+ const { h: lx1, v: ly1 } = __props.coord2pos(x2 == null ? { y: y2, x: lwisker } : { x: x2, y: lwisker });
16163
+ const { h: lx2, v: ly2 } = __props.coord2pos(x2 == null ? { y: y2, x: uwisker } : { x: x2, y: uwisker });
16164
+ const { h: mx1, v: my1 } = __props.coord2pos(x2 == null ? { y: ymin, x: median } : { x: xmin, y: median });
16165
+ const { h: mx2, v: my2 } = __props.coord2pos(x2 == null ? { y: ymax, x: median } : { x: xmax, y: median });
16166
+ 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 });
16167
+ 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 });
16168
+ 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 });
16169
+ 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 });
16170
+ ctx.globalAlpha = alpha2;
16171
+ ctx.setLineDash(parseLinetype(linetype));
16172
+ const linepath2d = new Path2D();
16173
+ linepath2d.moveTo(lx1 + translateX, ly1 + translateY);
16174
+ linepath2d.lineTo(lx2 + translateX, ly2 + translateY);
16175
+ const wiskerpath2d = new Path2D();
16176
+ wiskerpath2d.moveTo(uwx1 + translateX, uwy1 + translateY);
16177
+ wiskerpath2d.lineTo(uwx2 + translateX, uwy2 + translateY);
16178
+ wiskerpath2d.moveTo(lwx1 + translateX, lwy1 + translateY);
16179
+ wiskerpath2d.lineTo(lwx2 + translateX, lwy2 + translateY);
16180
+ const rectpath2d = new Path2D();
16181
+ rectpath2d.rect(rx1 + translateX, ry1 + translateY, rx2 - rx1, ry2 - ry1);
16182
+ _path_data.set(rectpath2d, $raw);
16183
+ const medianpath2d = new Path2D();
16184
+ medianpath2d.moveTo(mx1 + translateX, my1 + translateY);
16185
+ medianpath2d.lineTo(mx2 + translateX, my2 + translateY);
16186
+ if (color2 != null && color2 !== "none") {
16187
+ ctx.strokeStyle = color2;
16188
+ ctx.lineWidth = linewidth;
16189
+ ctx.stroke(linepath2d);
16190
+ ctx.stroke(wiskerpath2d);
16191
+ }
16192
+ if (fill !== "none") {
16193
+ ctx.fillStyle = fill;
16194
+ ctx.fill(rectpath2d);
16195
+ }
16196
+ if (color2 != null && color2 !== "none") {
16197
+ ctx.stroke(rectpath2d);
16198
+ ctx.lineWidth = linewidth * 2;
16199
+ ctx.stroke(medianpath2d);
16200
+ }
16201
+ for (let { x: x3, y: y3, $raw: $raw2 } of outliers) {
16202
+ const { h: ox, v: oy } = __props.coord2pos({ x: x3, y: y3 });
16203
+ const outlierpath2d = new Path2D();
16204
+ outlierpath2d.arc(ox + translateX, oy + translateY, 2, 0, Math.PI * 2);
16103
16205
  if (color2 != null && color2 !== "none") {
16104
- ctx.stroke(rectpath2d);
16105
- ctx.lineWidth = linewidth * 2;
16106
- ctx.stroke(medianpath2d);
16107
- }
16108
- for (let { x: x3, y: y3, $raw: $raw2 } of outliers) {
16109
- const { h: ox, v: oy } = __props.coord2pos({ x: x3, y: y3 });
16110
- const outlierpath2d = new Path2D();
16111
- outlierpath2d.arc(ox + translateX, oy + translateY, 2, 0, Math.PI * 2);
16112
- if (color2 != null && color2 !== "none") {
16113
- ctx.fillStyle = color2;
16114
- ctx.fill(outlierpath2d);
16115
- }
16116
- _path_data.set(outlierpath2d, $raw2);
16206
+ ctx.fillStyle = color2;
16207
+ ctx.fill(outlierpath2d);
16117
16208
  }
16209
+ _path_data.set(outlierpath2d, $raw2);
16118
16210
  }
16119
16211
  }
16120
16212
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16142,11 +16234,11 @@ var VVPlot = (function(exports, vue) {
16142
16234
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16143
16235
  });
16144
16236
  return (_ctx, _cache) => {
16145
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16237
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16146
16238
  };
16147
16239
  }
16148
16240
  };
16149
- const _sfc_main$_ = {
16241
+ const _sfc_main$$ = {
16150
16242
  __name: "CoreCanvasCurve",
16151
16243
  props: {
16152
16244
  extendX: { type: Number, default: 0 },
@@ -16180,41 +16272,39 @@ var VVPlot = (function(exports, vue) {
16180
16272
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16181
16273
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16182
16274
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16183
- for (const group of __props.data) {
16184
- for (let {
16185
- points,
16186
- fill,
16187
- color: color2,
16188
- linewidth,
16189
- linetype,
16190
- alpha: alpha2,
16191
- "translate-x": translateX = 0,
16192
- "translate-y": translateY = 0,
16193
- $raw,
16194
- interpolate: interpolate2
16195
- } of group) {
16196
- points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
16197
- if (points.length === 0) continue;
16198
- const path2d = new Path2D();
16199
- let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
16200
- let interpolator = interpolatorFn(path2d);
16201
- interpolator.lineStart();
16202
- for (let i = 0; i < points.length; i++) {
16203
- interpolator.point(points[i].x + translateX, points[i].y + translateY);
16204
- }
16205
- interpolator.lineEnd();
16206
- _path_data.set(path2d, $raw);
16207
- ctx.lineWidth = linewidth;
16208
- ctx.globalAlpha = alpha2;
16209
- ctx.setLineDash(parseLinetype(linetype));
16210
- if (fill !== "none") {
16211
- ctx.fillStyle = fill;
16212
- ctx.fill(path2d);
16213
- }
16214
- if (color2 != null && color2 !== "none") {
16215
- ctx.strokeStyle = color2;
16216
- ctx.stroke(path2d);
16217
- }
16275
+ for (let {
16276
+ points,
16277
+ fill,
16278
+ color: color2,
16279
+ linewidth,
16280
+ linetype,
16281
+ alpha: alpha2,
16282
+ "translate-x": translateX = 0,
16283
+ "translate-y": translateY = 0,
16284
+ $raw,
16285
+ interpolate: interpolate2
16286
+ } of __props.data) {
16287
+ points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
16288
+ if (points.length === 0) continue;
16289
+ const path2d = new Path2D();
16290
+ let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
16291
+ let interpolator = interpolatorFn(path2d);
16292
+ interpolator.lineStart();
16293
+ for (let i = 0; i < points.length; i++) {
16294
+ interpolator.point(points[i].x + translateX, points[i].y + translateY);
16295
+ }
16296
+ interpolator.lineEnd();
16297
+ _path_data.set(path2d, $raw);
16298
+ ctx.lineWidth = linewidth;
16299
+ ctx.globalAlpha = alpha2;
16300
+ ctx.setLineDash(parseLinetype(linetype));
16301
+ if (fill !== "none") {
16302
+ ctx.fillStyle = fill;
16303
+ ctx.fill(path2d);
16304
+ }
16305
+ if (color2 != null && color2 !== "none") {
16306
+ ctx.strokeStyle = color2;
16307
+ ctx.stroke(path2d);
16218
16308
  }
16219
16309
  }
16220
16310
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16251,11 +16341,11 @@ var VVPlot = (function(exports, vue) {
16251
16341
  natural: natural$1
16252
16342
  };
16253
16343
  return (_ctx, _cache) => {
16254
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16344
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16255
16345
  };
16256
16346
  }
16257
16347
  };
16258
- const _sfc_main$Z = {
16348
+ const _sfc_main$_ = {
16259
16349
  __name: "CoreCanvasEllipse",
16260
16350
  props: {
16261
16351
  extendX: { type: Number, default: 0 },
@@ -16289,46 +16379,44 @@ var VVPlot = (function(exports, vue) {
16289
16379
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16290
16380
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16291
16381
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16292
- for (const group of __props.data) {
16293
- for (let {
16294
- cx,
16295
- cy,
16296
- A,
16297
- B,
16298
- C,
16299
- fill,
16300
- color: color2,
16301
- linewidth,
16302
- linetype,
16303
- alpha: alpha2,
16304
- "translate-x": translateX = 0,
16305
- "translate-y": translateY = 0,
16306
- $raw
16307
- } of group) {
16308
- let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
16309
- const { h: ch, v: cv } = __props.coord2pos({ x: cx, y: cy });
16310
- 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 });
16311
- let scaleX = (h2 - h1) / (2 * dx), scaleY = (v2 - v1) / (2 * dy);
16312
- A /= scaleX * scaleX;
16313
- B /= scaleX * scaleY;
16314
- C /= scaleY * scaleY;
16315
- const tr = A + C, det = A * C - B * B;
16316
- const disc = Math.sqrt(Math.max(0, tr * tr / 4 - det));
16317
- let rx2 = 1 / Math.sqrt(tr / 2 + disc), ry = 1 / Math.sqrt(tr / 2 - disc), angle2 = Math.atan2(2 * B, A - C) / 2;
16318
- const path2d = new Path2D();
16319
- path2d.ellipse(ch + translateX, cv + translateY, rx2, ry, angle2, 0, 2 * Math.PI);
16320
- _path_data.set(path2d, $raw);
16321
- ctx.lineWidth = linewidth;
16322
- ctx.globalAlpha = alpha2;
16323
- ctx.setLineDash(parseLinetype(linetype));
16324
- if (fill !== "none") {
16325
- ctx.fillStyle = fill;
16326
- ctx.fill(path2d);
16327
- }
16328
- if (color2 != null && color2 !== "none") {
16329
- ctx.strokeStyle = color2;
16330
- ctx.stroke(path2d);
16331
- }
16382
+ for (let {
16383
+ cx,
16384
+ cy,
16385
+ A,
16386
+ B,
16387
+ C,
16388
+ fill,
16389
+ color: color2,
16390
+ linewidth,
16391
+ linetype,
16392
+ alpha: alpha2,
16393
+ "translate-x": translateX = 0,
16394
+ "translate-y": translateY = 0,
16395
+ $raw
16396
+ } of __props.data) {
16397
+ let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
16398
+ const { h: ch, v: cv } = __props.coord2pos({ x: cx, y: cy });
16399
+ 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 });
16400
+ let scaleX = (h2 - h1) / (2 * dx), scaleY = (v2 - v1) / (2 * dy);
16401
+ A /= scaleX * scaleX;
16402
+ B /= scaleX * scaleY;
16403
+ C /= scaleY * scaleY;
16404
+ const tr = A + C, det = A * C - B * B;
16405
+ const disc = Math.sqrt(Math.max(0, tr * tr / 4 - det));
16406
+ let rx2 = 1 / Math.sqrt(tr / 2 + disc), ry = 1 / Math.sqrt(tr / 2 - disc), angle2 = Math.atan2(2 * B, A - C) / 2;
16407
+ const path2d = new Path2D();
16408
+ path2d.ellipse(ch + translateX, cv + translateY, rx2, ry, angle2, 0, 2 * Math.PI);
16409
+ _path_data.set(path2d, $raw);
16410
+ ctx.lineWidth = linewidth;
16411
+ ctx.globalAlpha = alpha2;
16412
+ ctx.setLineDash(parseLinetype(linetype));
16413
+ if (fill !== "none") {
16414
+ ctx.fillStyle = fill;
16415
+ ctx.fill(path2d);
16416
+ }
16417
+ if (color2 != null && color2 !== "none") {
16418
+ ctx.strokeStyle = color2;
16419
+ ctx.stroke(path2d);
16332
16420
  }
16333
16421
  }
16334
16422
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16356,11 +16444,11 @@ var VVPlot = (function(exports, vue) {
16356
16444
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16357
16445
  });
16358
16446
  return (_ctx, _cache) => {
16359
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16447
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16360
16448
  };
16361
16449
  }
16362
16450
  };
16363
- const _sfc_main$Y = {
16451
+ const _sfc_main$Z = {
16364
16452
  __name: "CoreCanvasLine",
16365
16453
  props: {
16366
16454
  extendX: { type: Number, default: 0 },
@@ -16394,33 +16482,31 @@ var VVPlot = (function(exports, vue) {
16394
16482
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16395
16483
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16396
16484
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16397
- for (const group of __props.data) {
16398
- for (let {
16399
- x: x2,
16400
- y: y2,
16401
- xend,
16402
- yend,
16403
- color: color2 = "black",
16404
- linewidth,
16405
- alpha: alpha2,
16406
- linetype,
16407
- "translate-x": translateX = 0,
16408
- "translate-y": translateY = 0,
16409
- $raw
16410
- } of group) {
16411
- const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
16412
- const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
16413
- const path2d = new Path2D();
16414
- path2d.moveTo(x1 + translateX, y1 + translateY);
16415
- path2d.lineTo(x22 + translateX, y22 + translateY);
16416
- _path_data.set(path2d, $raw);
16417
- ctx.lineWidth = linewidth;
16418
- ctx.globalAlpha = alpha2;
16419
- ctx.setLineDash(parseLinetype(linetype));
16420
- if (color2 != null && color2 !== "none") {
16421
- ctx.strokeStyle = color2;
16422
- ctx.stroke(path2d);
16423
- }
16485
+ for (let {
16486
+ x: x2,
16487
+ y: y2,
16488
+ xend,
16489
+ yend,
16490
+ color: color2 = "black",
16491
+ linewidth,
16492
+ alpha: alpha2,
16493
+ linetype,
16494
+ "translate-x": translateX = 0,
16495
+ "translate-y": translateY = 0,
16496
+ $raw
16497
+ } of __props.data) {
16498
+ const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
16499
+ const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
16500
+ const path2d = new Path2D();
16501
+ path2d.moveTo(x1 + translateX, y1 + translateY);
16502
+ path2d.lineTo(x22 + translateX, y22 + translateY);
16503
+ _path_data.set(path2d, $raw);
16504
+ ctx.lineWidth = linewidth;
16505
+ ctx.globalAlpha = alpha2;
16506
+ ctx.setLineDash(parseLinetype(linetype));
16507
+ if (color2 != null && color2 !== "none") {
16508
+ ctx.strokeStyle = color2;
16509
+ ctx.stroke(path2d);
16424
16510
  }
16425
16511
  }
16426
16512
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16448,11 +16534,11 @@ var VVPlot = (function(exports, vue) {
16448
16534
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16449
16535
  });
16450
16536
  return (_ctx, _cache) => {
16451
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16537
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16452
16538
  };
16453
16539
  }
16454
16540
  };
16455
- const _sfc_main$X = {
16541
+ const _sfc_main$Y = {
16456
16542
  __name: "CoreCanvasPoint",
16457
16543
  props: {
16458
16544
  extendX: { type: Number, default: 0 },
@@ -16494,55 +16580,53 @@ var VVPlot = (function(exports, vue) {
16494
16580
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16495
16581
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16496
16582
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16497
- for (const group of __props.data) {
16498
- for (let {
16499
- x: x2,
16500
- y: y2,
16501
- size = 6,
16502
- shape: shape2,
16503
- color: color2,
16504
- stroke,
16505
- linewidth,
16506
- linetype,
16507
- alpha: alpha2,
16508
- "translate-x": translateX = 0,
16509
- "translate-y": translateY = 0,
16510
- angle: angle2 = 0,
16511
- $raw
16512
- } of group) {
16513
- const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
16514
- if (typeof angle2 == "object") {
16515
- let { dx = 0, dy = 0 } = angle2;
16516
- let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
16517
- angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
16518
- }
16519
- const path2d = new Path2D();
16520
- if (String(shape2).startsWith("path:")) {
16521
- path2d.addPath(
16522
- new Path2D(shape2.slice(5)),
16523
- new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
16524
- );
16525
- } else if (shape2 in paths) {
16526
- path2d.addPath(
16527
- new Path2D(paths[shape2](size)),
16528
- new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
16529
- );
16530
- } else {
16531
- path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
16532
- }
16533
- _path_data.set(path2d, $raw);
16534
- ctx.lineWidth = linewidth;
16535
- ctx.globalAlpha = alpha2;
16536
- ctx.beginPath();
16537
- if (color2 !== "none") {
16538
- ctx.fillStyle = color2;
16539
- ctx.fill(path2d);
16540
- }
16541
- if (stroke != null && stroke !== "none") {
16542
- ctx.strokeStyle = stroke;
16543
- ctx.setLineDash(parseLinetype(linetype));
16544
- ctx.stroke(path2d);
16545
- }
16583
+ for (let {
16584
+ x: x2,
16585
+ y: y2,
16586
+ size = 6,
16587
+ shape: shape2,
16588
+ color: color2,
16589
+ stroke,
16590
+ linewidth,
16591
+ linetype,
16592
+ alpha: alpha2,
16593
+ "translate-x": translateX = 0,
16594
+ "translate-y": translateY = 0,
16595
+ angle: angle2 = 0,
16596
+ $raw
16597
+ } of __props.data) {
16598
+ const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
16599
+ if (typeof angle2 == "object") {
16600
+ let { dx = 0, dy = 0 } = angle2;
16601
+ let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
16602
+ angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
16603
+ }
16604
+ const path2d = new Path2D();
16605
+ if (String(shape2).startsWith("path:")) {
16606
+ path2d.addPath(
16607
+ new Path2D(shape2.slice(5)),
16608
+ new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
16609
+ );
16610
+ } else if (shape2 in paths) {
16611
+ path2d.addPath(
16612
+ new Path2D(paths[shape2](size)),
16613
+ new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
16614
+ );
16615
+ } else {
16616
+ path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
16617
+ }
16618
+ _path_data.set(path2d, $raw);
16619
+ ctx.lineWidth = linewidth;
16620
+ ctx.globalAlpha = alpha2;
16621
+ ctx.beginPath();
16622
+ if (color2 !== "none") {
16623
+ ctx.fillStyle = color2;
16624
+ ctx.fill(path2d);
16625
+ }
16626
+ if (stroke != null && stroke !== "none") {
16627
+ ctx.strokeStyle = stroke;
16628
+ ctx.setLineDash(parseLinetype(linetype));
16629
+ ctx.stroke(path2d);
16546
16630
  }
16547
16631
  }
16548
16632
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16570,11 +16654,11 @@ var VVPlot = (function(exports, vue) {
16570
16654
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16571
16655
  });
16572
16656
  return (_ctx, _cache) => {
16573
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16657
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16574
16658
  };
16575
16659
  }
16576
16660
  };
16577
- const _sfc_main$W = {
16661
+ const _sfc_main$X = {
16578
16662
  __name: "CoreCanvasPolygon",
16579
16663
  props: {
16580
16664
  extendX: { type: Number, default: 0 },
@@ -16608,38 +16692,36 @@ var VVPlot = (function(exports, vue) {
16608
16692
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16609
16693
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16610
16694
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16611
- for (const group of __props.data) {
16612
- for (let {
16613
- points,
16614
- fill,
16615
- color: color2,
16616
- linewidth,
16617
- linetype,
16618
- alpha: alpha2,
16619
- "translate-x": translateX = 0,
16620
- "translate-y": translateY = 0,
16621
- $raw
16622
- } of group) {
16623
- points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
16624
- if (points.length === 0) continue;
16625
- const path2d = new Path2D();
16626
- path2d.moveTo(points[0].x + translateX, points[0].y + translateY);
16627
- for (let i = 1; i < points.length; i++) {
16628
- path2d.lineTo(points[i].x + translateX, points[i].y + translateY);
16629
- }
16630
- path2d.closePath();
16631
- _path_data.set(path2d, $raw);
16632
- ctx.lineWidth = linewidth;
16633
- ctx.globalAlpha = alpha2;
16634
- ctx.setLineDash(parseLinetype(linetype));
16635
- if (fill !== "none") {
16636
- ctx.fillStyle = fill;
16637
- ctx.fill(path2d);
16638
- }
16639
- if (color2 != null && color2 !== "none") {
16640
- ctx.strokeStyle = color2;
16641
- ctx.stroke(path2d);
16642
- }
16695
+ for (let {
16696
+ points,
16697
+ fill,
16698
+ color: color2,
16699
+ linewidth,
16700
+ linetype,
16701
+ alpha: alpha2,
16702
+ "translate-x": translateX = 0,
16703
+ "translate-y": translateY = 0,
16704
+ $raw
16705
+ } of __props.data) {
16706
+ points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
16707
+ if (points.length === 0) continue;
16708
+ const path2d = new Path2D();
16709
+ path2d.moveTo(points[0].x + translateX, points[0].y + translateY);
16710
+ for (let i = 1; i < points.length; i++) {
16711
+ path2d.lineTo(points[i].x + translateX, points[i].y + translateY);
16712
+ }
16713
+ path2d.closePath();
16714
+ _path_data.set(path2d, $raw);
16715
+ ctx.lineWidth = linewidth;
16716
+ ctx.globalAlpha = alpha2;
16717
+ ctx.setLineDash(parseLinetype(linetype));
16718
+ if (fill !== "none") {
16719
+ ctx.fillStyle = fill;
16720
+ ctx.fill(path2d);
16721
+ }
16722
+ if (color2 != null && color2 !== "none") {
16723
+ ctx.strokeStyle = color2;
16724
+ ctx.stroke(path2d);
16643
16725
  }
16644
16726
  }
16645
16727
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16667,11 +16749,11 @@ var VVPlot = (function(exports, vue) {
16667
16749
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16668
16750
  });
16669
16751
  return (_ctx, _cache) => {
16670
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16752
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16671
16753
  };
16672
16754
  }
16673
16755
  };
16674
- const _sfc_main$V = {
16756
+ const _sfc_main$W = {
16675
16757
  __name: "CoreCanvasRect",
16676
16758
  props: {
16677
16759
  extendX: { type: Number, default: 0 },
@@ -16705,36 +16787,34 @@ var VVPlot = (function(exports, vue) {
16705
16787
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16706
16788
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16707
16789
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16708
- for (const group of __props.data) {
16709
- for (let {
16710
- xmin,
16711
- xmax,
16712
- ymin,
16713
- ymax,
16714
- fill,
16715
- color: color2,
16716
- linewidth,
16717
- linetype,
16718
- alpha: alpha2,
16719
- "translate-x": translateX = 0,
16720
- "translate-y": translateY = 0,
16721
- $raw
16722
- } of group) {
16723
- const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
16724
- const path2d = new Path2D();
16725
- path2d.rect(x1 + translateX, y1 + translateY, x2 - x1, y2 - y1);
16726
- _path_data.set(path2d, $raw);
16727
- ctx.lineWidth = linewidth;
16728
- ctx.globalAlpha = alpha2;
16729
- ctx.setLineDash(parseLinetype(linetype));
16730
- if (fill !== "none") {
16731
- ctx.fillStyle = fill;
16732
- ctx.fill(path2d);
16733
- }
16734
- if (color2 !== "none" && color2 != null) {
16735
- ctx.strokeStyle = color2;
16736
- ctx.stroke(path2d);
16737
- }
16790
+ for (let {
16791
+ xmin,
16792
+ xmax,
16793
+ ymin,
16794
+ ymax,
16795
+ fill,
16796
+ color: color2,
16797
+ linewidth,
16798
+ linetype,
16799
+ alpha: alpha2,
16800
+ "translate-x": translateX = 0,
16801
+ "translate-y": translateY = 0,
16802
+ $raw
16803
+ } of __props.data) {
16804
+ const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
16805
+ const path2d = new Path2D();
16806
+ path2d.rect(x1 + translateX, y1 + translateY, x2 - x1, y2 - y1);
16807
+ _path_data.set(path2d, $raw);
16808
+ ctx.lineWidth = linewidth;
16809
+ ctx.globalAlpha = alpha2;
16810
+ ctx.setLineDash(parseLinetype(linetype));
16811
+ if (fill !== "none") {
16812
+ ctx.fillStyle = fill;
16813
+ ctx.fill(path2d);
16814
+ }
16815
+ if (color2 !== "none" && color2 != null) {
16816
+ ctx.strokeStyle = color2;
16817
+ ctx.stroke(path2d);
16738
16818
  }
16739
16819
  }
16740
16820
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
@@ -16762,11 +16842,11 @@ var VVPlot = (function(exports, vue) {
16762
16842
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16763
16843
  });
16764
16844
  return (_ctx, _cache) => {
16765
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16845
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16766
16846
  };
16767
16847
  }
16768
16848
  };
16769
- const _sfc_main$U = {
16849
+ const _sfc_main$V = {
16770
16850
  __name: "CoreCanvasText",
16771
16851
  props: {
16772
16852
  extendX: { type: Number, default: 0 },
@@ -16800,77 +16880,75 @@ var VVPlot = (function(exports, vue) {
16800
16880
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16801
16881
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16802
16882
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16803
- for (const group of __props.data) {
16804
- for (let {
16805
- x: x2,
16806
- y: y2,
16807
- color: color2,
16808
- size = 4,
16809
- label = "",
16810
- title,
16811
- stroke,
16812
- linewidth,
16813
- linetype,
16814
- alpha: alpha2,
16815
- "anchor-x": anchorX,
16816
- "anchor-y": anchorY,
16817
- "dock-x": dockX,
16818
- "dock-y": dockY,
16819
- "translate-x": translateX = 0,
16820
- "translate-y": translateY = 0,
16821
- angle: angle2,
16822
- "text-length": textLength,
16823
- "font-family": fontFamily = "sans-serif",
16824
- $raw
16825
- } of group) {
16826
- ctx.save();
16827
- const { h: tx, v: ty } = __props.coord2pos({ x: x2, y: y2 });
16828
- ctx.textAlign = "center";
16829
- ctx.textBaseline = "middle";
16830
- ctx.lineWidth = linewidth;
16831
- ctx.globalAlpha = alpha2;
16832
- ctx.font = `${size * 4}px ${fontFamily}`;
16833
- ctx.setLineDash(parseLinetype(linetype));
16834
- ctx.translate(tx + translateX, ty + translateY);
16835
- let { width: w, fontBoundingBoxAscent: a, fontBoundingBoxDescent: d } = ctx.measureText(label), width = w, height = a + d;
16836
- if (typeof textLength == "object") {
16837
- let { x: lx = 0, y: ly = 0 } = textLength;
16838
- 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 });
16839
- width = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
16840
- } else if (textLength != null) {
16841
- width = textLength;
16842
- }
16843
- if (typeof angle2 == "object") {
16844
- let { dx = 0, dy = 0 } = angle2;
16845
- let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
16846
- angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
16847
- }
16848
- if (dockX != null || dockY != null) {
16849
- 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);
16850
- if (isNaN(alnX)) alnX = 0.5;
16851
- if (isNaN(alnY)) alnY = 0.5;
16852
- 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));
16853
- ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
16854
- ctx.rotate(angle2 * Math.PI / 180);
16855
- } else {
16856
- 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);
16857
- if (isNaN(alnX)) alnX = 0.5;
16858
- if (isNaN(alnY)) alnY = 0.5;
16859
- let w2 = width, h = height;
16860
- ctx.rotate(angle2 * Math.PI / 180);
16861
- ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
16862
- }
16863
- if (width != w) ctx.scale(width / w, 1);
16864
- if (color2 !== "none") {
16865
- ctx.fillStyle = color2;
16866
- ctx.fillText(label, 0, 0);
16867
- }
16868
- if (stroke != null && stroke !== "none") {
16869
- ctx.strokeStyle = stroke;
16870
- ctx.strokeText(label, 0, 0);
16871
- }
16872
- ctx.restore();
16883
+ for (let {
16884
+ x: x2,
16885
+ y: y2,
16886
+ color: color2,
16887
+ size = 4,
16888
+ label = "",
16889
+ title,
16890
+ stroke,
16891
+ linewidth,
16892
+ linetype,
16893
+ alpha: alpha2,
16894
+ "anchor-x": anchorX,
16895
+ "anchor-y": anchorY,
16896
+ "dock-x": dockX,
16897
+ "dock-y": dockY,
16898
+ "translate-x": translateX = 0,
16899
+ "translate-y": translateY = 0,
16900
+ angle: angle2,
16901
+ "text-length": textLength,
16902
+ "font-family": fontFamily = "sans-serif",
16903
+ $raw
16904
+ } of __props.data) {
16905
+ ctx.save();
16906
+ const { h: tx, v: ty } = __props.coord2pos({ x: x2, y: y2 });
16907
+ ctx.textAlign = "center";
16908
+ ctx.textBaseline = "middle";
16909
+ ctx.lineWidth = linewidth;
16910
+ ctx.globalAlpha = alpha2;
16911
+ ctx.font = `${size * 4}px ${fontFamily}`;
16912
+ ctx.setLineDash(parseLinetype(linetype));
16913
+ ctx.translate(tx + translateX, ty + translateY);
16914
+ let { width: w, fontBoundingBoxAscent: a, fontBoundingBoxDescent: d } = ctx.measureText(label), width = w, height = a + d;
16915
+ if (typeof textLength == "object") {
16916
+ let { x: lx = 0, y: ly = 0 } = textLength;
16917
+ 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 });
16918
+ width = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
16919
+ } else if (textLength != null) {
16920
+ width = textLength;
16921
+ }
16922
+ if (typeof angle2 == "object") {
16923
+ let { dx = 0, dy = 0 } = angle2;
16924
+ let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
16925
+ angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
16926
+ }
16927
+ if (dockX != null || dockY != null) {
16928
+ 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);
16929
+ if (isNaN(alnX)) alnX = 0.5;
16930
+ if (isNaN(alnY)) alnY = 0.5;
16931
+ 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));
16932
+ ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
16933
+ ctx.rotate(angle2 * Math.PI / 180);
16934
+ } else {
16935
+ 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);
16936
+ if (isNaN(alnX)) alnX = 0.5;
16937
+ if (isNaN(alnY)) alnY = 0.5;
16938
+ let w2 = width, h = height;
16939
+ ctx.rotate(angle2 * Math.PI / 180);
16940
+ ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
16941
+ }
16942
+ if (width != w) ctx.scale(width / w, 1);
16943
+ if (color2 !== "none") {
16944
+ ctx.fillStyle = color2;
16945
+ ctx.fillText(label, 0, 0);
16946
+ }
16947
+ if (stroke != null && stroke !== "none") {
16948
+ ctx.strokeStyle = stroke;
16949
+ ctx.strokeText(label, 0, 0);
16873
16950
  }
16951
+ ctx.restore();
16874
16952
  }
16875
16953
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
16876
16954
  path_data.set(path2, _path_data.get(path2));
@@ -16897,11 +16975,11 @@ var VVPlot = (function(exports, vue) {
16897
16975
  dispatchEvent: (event) => layerCanvas.value?.dispatchEvent?.(event)
16898
16976
  });
16899
16977
  return (_ctx, _cache) => {
16900
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
16978
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
16901
16979
  };
16902
16980
  }
16903
16981
  };
16904
- const _sfc_main$T = {
16982
+ const _sfc_main$U = {
16905
16983
  __name: "CoreCanvasTextsegment",
16906
16984
  props: {
16907
16985
  extendX: { type: Number, default: 0 },
@@ -16935,69 +17013,86 @@ var VVPlot = (function(exports, vue) {
16935
17013
  ctx.scale(__props.dpi / 96, __props.dpi / 96);
16936
17014
  ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
16937
17015
  let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
16938
- for (const group of __props.data) {
16939
- for (let {
16940
- x: x2,
16941
- xend,
16942
- y: y2,
16943
- yend,
16944
- size = 4,
16945
- label = "",
16946
- title,
16947
- color: color2,
16948
- stroke,
16949
- linewidth,
16950
- linetype,
16951
- alpha: alpha2,
16952
- "translate-x": translateX = 0,
16953
- "translate-y": translateY = 0,
16954
- "text-length": textLength,
16955
- "font-family": fontFamily = "sans-serif",
16956
- "text-align": textAlign = "justify",
16957
- angle: angle2 = "auto",
16958
- inset = 0,
16959
- $raw
16960
- } of group) {
16961
- const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
16962
- const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
16963
- ctx.save();
16964
- ctx.translate(translateX, translateY);
16965
- ctx.textBaseline = "middle";
16966
- ctx.lineWidth = linewidth;
16967
- ctx.globalAlpha = alpha2;
16968
- ctx.font = `${size * 4}px ${fontFamily}`;
16969
- ctx.setLineDash(parseLinetype(linetype));
16970
- if (["stretch", "pre", "start", "center", "end", "post"].includes(textAlign)) {
16971
- let radian = Math.atan2(y22 - y1, x22 - x1);
16972
- let text2 = String(label).replace(/\x01|\x02/g, "");
16973
- let insetX = Math.cos(radian) * inset, insetY = Math.sin(radian) * inset;
16974
- switch (textAlign) {
16975
- case "stretch":
16976
- case "center":
16977
- ctx.translate((x1 + x22) / 2, (y1 + y22) / 2);
16978
- ctx.textAlign = "center";
16979
- break;
16980
- case "pre":
16981
- ctx.translate(x1 - insetX, y1 - insetY);
16982
- ctx.textAlign = "end";
16983
- break;
16984
- case "start":
16985
- ctx.translate(x1 + insetX, y1 + insetY);
16986
- ctx.textAlign = "start";
16987
- break;
16988
- case "end":
16989
- ctx.translate(x22 - insetX, y22 - insetY);
16990
- ctx.textAlign = "end";
16991
- break;
16992
- case "post":
16993
- ctx.translate(x22 + insetX, y22 + insetY);
16994
- ctx.textAlign = "start";
16995
- break;
16996
- }
17016
+ for (let {
17017
+ x: x2,
17018
+ xend,
17019
+ y: y2,
17020
+ yend,
17021
+ size = 4,
17022
+ label = "",
17023
+ title,
17024
+ color: color2,
17025
+ stroke,
17026
+ linewidth,
17027
+ linetype,
17028
+ alpha: alpha2,
17029
+ "translate-x": translateX = 0,
17030
+ "translate-y": translateY = 0,
17031
+ "text-length": textLength,
17032
+ "font-family": fontFamily = "sans-serif",
17033
+ "text-align": textAlign = "justify",
17034
+ angle: angle2 = "auto",
17035
+ inset = 0,
17036
+ $raw
17037
+ } of __props.data) {
17038
+ const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
17039
+ const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
17040
+ ctx.save();
17041
+ ctx.translate(translateX, translateY);
17042
+ ctx.textBaseline = "middle";
17043
+ ctx.lineWidth = linewidth;
17044
+ ctx.globalAlpha = alpha2;
17045
+ ctx.font = `${size * 4}px ${fontFamily}`;
17046
+ ctx.setLineDash(parseLinetype(linetype));
17047
+ if (["stretch", "pre", "start", "center", "end", "post"].includes(textAlign)) {
17048
+ let radian = Math.atan2(y22 - y1, x22 - x1);
17049
+ let text2 = String(label).replace(/\x01|\x02/g, "");
17050
+ let insetX = Math.cos(radian) * inset, insetY = Math.sin(radian) * inset;
17051
+ switch (textAlign) {
17052
+ case "stretch":
17053
+ case "center":
17054
+ ctx.translate((x1 + x22) / 2, (y1 + y22) / 2);
17055
+ ctx.textAlign = "center";
17056
+ break;
17057
+ case "pre":
17058
+ ctx.translate(x1 - insetX, y1 - insetY);
17059
+ ctx.textAlign = "end";
17060
+ break;
17061
+ case "start":
17062
+ ctx.translate(x1 + insetX, y1 + insetY);
17063
+ ctx.textAlign = "start";
17064
+ break;
17065
+ case "end":
17066
+ ctx.translate(x22 - insetX, y22 - insetY);
17067
+ ctx.textAlign = "end";
17068
+ break;
17069
+ case "post":
17070
+ ctx.translate(x22 + insetX, y22 + insetY);
17071
+ ctx.textAlign = "start";
17072
+ break;
17073
+ }
17074
+ ctx.rotate(radian);
17075
+ if (textAlign === "stretch") {
17076
+ ctx.scale(Math.hypot(x22 - x1 || 0, y22 - y1 || 0) / ctx.measureText(text2).width, 1);
17077
+ }
17078
+ if (color2 !== "none") {
17079
+ ctx.fillStyle = color2;
17080
+ ctx.fillText(text2, 0, 0);
17081
+ }
17082
+ if (stroke != null && stroke !== "none") {
17083
+ ctx.strokeStyle = stroke;
17084
+ ctx.strokeText(text2, 0, 0);
17085
+ }
17086
+ } else {
17087
+ let radian = angle2 === "auto" ? Math.atan2(y22 - y1, x22 - x1) : angle2 * Math.PI / 180;
17088
+ ctx.textAlign = "center";
17089
+ let parts = splitLabel(String(label));
17090
+ let dx = (x22 - x1) / (parts.length - 1 || 1), dy = (y22 - y1) / (parts.length - 1 || 1);
17091
+ for (let i = 0; i < parts.length; i++) {
17092
+ ctx.save();
17093
+ ctx.translate(x1 + i * dx, y1 + i * dy);
16997
17094
  ctx.rotate(radian);
16998
- if (textAlign === "stretch") {
16999
- ctx.scale(Math.hypot(x22 - x1 || 0, y22 - y1 || 0) / ctx.measureText(text2).width, 1);
17000
- }
17095
+ let text2 = parts[i];
17001
17096
  if (color2 !== "none") {
17002
17097
  ctx.fillStyle = color2;
17003
17098
  ctx.fillText(text2, 0, 0);
@@ -17006,29 +17101,10 @@ var VVPlot = (function(exports, vue) {
17006
17101
  ctx.strokeStyle = stroke;
17007
17102
  ctx.strokeText(text2, 0, 0);
17008
17103
  }
17009
- } else {
17010
- let radian = angle2 === "auto" ? Math.atan2(y22 - y1, x22 - x1) : angle2 * Math.PI / 180;
17011
- ctx.textAlign = "center";
17012
- let parts = splitLabel(String(label));
17013
- let dx = (x22 - x1) / (parts.length - 1 || 1), dy = (y22 - y1) / (parts.length - 1 || 1);
17014
- for (let i = 0; i < parts.length; i++) {
17015
- ctx.save();
17016
- ctx.translate(x1 + i * dx, y1 + i * dy);
17017
- ctx.rotate(radian);
17018
- let text2 = parts[i];
17019
- if (color2 !== "none") {
17020
- ctx.fillStyle = color2;
17021
- ctx.fillText(text2, 0, 0);
17022
- }
17023
- if (stroke != null && stroke !== "none") {
17024
- ctx.strokeStyle = stroke;
17025
- ctx.strokeText(text2, 0, 0);
17026
- }
17027
- ctx.restore();
17028
- }
17104
+ ctx.restore();
17029
17105
  }
17030
- ctx.restore();
17031
17106
  }
17107
+ ctx.restore();
17032
17108
  }
17033
17109
  for (let path2 of Array.from(_path_data.keys()).reverse()) {
17034
17110
  path_data.set(path2, _path_data.get(path2));
@@ -17069,26 +17145,27 @@ var VVPlot = (function(exports, vue) {
17069
17145
  return result;
17070
17146
  }
17071
17147
  return (_ctx, _cache) => {
17072
- return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps(vBind.value, { ref: "container" }), null, 16);
17148
+ return vue.openBlock(), vue.createElementBlock("foreignObject", vue.mergeProps({ class: "vvplot-layer" }, vBind.value, { ref: "container" }), null, 16);
17073
17149
  };
17074
17150
  }
17075
17151
  };
17076
17152
  const canvas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
17077
17153
  __proto__: null,
17078
- boxplot: _sfc_main$$,
17079
- curve: _sfc_main$_,
17080
- ellipse: _sfc_main$Z,
17081
- line: _sfc_main$Y,
17082
- point: _sfc_main$X,
17083
- polygon: _sfc_main$W,
17084
- rect: _sfc_main$V,
17085
- shape: _sfc_main$_,
17086
- stick: _sfc_main$Y,
17087
- text: _sfc_main$U,
17088
- textsegment: _sfc_main$T,
17089
- tile: _sfc_main$V
17154
+ boxplot: _sfc_main$10,
17155
+ curve: _sfc_main$$,
17156
+ ellipse: _sfc_main$_,
17157
+ line: _sfc_main$Z,
17158
+ point: _sfc_main$Y,
17159
+ polygon: _sfc_main$X,
17160
+ rect: _sfc_main$W,
17161
+ shape: _sfc_main$$,
17162
+ stick: _sfc_main$Z,
17163
+ text: _sfc_main$V,
17164
+ textsegment: _sfc_main$U,
17165
+ tile: _sfc_main$W
17090
17166
  }, Symbol.toStringTag, { value: "Module" }));
17091
- const _sfc_main$S = {
17167
+ const _hoisted_1$m = { class: "vvplot-layer" };
17168
+ const _sfc_main$T = {
17092
17169
  __name: "CoreSvgBlank",
17093
17170
  props: {
17094
17171
  extendX: { type: Number, default: 0 },
@@ -17103,12 +17180,12 @@ var VVPlot = (function(exports, vue) {
17103
17180
  emits: ["click", "contextmenu", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup"],
17104
17181
  setup(__props, { emit: __emit }) {
17105
17182
  return (_ctx, _cache) => {
17106
- return vue.openBlock(), vue.createElementBlock("g");
17183
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$m);
17107
17184
  };
17108
17185
  }
17109
17186
  };
17110
- const _hoisted_1$a = { key: 0 };
17111
- const _sfc_main$R = {
17187
+ const _hoisted_1$l = { key: 0 };
17188
+ const _sfc_main$S = {
17112
17189
  __name: "CoreTile",
17113
17190
  props: {
17114
17191
  x: { type: Number, default: 0 },
@@ -17143,14 +17220,14 @@ var VVPlot = (function(exports, vue) {
17143
17220
  });
17144
17221
  return (_ctx, _cache) => {
17145
17222
  return vue.openBlock(), vue.createElementBlock("rect", vue.normalizeProps(vue.guardReactiveProps(binds.value)), [
17146
- __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$a, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17223
+ __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$l, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17147
17224
  ], 16);
17148
17225
  };
17149
17226
  }
17150
17227
  };
17151
- const _hoisted_1$9 = { key: 0 };
17228
+ const _hoisted_1$k = { key: 0 };
17152
17229
  const _hoisted_2$4 = { key: 0 };
17153
- const _sfc_main$Q = {
17230
+ const _sfc_main$R = {
17154
17231
  __name: "CorePoint",
17155
17232
  props: {
17156
17233
  x: { type: Number, default: 0 },
@@ -17201,15 +17278,15 @@ var VVPlot = (function(exports, vue) {
17201
17278
  });
17202
17279
  return (_ctx, _cache) => {
17203
17280
  return binds.value.d ? (vue.openBlock(), vue.createElementBlock("path", vue.normalizeProps(vue.mergeProps({ key: 0 }, binds.value)), [
17204
- __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$9, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17281
+ __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$k, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17205
17282
  ], 16)) : (vue.openBlock(), vue.createElementBlock("circle", vue.normalizeProps(vue.mergeProps({ key: 1 }, binds.value)), [
17206
17283
  __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_2$4, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17207
17284
  ], 16));
17208
17285
  };
17209
17286
  }
17210
17287
  };
17211
- const _hoisted_1$8 = { key: 0 };
17212
- const _sfc_main$P = {
17288
+ const _hoisted_1$j = { key: 0 };
17289
+ const _sfc_main$Q = {
17213
17290
  __name: "CoreLine",
17214
17291
  props: {
17215
17292
  x1: { type: Number, default: 0 },
@@ -17242,12 +17319,13 @@ var VVPlot = (function(exports, vue) {
17242
17319
  });
17243
17320
  return (_ctx, _cache) => {
17244
17321
  return vue.openBlock(), vue.createElementBlock("line", vue.normalizeProps(vue.guardReactiveProps(binds.value)), [
17245
- __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$8, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17322
+ __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$j, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17246
17323
  ], 16);
17247
17324
  };
17248
17325
  }
17249
17326
  };
17250
- const _sfc_main$O = {
17327
+ const _hoisted_1$i = { class: "vvplot-layer" };
17328
+ const _sfc_main$P = {
17251
17329
  __name: "CoreSvgBoxplot",
17252
17330
  props: {
17253
17331
  extendX: { type: Number, default: 0 },
@@ -17265,7 +17343,7 @@ var VVPlot = (function(exports, vue) {
17265
17343
  const emit = __emit;
17266
17344
  const binds = vue.computed(() => {
17267
17345
  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;
17268
- return __props.data.map((group) => group.map(({
17346
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17269
17347
  x: x2,
17270
17348
  xmin,
17271
17349
  xmax,
@@ -17405,23 +17483,23 @@ var VVPlot = (function(exports, vue) {
17405
17483
  }).filter((x2) => x2 != null));
17406
17484
  });
17407
17485
  return (_ctx, _cache) => {
17408
- return vue.openBlock(), vue.createElementBlock("g", null, [
17486
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$i, [
17409
17487
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17410
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17488
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17411
17489
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbinds, von]) => {
17412
17490
  return vue.openBlock(), vue.createElementBlock("g", null, [
17413
- vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
17491
+ vue.createVNode(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
17414
17492
  _cache[0] || (_cache[0] = vue.createTextVNode()),
17415
- vue.createVNode(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbinds.rect, vue.toHandlers(von)), null, 16),
17493
+ vue.createVNode(_sfc_main$S, vue.mergeProps({ ref_for: true }, vbinds.rect, vue.toHandlers(von)), null, 16),
17416
17494
  _cache[1] || (_cache[1] = vue.createTextVNode()),
17417
- vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.midline), null, 16),
17495
+ vue.createVNode(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbinds.midline), null, 16),
17418
17496
  _cache[2] || (_cache[2] = vue.createTextVNode()),
17419
- vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
17497
+ vue.createVNode(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
17420
17498
  _cache[3] || (_cache[3] = vue.createTextVNode()),
17421
- vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
17499
+ vue.createVNode(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
17422
17500
  _cache[4] || (_cache[4] = vue.createTextVNode()),
17423
17501
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vbinds.outliers, ([vbind, von2]) => {
17424
- return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von2)), null, 16);
17502
+ return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von2)), null, 16);
17425
17503
  }), 256))
17426
17504
  ]);
17427
17505
  }), 256))
@@ -17431,8 +17509,8 @@ var VVPlot = (function(exports, vue) {
17431
17509
  };
17432
17510
  }
17433
17511
  };
17434
- const _hoisted_1$7 = { key: 0 };
17435
- const _sfc_main$N = {
17512
+ const _hoisted_1$h = { key: 0 };
17513
+ const _sfc_main$O = {
17436
17514
  __name: "CoreCurve",
17437
17515
  props: {
17438
17516
  points: { type: Array, default: () => [] },
@@ -17472,12 +17550,13 @@ var VVPlot = (function(exports, vue) {
17472
17550
  };
17473
17551
  return (_ctx, _cache) => {
17474
17552
  return vue.openBlock(), vue.createElementBlock("path", vue.normalizeProps(vue.guardReactiveProps(binds.value)), [
17475
- __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$7, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17553
+ __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$h, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17476
17554
  ], 16);
17477
17555
  };
17478
17556
  }
17479
17557
  };
17480
- const _sfc_main$M = {
17558
+ const _hoisted_1$g = { class: "vvplot-layer vvplot-layer-curve" };
17559
+ const _sfc_main$N = {
17481
17560
  __name: "CoreSvgCurve",
17482
17561
  props: {
17483
17562
  extendX: { type: Number, default: 0 },
@@ -17495,7 +17574,7 @@ var VVPlot = (function(exports, vue) {
17495
17574
  const emit = __emit;
17496
17575
  const binds = vue.computed(() => {
17497
17576
  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;
17498
- return __props.data.map((group) => group.map(({
17577
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17499
17578
  points,
17500
17579
  fill,
17501
17580
  color: color2,
@@ -17537,11 +17616,11 @@ var VVPlot = (function(exports, vue) {
17537
17616
  }).filter((x2) => x2 != null));
17538
17617
  });
17539
17618
  return (_ctx, _cache) => {
17540
- return vue.openBlock(), vue.createElementBlock("g", null, [
17619
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$g, [
17541
17620
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17542
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17621
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17543
17622
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17544
- return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17623
+ return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17545
17624
  }), 256))
17546
17625
  ], 16);
17547
17626
  }), 256))
@@ -17549,8 +17628,8 @@ var VVPlot = (function(exports, vue) {
17549
17628
  };
17550
17629
  }
17551
17630
  };
17552
- const _hoisted_1$6 = { key: 0 };
17553
- const _sfc_main$L = {
17631
+ const _hoisted_1$f = { key: 0 };
17632
+ const _sfc_main$M = {
17554
17633
  __name: "CoreEllipse",
17555
17634
  props: {
17556
17635
  cx: { type: Number, default: 0 },
@@ -17590,12 +17669,13 @@ var VVPlot = (function(exports, vue) {
17590
17669
  });
17591
17670
  return (_ctx, _cache) => {
17592
17671
  return vue.openBlock(), vue.createElementBlock("ellipse", vue.normalizeProps(vue.guardReactiveProps(binds.value)), [
17593
- __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$6, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17672
+ __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$f, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
17594
17673
  ], 16);
17595
17674
  };
17596
17675
  }
17597
17676
  };
17598
- const _sfc_main$K = {
17677
+ const _hoisted_1$e = { class: "vvplot-layer vvplot-layer-ellipse" };
17678
+ const _sfc_main$L = {
17599
17679
  __name: "CoreSvgEllipse",
17600
17680
  props: {
17601
17681
  extendX: { type: Number, default: 0 },
@@ -17613,7 +17693,7 @@ var VVPlot = (function(exports, vue) {
17613
17693
  const emit = __emit;
17614
17694
  const binds = vue.computed(() => {
17615
17695
  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;
17616
- return __props.data.map((group) => group.map(({
17696
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17617
17697
  cx,
17618
17698
  cy,
17619
17699
  A,
@@ -17665,11 +17745,11 @@ var VVPlot = (function(exports, vue) {
17665
17745
  }).filter((x2) => x2 != null));
17666
17746
  });
17667
17747
  return (_ctx, _cache) => {
17668
- return vue.openBlock(), vue.createElementBlock("g", null, [
17748
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$e, [
17669
17749
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17670
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17750
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17671
17751
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17672
- return vue.openBlock(), vue.createBlock(_sfc_main$L, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17752
+ return vue.openBlock(), vue.createBlock(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17673
17753
  }), 256))
17674
17754
  ], 16);
17675
17755
  }), 256))
@@ -17677,7 +17757,8 @@ var VVPlot = (function(exports, vue) {
17677
17757
  };
17678
17758
  }
17679
17759
  };
17680
- const _sfc_main$J = {
17760
+ const _hoisted_1$d = { class: "vvplot-layer vvplot-layer-line" };
17761
+ const _sfc_main$K = {
17681
17762
  __name: "CoreSvgLine",
17682
17763
  props: {
17683
17764
  extendX: { type: Number, default: 0 },
@@ -17695,7 +17776,7 @@ var VVPlot = (function(exports, vue) {
17695
17776
  const emit = __emit;
17696
17777
  const binds = vue.computed(() => {
17697
17778
  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;
17698
- return __props.data.map((group) => group.map(({
17779
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17699
17780
  x: x2,
17700
17781
  y: y2,
17701
17782
  xend,
@@ -17740,11 +17821,11 @@ var VVPlot = (function(exports, vue) {
17740
17821
  }).filter((x2) => x2 != null));
17741
17822
  });
17742
17823
  return (_ctx, _cache) => {
17743
- return vue.openBlock(), vue.createElementBlock("g", null, [
17824
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$d, [
17744
17825
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17745
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17826
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17746
17827
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17747
- return vue.openBlock(), vue.createBlock(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17828
+ return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17748
17829
  }), 256))
17749
17830
  ], 16);
17750
17831
  }), 256))
@@ -17752,7 +17833,8 @@ var VVPlot = (function(exports, vue) {
17752
17833
  };
17753
17834
  }
17754
17835
  };
17755
- const _sfc_main$I = {
17836
+ const _hoisted_1$c = { class: "vvplot-layer" };
17837
+ const _sfc_main$J = {
17756
17838
  __name: "CoreSvgMarkdown",
17757
17839
  props: {
17758
17840
  extendX: { type: Number, default: 0 },
@@ -17770,7 +17852,7 @@ var VVPlot = (function(exports, vue) {
17770
17852
  const emit = __emit;
17771
17853
  const binds = vue.computed(() => {
17772
17854
  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;
17773
- return __props.data.map((group) => group.map(({
17855
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17774
17856
  x: x2,
17775
17857
  y: y2,
17776
17858
  size = 4,
@@ -17839,11 +17921,11 @@ var VVPlot = (function(exports, vue) {
17839
17921
  }).filter((x2) => x2 != null));
17840
17922
  });
17841
17923
  return (_ctx, _cache) => {
17842
- return vue.openBlock(), vue.createElementBlock("g", null, [
17924
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$c, [
17843
17925
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17844
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17926
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17845
17927
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17846
- return vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17928
+ return vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17847
17929
  }), 256))
17848
17930
  ], 16);
17849
17931
  }), 256))
@@ -17851,7 +17933,8 @@ var VVPlot = (function(exports, vue) {
17851
17933
  };
17852
17934
  }
17853
17935
  };
17854
- const _sfc_main$H = {
17936
+ const _hoisted_1$b = { class: "vvplot-layer" };
17937
+ const _sfc_main$I = {
17855
17938
  __name: "CoreSvgMarkdownsegment",
17856
17939
  props: {
17857
17940
  extendX: { type: Number, default: 0 },
@@ -17869,7 +17952,7 @@ var VVPlot = (function(exports, vue) {
17869
17952
  const emit = __emit;
17870
17953
  const binds = vue.computed(() => {
17871
17954
  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;
17872
- return __props.data.map((group) => group.map(({
17955
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17873
17956
  x: x2,
17874
17957
  xend,
17875
17958
  y: y2,
@@ -17960,11 +18043,11 @@ var VVPlot = (function(exports, vue) {
17960
18043
  }).filter((x2) => x2 != null));
17961
18044
  });
17962
18045
  return (_ctx, _cache) => {
17963
- return vue.openBlock(), vue.createElementBlock("g", null, [
18046
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$b, [
17964
18047
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17965
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18048
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17966
18049
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17967
- return vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18050
+ return vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17968
18051
  }), 256))
17969
18052
  ], 16);
17970
18053
  }), 256))
@@ -17972,7 +18055,8 @@ var VVPlot = (function(exports, vue) {
17972
18055
  };
17973
18056
  }
17974
18057
  };
17975
- const _sfc_main$G = {
18058
+ const _hoisted_1$a = { class: "vvplot-layer" };
18059
+ const _sfc_main$H = {
17976
18060
  __name: "CoreSvgPoint",
17977
18061
  props: {
17978
18062
  extendX: { type: Number, default: 0 },
@@ -17990,7 +18074,7 @@ var VVPlot = (function(exports, vue) {
17990
18074
  const emit = __emit;
17991
18075
  const binds = vue.computed(() => {
17992
18076
  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;
17993
- return __props.data.map((group) => group.map(({
18077
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
17994
18078
  x: x2,
17995
18079
  y: y2,
17996
18080
  shape: shape2,
@@ -18039,11 +18123,11 @@ var VVPlot = (function(exports, vue) {
18039
18123
  }).filter((x2) => x2 != null));
18040
18124
  });
18041
18125
  return (_ctx, _cache) => {
18042
- return vue.openBlock(), vue.createElementBlock("g", null, [
18126
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$a, [
18043
18127
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
18044
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18128
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18045
18129
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
18046
- return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18130
+ return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18047
18131
  }), 256))
18048
18132
  ], 16);
18049
18133
  }), 256))
@@ -18051,8 +18135,8 @@ var VVPlot = (function(exports, vue) {
18051
18135
  };
18052
18136
  }
18053
18137
  };
18054
- const _hoisted_1$5 = { key: 0 };
18055
- const _sfc_main$F = {
18138
+ const _hoisted_1$9 = { key: 0 };
18139
+ const _sfc_main$G = {
18056
18140
  __name: "CorePolygon",
18057
18141
  props: {
18058
18142
  points: { type: Array, default: () => [] },
@@ -18081,12 +18165,13 @@ var VVPlot = (function(exports, vue) {
18081
18165
  });
18082
18166
  return (_ctx, _cache) => {
18083
18167
  return vue.openBlock(), vue.createElementBlock("polygon", vue.normalizeProps(vue.guardReactiveProps(binds.value)), [
18084
- __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$5, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
18168
+ __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_1$9, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true)
18085
18169
  ], 16);
18086
18170
  };
18087
18171
  }
18088
18172
  };
18089
- const _sfc_main$E = {
18173
+ const _hoisted_1$8 = { class: "vvplot-layer" };
18174
+ const _sfc_main$F = {
18090
18175
  __name: "CoreSvgPolygon",
18091
18176
  props: {
18092
18177
  extendX: { type: Number, default: 0 },
@@ -18104,7 +18189,7 @@ var VVPlot = (function(exports, vue) {
18104
18189
  const emit = __emit;
18105
18190
  const binds = vue.computed(() => {
18106
18191
  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;
18107
- return __props.data.map((group) => group.map(({
18192
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
18108
18193
  points,
18109
18194
  fill,
18110
18195
  color: color2,
@@ -18146,11 +18231,11 @@ var VVPlot = (function(exports, vue) {
18146
18231
  }).filter((x2) => x2 != null));
18147
18232
  });
18148
18233
  return (_ctx, _cache) => {
18149
- return vue.openBlock(), vue.createElementBlock("g", null, [
18234
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$8, [
18150
18235
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
18151
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18236
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18152
18237
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
18153
- return vue.openBlock(), vue.createBlock(_sfc_main$F, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18238
+ return vue.openBlock(), vue.createBlock(_sfc_main$G, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18154
18239
  }), 256))
18155
18240
  ], 16);
18156
18241
  }), 256))
@@ -18158,7 +18243,8 @@ var VVPlot = (function(exports, vue) {
18158
18243
  };
18159
18244
  }
18160
18245
  };
18161
- const _sfc_main$D = {
18246
+ const _hoisted_1$7 = { class: "vvplot-layer" };
18247
+ const _sfc_main$E = {
18162
18248
  __name: "CoreSvgRect",
18163
18249
  props: {
18164
18250
  extendX: { type: Number, default: 0 },
@@ -18176,7 +18262,7 @@ var VVPlot = (function(exports, vue) {
18176
18262
  const emit = __emit;
18177
18263
  const binds = vue.computed(() => {
18178
18264
  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;
18179
- return __props.data.map((group) => group.map(({
18265
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
18180
18266
  xmin,
18181
18267
  xmax,
18182
18268
  ymin,
@@ -18218,11 +18304,11 @@ var VVPlot = (function(exports, vue) {
18218
18304
  }).filter((x2) => x2 != null));
18219
18305
  });
18220
18306
  return (_ctx, _cache) => {
18221
- return vue.openBlock(), vue.createElementBlock("g", null, [
18307
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$7, [
18222
18308
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
18223
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18309
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18224
18310
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
18225
- return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18311
+ return vue.openBlock(), vue.createBlock(_sfc_main$S, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18226
18312
  }), 256))
18227
18313
  ], 16);
18228
18314
  }), 256))
@@ -18230,7 +18316,8 @@ var VVPlot = (function(exports, vue) {
18230
18316
  };
18231
18317
  }
18232
18318
  };
18233
- const _sfc_main$C = {
18319
+ const _hoisted_1$6 = { class: "vvplot-layer" };
18320
+ const _sfc_main$D = {
18234
18321
  __name: "CoreSvgText",
18235
18322
  props: {
18236
18323
  extendX: { type: Number, default: 0 },
@@ -18248,7 +18335,7 @@ var VVPlot = (function(exports, vue) {
18248
18335
  const emit = __emit;
18249
18336
  const binds = vue.computed(() => {
18250
18337
  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;
18251
- return __props.data.map((group) => group.map(({
18338
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
18252
18339
  x: x2,
18253
18340
  y: y2,
18254
18341
  size = 4,
@@ -18317,11 +18404,11 @@ var VVPlot = (function(exports, vue) {
18317
18404
  }).filter((x2) => x2 != null));
18318
18405
  });
18319
18406
  return (_ctx, _cache) => {
18320
- return vue.openBlock(), vue.createElementBlock("g", null, [
18407
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$6, [
18321
18408
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
18322
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18409
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18323
18410
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
18324
- return vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18411
+ return vue.openBlock(), vue.createBlock(_sfc_main$18, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18325
18412
  }), 256))
18326
18413
  ], 16);
18327
18414
  }), 256))
@@ -18329,7 +18416,8 @@ var VVPlot = (function(exports, vue) {
18329
18416
  };
18330
18417
  }
18331
18418
  };
18332
- const _sfc_main$B = {
18419
+ const _hoisted_1$5 = { class: "vvplot-layer" };
18420
+ const _sfc_main$C = {
18333
18421
  __name: "CoreSvgTextsegment",
18334
18422
  props: {
18335
18423
  extendX: { type: Number, default: 0 },
@@ -18347,7 +18435,7 @@ var VVPlot = (function(exports, vue) {
18347
18435
  const emit = __emit;
18348
18436
  const binds = vue.computed(() => {
18349
18437
  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;
18350
- return __props.data.map((group) => group.map(({
18438
+ return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
18351
18439
  x: x2,
18352
18440
  xend,
18353
18441
  y: y2,
@@ -18481,9 +18569,9 @@ var VVPlot = (function(exports, vue) {
18481
18569
  return result;
18482
18570
  }
18483
18571
  return (_ctx, _cache) => {
18484
- return vue.openBlock(), vue.createElementBlock("g", null, [
18572
+ return vue.openBlock(), vue.createElementBlock("g", _hoisted_1$5, [
18485
18573
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
18486
- return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18574
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ class: "vvplot-group" }, { ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
18487
18575
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von, content, title]) => {
18488
18576
  return vue.openBlock(), vue.createElementBlock("text", vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von, true)), [
18489
18577
  vue.createElementVNode("title", null, vue.toDisplayString(title), 1),
@@ -18508,23 +18596,23 @@ var VVPlot = (function(exports, vue) {
18508
18596
  };
18509
18597
  const svg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18510
18598
  __proto__: null,
18511
- blank: _sfc_main$S,
18512
- boxplot: _sfc_main$O,
18513
- curve: _sfc_main$M,
18514
- ellipse: _sfc_main$K,
18515
- line: _sfc_main$J,
18516
- markdown: _sfc_main$I,
18517
- markdownsegment: _sfc_main$H,
18518
- point: _sfc_main$G,
18519
- polygon: _sfc_main$E,
18520
- rect: _sfc_main$D,
18521
- shape: _sfc_main$M,
18522
- stick: _sfc_main$J,
18523
- text: _sfc_main$C,
18524
- textsegment: _sfc_main$B,
18525
- tile: _sfc_main$D
18599
+ blank: _sfc_main$T,
18600
+ boxplot: _sfc_main$P,
18601
+ curve: _sfc_main$N,
18602
+ ellipse: _sfc_main$L,
18603
+ line: _sfc_main$K,
18604
+ markdown: _sfc_main$J,
18605
+ markdownsegment: _sfc_main$I,
18606
+ point: _sfc_main$H,
18607
+ polygon: _sfc_main$F,
18608
+ rect: _sfc_main$E,
18609
+ shape: _sfc_main$N,
18610
+ stick: _sfc_main$K,
18611
+ text: _sfc_main$D,
18612
+ textsegment: _sfc_main$C,
18613
+ tile: _sfc_main$E
18526
18614
  }, Symbol.toStringTag, { value: "Module" }));
18527
- const _sfc_main$A = {
18615
+ const _sfc_main$B = {
18528
18616
  __name: "CoreLayer",
18529
18617
  props: {
18530
18618
  data: Object,
@@ -18565,7 +18653,7 @@ var VVPlot = (function(exports, vue) {
18565
18653
  };
18566
18654
  const _hoisted_1$4 = { key: 0 };
18567
18655
  const _hoisted_2$3 = ["onPointerdown"];
18568
- const _sfc_main$z = {
18656
+ const _sfc_main$A = {
18569
18657
  __name: "CoreSelection",
18570
18658
  props: /* @__PURE__ */ vue.mergeModels({
18571
18659
  coord2pos: Function,
@@ -18654,9 +18742,6 @@ var VVPlot = (function(exports, vue) {
18654
18742
  transform2.push(`scale(${sclH}, ${sclV})`);
18655
18743
  return transform2.join(" ") || null;
18656
18744
  });
18657
- const translating = vue.computed(
18658
- () => __props.activeTransform.translateH != 0 || __props.activeTransform.translateV != 0 || __props.activeTransform.scaleH != 1 || __props.activeTransform.scaleV != 1
18659
- );
18660
18745
  const rectBind = vue.computed(() => {
18661
18746
  if (!position.value) return null;
18662
18747
  let { hmin, hmax, vmin, vmax, pos } = position.value;
@@ -18681,7 +18766,7 @@ var VVPlot = (function(exports, vue) {
18681
18766
  };
18682
18767
  });
18683
18768
  const interactiveBind = vue.computed(() => {
18684
- if (!position.value || translating.value) return null;
18769
+ if (!position.value) return null;
18685
18770
  let size = 10;
18686
18771
  let { hmin, hmax, vmin, vmax, pos } = position.value;
18687
18772
  let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
@@ -18696,7 +18781,7 @@ var VVPlot = (function(exports, vue) {
18696
18781
  };
18697
18782
  if (config.resize) {
18698
18783
  if (pos.hmin != null)
18699
- binds.l = { x: hmin - size / 2, y: vmin, width: size, height, style: "cursor:ew-resize;", class: "vvplot-interactive" };
18784
+ binds.l = { x: hmin - size / 2, y: vmin, width: size, height, style: "cursor:ew-resize;" };
18700
18785
  if (pos.hmax != null)
18701
18786
  binds.r = { x: hmax - size / 2, y: vmin, width: size, height, style: "cursor:ew-resize;" };
18702
18787
  if (pos.vmin != null)
@@ -18776,8 +18861,7 @@ var VVPlot = (function(exports, vue) {
18776
18861
  if (ymin > ymax) [ymin, ymax] = [ymax, ymin];
18777
18862
  emit("selecting", { xmin, xmax, ymin, ymax }, __props.theme);
18778
18863
  };
18779
- e.target.onpointerup = (ev) => {
18780
- ev.currentTarget.onpointerup = null;
18864
+ e.target.addEventListener("pointerup", function(ev) {
18781
18865
  ev.currentTarget.onpointermove = null;
18782
18866
  if (config.buttons & 1) {
18783
18867
  ev.currentTarget.onclick = (event2) => {
@@ -18803,7 +18887,7 @@ var VVPlot = (function(exports, vue) {
18803
18887
  model.value = dropNull(res);
18804
18888
  emit("selectend");
18805
18889
  emit("select", dropNull(res), event);
18806
- };
18890
+ }, { once: true });
18807
18891
  }
18808
18892
  return (_ctx, _cache) => {
18809
18893
  return rectBind.value ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$4, [
@@ -18822,7 +18906,7 @@ var VVPlot = (function(exports, vue) {
18822
18906
  const _hoisted_1$3 = ["height", "width"];
18823
18907
  const _hoisted_2$2 = ["y1", "y2"];
18824
18908
  const _hoisted_3$2 = ["y"];
18825
- const _sfc_main$y = {
18909
+ const _sfc_main$z = {
18826
18910
  __name: "CoreGuideGradientbar",
18827
18911
  props: {
18828
18912
  scales: Array,
@@ -18862,7 +18946,7 @@ var VVPlot = (function(exports, vue) {
18862
18946
  ref: "svg"
18863
18947
  }, [
18864
18948
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(gradient_values.value, (v, i) => {
18865
- return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({
18949
+ return vue.openBlock(), vue.createBlock(_sfc_main$S, vue.mergeProps({
18866
18950
  width: 10,
18867
18951
  height: 3.1,
18868
18952
  x: 10,
@@ -18894,12 +18978,12 @@ var VVPlot = (function(exports, vue) {
18894
18978
  };
18895
18979
  const element = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18896
18980
  __proto__: null,
18897
- curve: _sfc_main$N,
18898
- line: _sfc_main$P,
18899
- point: _sfc_main$Q,
18900
- polygon: _sfc_main$F,
18901
- text: _sfc_main$17,
18902
- tile: _sfc_main$R
18981
+ curve: _sfc_main$O,
18982
+ line: _sfc_main$Q,
18983
+ point: _sfc_main$R,
18984
+ polygon: _sfc_main$G,
18985
+ text: _sfc_main$18,
18986
+ tile: _sfc_main$S
18903
18987
  }, Symbol.toStringTag, { value: "Module" }));
18904
18988
  const _hoisted_1$2 = ["height", "width"];
18905
18989
  const _hoisted_2$1 = ["transform"];
@@ -18909,7 +18993,7 @@ var VVPlot = (function(exports, vue) {
18909
18993
  y: "10",
18910
18994
  "alignment-baseline": "central"
18911
18995
  };
18912
- const _sfc_main$x = {
18996
+ const _sfc_main$y = {
18913
18997
  __name: "CoreGuideLegendkey",
18914
18998
  props: {
18915
18999
  scales: Array,
@@ -18976,7 +19060,7 @@ var VVPlot = (function(exports, vue) {
18976
19060
  };
18977
19061
  }
18978
19062
  };
18979
- const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
19063
+ const _sfc_main$x = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
18980
19064
  __name: "CoreGuide",
18981
19065
  props: {
18982
19066
  scales: Array,
@@ -18984,8 +19068,8 @@ var VVPlot = (function(exports, vue) {
18984
19068
  },
18985
19069
  setup(__props) {
18986
19070
  const guide = {
18987
- legendkey: _sfc_main$x,
18988
- gradientbar: _sfc_main$y
19071
+ legendkey: _sfc_main$y,
19072
+ gradientbar: _sfc_main$z
18989
19073
  };
18990
19074
  const title = vue.computed(() => {
18991
19075
  return __props.scales.reduce((v, [s]) => v ?? s.title, null) ?? __props.scales.reduce((v, [s]) => v ?? s._title, null);
@@ -19029,7 +19113,7 @@ var VVPlot = (function(exports, vue) {
19029
19113
  };
19030
19114
  }
19031
19115
  });
19032
- const _sfc_main$v = {
19116
+ const _sfc_main$w = {
19033
19117
  __name: "CoreLegend",
19034
19118
  props: {
19035
19119
  theme: { type: Object, default: () => ({}) },
@@ -19063,7 +19147,7 @@ var VVPlot = (function(exports, vue) {
19063
19147
  style: vue.normalizeStyle({ gap: __props.theme.spacing + "px" })
19064
19148
  }, [
19065
19149
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(guides.value, ([[key, type], scales]) => {
19066
- return vue.openBlock(), vue.createBlock(_sfc_main$w, {
19150
+ return vue.openBlock(), vue.createBlock(_sfc_main$x, {
19067
19151
  key,
19068
19152
  type,
19069
19153
  scales
@@ -19077,11 +19161,11 @@ var VVPlot = (function(exports, vue) {
19077
19161
  const _hoisted_2 = ["width", "height"];
19078
19162
  const _hoisted_3 = ["transform", "width", "height", "fill"];
19079
19163
  const _hoisted_4 = ["transform"];
19080
- const _hoisted_5 = ["transform", "clip-path"];
19081
- const _hoisted_6 = ["transform"];
19082
- const _hoisted_7 = ["clip-path"];
19164
+ const _hoisted_5 = ["transform"];
19165
+ const _hoisted_6 = ["clip-path"];
19166
+ const _hoisted_7 = ["transform", "clip-path"];
19083
19167
  const _hoisted_8 = { key: 1 };
19084
- const _sfc_main$u = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
19168
+ const _sfc_main$v = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
19085
19169
  __name: "CorePlot",
19086
19170
  props: /* @__PURE__ */ vue.mergeModels({
19087
19171
  schema: Object,
@@ -19125,6 +19209,7 @@ var VVPlot = (function(exports, vue) {
19125
19209
  "pointermove",
19126
19210
  "wheel",
19127
19211
  "select",
19212
+ "selecting",
19128
19213
  "move",
19129
19214
  "zoom",
19130
19215
  "rescale",
@@ -19432,11 +19517,13 @@ var VVPlot = (function(exports, vue) {
19432
19517
  res.ymin = ystart > yend ? yend : ystart;
19433
19518
  res.ymax = ystart > yend ? ystart : yend;
19434
19519
  }
19520
+ if (!emitEvent(sel["onSelecting"], dropNull(res), sel.theme)) {
19521
+ emit("selecting", dropNull(res), sel.theme);
19522
+ }
19435
19523
  selectionPreview.value = res;
19436
19524
  selectionPreviewTheme.value = sel.theme;
19437
19525
  };
19438
- e.target.onpointerup = (ev) => {
19439
- ev.currentTarget.onpointerup = null;
19526
+ e.target.addEventListener("pointerup", function(ev) {
19440
19527
  ev.currentTarget.onpointermove = null;
19441
19528
  svg2.style.userSelect = null;
19442
19529
  selectionPreview.value = {};
@@ -19484,7 +19571,7 @@ var VVPlot = (function(exports, vue) {
19484
19571
  emit("select", dropNull(res), event);
19485
19572
  }
19486
19573
  }
19487
- };
19574
+ }, { once: true });
19488
19575
  return;
19489
19576
  }
19490
19577
  let act = props.action.find((a) => a.action == "move" && ["buttons", "ctrlKey", "shiftKey", "altKey", "metaKey"].every((k) => a[k] == e[k]));
@@ -19514,15 +19601,14 @@ var VVPlot = (function(exports, vue) {
19514
19601
  let { xmin, xmax, ymin, ymax } = pos2coord({ hmin: h1, hmax: h2, vmin: v1, vmax: v2 });
19515
19602
  Object.assign(rangePreview, { xmin, xmax, ymin, ymax });
19516
19603
  };
19517
- e.target.onpointerup = (ev) => {
19518
- ev.currentTarget.onpointerup = null;
19604
+ e.target.addEventListener("pointerup", function(ev) {
19519
19605
  ev.currentTarget.onpointermove = null;
19520
19606
  svg2.style.userSelect = null;
19521
19607
  moveTimer = setTimeout(() => {
19522
19608
  applyTransform(act, ev);
19523
19609
  movementX = movementY = 0;
19524
19610
  }, 300);
19525
- };
19611
+ }, { once: true });
19526
19612
  return;
19527
19613
  }
19528
19614
  }
@@ -19780,7 +19866,7 @@ var VVPlot = (function(exports, vue) {
19780
19866
  transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`,
19781
19867
  style: { "pointer-events": "none" }
19782
19868
  }, [
19783
- vue.createVNode(_sfc_main$11, {
19869
+ vue.createVNode(_sfc_main$12, {
19784
19870
  breaks: gridBreaks.value.h,
19785
19871
  layout: vue.unref(innerRect),
19786
19872
  activeTransform: activeTransform.value,
@@ -19788,7 +19874,7 @@ var VVPlot = (function(exports, vue) {
19788
19874
  transition: transition.value
19789
19875
  }, null, 8, ["breaks", "layout", "activeTransform", "transition"]),
19790
19876
  _cache[2] || (_cache[2] = vue.createTextVNode()),
19791
- vue.createVNode(_sfc_main$10, {
19877
+ vue.createVNode(_sfc_main$11, {
19792
19878
  breaks: gridBreaks.value.v,
19793
19879
  layout: vue.unref(innerRect),
19794
19880
  activeTransform: activeTransform.value,
@@ -19797,6 +19883,30 @@ var VVPlot = (function(exports, vue) {
19797
19883
  }, null, 8, ["breaks", "layout", "activeTransform", "transition"])
19798
19884
  ], 8, _hoisted_4),
19799
19885
  _cache[8] || (_cache[8] = vue.createTextVNode()),
19886
+ vue.createElementVNode("g", {
19887
+ transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`
19888
+ }, [
19889
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position !== "number"), (axis) => {
19890
+ return vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19891
+ transition: transition.value,
19892
+ "onUpdate:transition": _cache[0] || (_cache[0] = ($event) => transition.value = $event),
19893
+ activeTransform: activeTransform.value
19894
+ }), null, 16, ["transition", "activeTransform"]);
19895
+ }), 256)),
19896
+ _cache[3] || (_cache[3] = vue.createTextVNode()),
19897
+ vue.createElementVNode("g", {
19898
+ "clip-path": props.clip ? `url(#${vue.unref(vid)}-plot-clip)` : null
19899
+ }, [
19900
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position === "number"), (axis) => {
19901
+ return vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19902
+ transition: transition.value,
19903
+ "onUpdate:transition": _cache[1] || (_cache[1] = ($event) => transition.value = $event),
19904
+ activeTransform: activeTransform.value
19905
+ }), null, 16, ["transition", "activeTransform"]);
19906
+ }), 256))
19907
+ ], 8, _hoisted_6)
19908
+ ], 8, _hoisted_5),
19909
+ _cache[9] || (_cache[9] = vue.createTextVNode()),
19800
19910
  vue.createElementVNode("g", {
19801
19911
  transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`,
19802
19912
  "clip-path": props.clip ? `url(#${vue.unref(vid)}-plot-clip)` : null
@@ -19805,7 +19915,7 @@ var VVPlot = (function(exports, vue) {
19805
19915
  style: { transition: transition.value }
19806
19916
  }), [
19807
19917
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vplot.value.layers, (layer) => {
19808
- return vue.openBlock(), vue.createBlock(_sfc_main$A, vue.mergeProps({
19918
+ return vue.openBlock(), vue.createBlock(_sfc_main$B, vue.mergeProps({
19809
19919
  ref_for: true,
19810
19920
  ref_key: "layers",
19811
19921
  ref: layers,
@@ -19820,9 +19930,9 @@ var VVPlot = (function(exports, vue) {
19820
19930
  }), null, 16, ["data", "layout", "geom", "default-render", "default-dpi"]);
19821
19931
  }), 256))
19822
19932
  ], 16),
19823
- _cache[3] || (_cache[3] = vue.createTextVNode()),
19933
+ _cache[4] || (_cache[4] = vue.createTextVNode()),
19824
19934
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.selections, (sel) => {
19825
- return vue.openBlock(), vue.createBlock(_sfc_main$z, vue.mergeProps({
19935
+ return vue.openBlock(), vue.createBlock(_sfc_main$A, vue.mergeProps({
19826
19936
  coord2pos,
19827
19937
  pos2coord,
19828
19938
  layout: vue.unref(innerRect),
@@ -19832,8 +19942,8 @@ var VVPlot = (function(exports, vue) {
19832
19942
  activeTransform: activeTransform.value
19833
19943
  }, { ref_for: true }, sel, { flip: __props.flip }), null, 16, ["layout", "transition", "activeTransform", "flip"]);
19834
19944
  }), 256)),
19835
- _cache[4] || (_cache[4] = vue.createTextVNode()),
19836
- vue.createVNode(_sfc_main$z, {
19945
+ _cache[5] || (_cache[5] = vue.createTextVNode()),
19946
+ vue.createVNode(_sfc_main$A, {
19837
19947
  coord2pos,
19838
19948
  pos2coord,
19839
19949
  layout: vue.unref(innerRect),
@@ -19843,31 +19953,7 @@ var VVPlot = (function(exports, vue) {
19843
19953
  theme: _selectionPreviewTheme.value,
19844
19954
  flip: __props.flip
19845
19955
  }, null, 8, ["layout", "modelValue", "transition", "activeTransform", "theme", "flip"])
19846
- ], 8, _hoisted_5),
19847
- _cache[9] || (_cache[9] = vue.createTextVNode()),
19848
- vue.createElementVNode("g", {
19849
- transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`
19850
- }, [
19851
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position !== "number"), (axis) => {
19852
- return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19853
- transition: transition.value,
19854
- "onUpdate:transition": _cache[0] || (_cache[0] = ($event) => transition.value = $event),
19855
- activeTransform: activeTransform.value
19856
- }), null, 16, ["transition", "activeTransform"]);
19857
- }), 256)),
19858
- _cache[5] || (_cache[5] = vue.createTextVNode()),
19859
- vue.createElementVNode("g", {
19860
- "clip-path": props.clip ? `url(#${vue.unref(vid)}-plot-clip)` : null
19861
- }, [
19862
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position === "number"), (axis) => {
19863
- return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19864
- transition: transition.value,
19865
- "onUpdate:transition": _cache[1] || (_cache[1] = ($event) => transition.value = $event),
19866
- activeTransform: activeTransform.value
19867
- }), null, 16, ["transition", "activeTransform"]);
19868
- }), 256))
19869
- ], 8, _hoisted_7)
19870
- ], 8, _hoisted_6),
19956
+ ], 8, _hoisted_7),
19871
19957
  _cache[10] || (_cache[10] = vue.createTextVNode()),
19872
19958
  vue.renderSlot(_ctx.$slots, "default"),
19873
19959
  _cache[11] || (_cache[11] = vue.createTextVNode()),
@@ -19876,7 +19962,7 @@ var VVPlot = (function(exports, vue) {
19876
19962
  defer: "",
19877
19963
  to: props.legendTeleport
19878
19964
  }, [
19879
- vue.createVNode(_sfc_main$v, {
19965
+ vue.createVNode(_sfc_main$w, {
19880
19966
  scales: vplot.value?.scales,
19881
19967
  theme: __props.theme.legend
19882
19968
  }, null, 8, ["scales", "theme"])
@@ -19886,14 +19972,14 @@ var VVPlot = (function(exports, vue) {
19886
19972
  };
19887
19973
  }
19888
19974
  });
19889
- const _sfc_main$t = {
19975
+ const _sfc_main$u = {
19890
19976
  $_type: "action",
19891
19977
  $_props: {}
19892
19978
  };
19893
- const _sfc_main$s = {
19979
+ const _sfc_main$t = {
19894
19980
  $_type: "layer"
19895
19981
  };
19896
- const _sfc_main$r = {
19982
+ const _sfc_main$s = {
19897
19983
  $_props: {
19898
19984
  geom: "tile",
19899
19985
  stat: "bar"
@@ -19901,14 +19987,14 @@ var VVPlot = (function(exports, vue) {
19901
19987
  $_type: "layer",
19902
19988
  $_argnames: ["width", "height", "position"]
19903
19989
  };
19904
- const _sfc_main$q = {
19990
+ const _sfc_main$r = {
19905
19991
  $_props: {
19906
19992
  geom: "blank",
19907
19993
  stat: "identity"
19908
19994
  },
19909
19995
  $_type: "layer"
19910
19996
  };
19911
- const _sfc_main$p = {
19997
+ const _sfc_main$q = {
19912
19998
  $_props: {
19913
19999
  geom: "boxplot",
19914
20000
  stat: "boxplot"
@@ -19916,6 +20002,14 @@ var VVPlot = (function(exports, vue) {
19916
20002
  $_type: "layer",
19917
20003
  $_argnames: ["width", "height", "position"]
19918
20004
  };
20005
+ const _sfc_main$p = {
20006
+ $_props: {
20007
+ geom: "tile",
20008
+ stat: "col"
20009
+ },
20010
+ $_type: "layer",
20011
+ $_argnames: ["width", "height", "position", "orientation"]
20012
+ };
19919
20013
  const _sfc_main$o = {
19920
20014
  $_props: {
19921
20015
  geom: "curve",
@@ -20065,10 +20159,11 @@ var VVPlot = (function(exports, vue) {
20065
20159
  };
20066
20160
  const geom_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20067
20161
  __proto__: null,
20068
- VVGeom: _sfc_main$s,
20069
- VVGeomBar: _sfc_main$r,
20070
- VVGeomBlank: _sfc_main$q,
20071
- VVGeomBoxplot: _sfc_main$p,
20162
+ VVGeom: _sfc_main$t,
20163
+ VVGeomBar: _sfc_main$s,
20164
+ VVGeomBlank: _sfc_main$r,
20165
+ VVGeomBoxplot: _sfc_main$q,
20166
+ VVGeomCol: _sfc_main$p,
20072
20167
  VVGeomCurve: _sfc_main$o,
20073
20168
  VVGeomDensity: _sfc_main$n,
20074
20169
  VVGeomEllipse: _sfc_main$m,
@@ -20157,8 +20252,8 @@ var VVPlot = (function(exports, vue) {
20157
20252
  const components = {
20158
20253
  ...geom_components,
20159
20254
  ...axis_components,
20160
- VVAction: _sfc_main$t,
20161
- VVSelection: _sfc_main$t
20255
+ VVAction: _sfc_main$u,
20256
+ VVSelection: _sfc_main$u
20162
20257
  };
20163
20258
  const opponents = {
20164
20259
  x: "y",
@@ -20215,8 +20310,12 @@ var VVPlot = (function(exports, vue) {
20215
20310
  }
20216
20311
  }).filter((x2) => x2 != null);
20217
20312
  let res = Object.groupBy(comps, (c) => c.type.$_type ?? "dom");
20218
- for (let type in res) {
20219
- vnodes[type][key] = res[type];
20313
+ for (let type in vnodes) {
20314
+ if (res[type] == null) {
20315
+ delete vnodes[type][key];
20316
+ } else {
20317
+ vnodes[type][key] = res[type];
20318
+ }
20220
20319
  }
20221
20320
  }, { immediate: true });
20222
20321
  }
@@ -20623,6 +20722,8 @@ var VVPlot = (function(exports, vue) {
20623
20722
  const plotRef = vue.useTemplateRef("plot");
20624
20723
  const width = vue.useModel(__props, "width");
20625
20724
  const height = vue.useModel(__props, "height");
20725
+ const visible = vue.ref(null);
20726
+ vue.provide("vvplot-visible", visible);
20626
20727
  vue.onMounted(() => {
20627
20728
  vue.watch(width, (v) => {
20628
20729
  wrapperRef.value.style.width = str_c(v, "px") ?? null;
@@ -20632,8 +20733,11 @@ var VVPlot = (function(exports, vue) {
20632
20733
  }, { immediate: true });
20633
20734
  });
20634
20735
  let oldSize = { width: 0, height: 0 };
20635
- useResizeObserver(plotRef, (e) => {
20636
- let { width: w, height: h } = e[0].contentRect;
20736
+ useResizeObserver(plotRef, ([entry]) => {
20737
+ visible.value = entry.target.getClientRects().length > 0;
20738
+ if (!visible.value) return;
20739
+ let { width: w, height: h } = entry.contentRect;
20740
+ if (width.value - w < 0.5 && height.value - h < 0.5) return;
20637
20741
  if (wrapperRef.value.style.width) width.value = w;
20638
20742
  if (wrapperRef.value.style.height) height.value = h;
20639
20743
  if ((w > 0 || h > 0) && (oldSize.width > 0 || oldSize.height > 0))
@@ -20675,7 +20779,7 @@ var VVPlot = (function(exports, vue) {
20675
20779
  class: "vvplot",
20676
20780
  style: wrapperStyle.value
20677
20781
  }, vBind.value.wrapper), [
20678
- vue.createVNode(_sfc_main$u, vue.mergeProps({
20782
+ vue.createVNode(_sfc_main$v, vue.mergeProps({
20679
20783
  ref: "plot",
20680
20784
  paddings,
20681
20785
  schema: schema.value,
@@ -20737,15 +20841,16 @@ var VVPlot = (function(exports, vue) {
20737
20841
  };
20738
20842
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20739
20843
  __proto__: null,
20740
- VVAction: _sfc_main$t,
20844
+ VVAction: _sfc_main$u,
20741
20845
  VVAxis: _sfc_main$5,
20742
20846
  VVAxisBreak: _sfc_main$2,
20743
20847
  VVAxisX: _sfc_main$4,
20744
20848
  VVAxisY: _sfc_main$3,
20745
- VVGeom: _sfc_main$s,
20746
- VVGeomBar: _sfc_main$r,
20747
- VVGeomBlank: _sfc_main$q,
20748
- VVGeomBoxplot: _sfc_main$p,
20849
+ VVGeom: _sfc_main$t,
20850
+ VVGeomBar: _sfc_main$s,
20851
+ VVGeomBlank: _sfc_main$r,
20852
+ VVGeomBoxplot: _sfc_main$q,
20853
+ VVGeomCol: _sfc_main$p,
20749
20854
  VVGeomCurve: _sfc_main$o,
20750
20855
  VVGeomDensity: _sfc_main$n,
20751
20856
  VVGeomEllipse: _sfc_main$m,
@@ -20768,15 +20873,16 @@ var VVPlot = (function(exports, vue) {
20768
20873
  VVPlot: _sfc_main$1,
20769
20874
  VVSelection: _sfc_main
20770
20875
  }, Symbol.toStringTag, { value: "Module" }));
20771
- exports.VVAction = _sfc_main$t;
20876
+ exports.VVAction = _sfc_main$u;
20772
20877
  exports.VVAxis = _sfc_main$5;
20773
20878
  exports.VVAxisBreak = _sfc_main$2;
20774
20879
  exports.VVAxisX = _sfc_main$4;
20775
20880
  exports.VVAxisY = _sfc_main$3;
20776
- exports.VVGeom = _sfc_main$s;
20777
- exports.VVGeomBar = _sfc_main$r;
20778
- exports.VVGeomBlank = _sfc_main$q;
20779
- exports.VVGeomBoxplot = _sfc_main$p;
20881
+ exports.VVGeom = _sfc_main$t;
20882
+ exports.VVGeomBar = _sfc_main$s;
20883
+ exports.VVGeomBlank = _sfc_main$r;
20884
+ exports.VVGeomBoxplot = _sfc_main$q;
20885
+ exports.VVGeomCol = _sfc_main$p;
20780
20886
  exports.VVGeomCurve = _sfc_main$o;
20781
20887
  exports.VVGeomDensity = _sfc_main$n;
20782
20888
  exports.VVGeomEllipse = _sfc_main$m;