vvplot 0.4.5 → 0.5.1

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.
@@ -57,7 +57,7 @@ var VVPlot = (function(exports, vue) {
57
57
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
58
58
  const toString = Object.prototype.toString;
59
59
  const isObject = (val) => toString.call(val) === "[object Object]";
60
- const noop$1 = () => {
60
+ const noop$2 = () => {
61
61
  };
62
62
  function pxValue(px) {
63
63
  return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
@@ -196,7 +196,7 @@ var VVPlot = (function(exports, vue) {
196
196
  } = options;
197
197
  const pixelRatio = vue.shallowRef(1);
198
198
  const query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);
199
- let stop = noop$1;
199
+ let stop = noop$2;
200
200
  if (window2) {
201
201
  stop = watchImmediate(query, () => pixelRatio.value = window2.devicePixelRatio);
202
202
  }
@@ -243,8 +243,16 @@ var VVPlot = (function(exports, vue) {
243
243
  stop
244
244
  };
245
245
  }
246
+ // @__NO_SIDE_EFFECTS__
247
+ function makeMap(str) {
248
+ const map2 = /* @__PURE__ */ Object.create(null);
249
+ for (const key of str.split(",")) map2[key] = 1;
250
+ return (val) => val in map2;
251
+ }
246
252
  const NO = () => false;
247
253
  const extend$1 = Object.assign;
254
+ const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
255
+ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
248
256
  const TELEPORT = /* @__PURE__ */ Symbol(``);
249
257
  const SUSPENSE = /* @__PURE__ */ Symbol(``);
250
258
  const KEEP_ALIVE = /* @__PURE__ */ Symbol(``);
@@ -1408,7 +1416,7 @@ var VVPlot = (function(exports, vue) {
1408
1416
  }
1409
1417
  },
1410
1418
  oncdata(start2, end) {
1411
- if (stack[0].ns !== 0) {
1419
+ if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) {
1412
1420
  onText(getSlice(start2, end), start2, end);
1413
1421
  } else {
1414
1422
  emitError(1, start2 - 9);
@@ -1797,6 +1805,20 @@ var VVPlot = (function(exports, vue) {
1797
1805
  new RegExp(
1798
1806
  "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b"
1799
1807
  );
1808
+ function expandFragment(componentList) {
1809
+ if (componentList == null) return [];
1810
+ return componentList.flatMap((layer) => {
1811
+ if (layer.type == vue.Fragment) {
1812
+ return expandFragment(layer.children);
1813
+ } else if (layer.type == "template") {
1814
+ return expandFragment(layer.children).map((c) => {
1815
+ c.props = { ...c.props, ...layer.props };
1816
+ return c;
1817
+ });
1818
+ }
1819
+ return layer;
1820
+ });
1821
+ }
1800
1822
  class AsisString extends String {
1801
1823
  static #cache = /* @__PURE__ */ new Map();
1802
1824
  constructor(str) {
@@ -1981,7 +2003,7 @@ var VVPlot = (function(exports, vue) {
1981
2003
  let length = values[0].length;
1982
2004
  if (values.some((v) => v.length != length))
1983
2005
  throw new Error("Arrays must have the same length");
1984
- return Array.from({ length }, (_, i) => values.reduce((s, a) => +a[i] + s, nums));
2006
+ return Array.from({ length }, (_, i) => values.reduce((s, a) => +(a[i] ?? 0) + s, nums));
1985
2007
  },
1986
2008
  /* vectorized opposite of numbers */
1987
2009
  opposite(value) {
@@ -2024,8 +2046,7 @@ var VVPlot = (function(exports, vue) {
2024
2046
  if (arr.length == 0) return null;
2025
2047
  return arr.reduce((a, c) => {
2026
2048
  for (let k in c) {
2027
- if (c[k] === null) delete a[k];
2028
- if (c[k] != void 0) a[k] = c[k];
2049
+ if (c[k] !== void 0) a[k] = c[k];
2029
2050
  }
2030
2051
  return a;
2031
2052
  }, {});
@@ -2035,11 +2056,12 @@ var VVPlot = (function(exports, vue) {
2035
2056
  if (args.some((x2) => x2 === null)) return null;
2036
2057
  return args.join("");
2037
2058
  }
2038
- function unique(arr, mapper = null) {
2059
+ function unique(arr, key = null, priority = null) {
2039
2060
  let map2 = /* @__PURE__ */ new Map();
2040
2061
  for (let i in arr) {
2041
- let key = mapper ? mapper(arr[i]) : arr[i];
2042
- if (!map2.has(key)) map2.set(key, arr[i]);
2062
+ let k = key ? key(arr[i]) : arr[i];
2063
+ if (!map2.has(k)) map2.set(k, arr[i]);
2064
+ else if (priority) map2.set(k, priority(map2.get(k), arr[i]));
2043
2065
  }
2044
2066
  return Array.from(map2.values());
2045
2067
  }
@@ -2208,7 +2230,7 @@ var VVPlot = (function(exports, vue) {
2208
2230
  img.setAttribute("height", foreignElement.getAttribute("height"));
2209
2231
  foreignClone.parentNode.replaceChild(img, foreignClone);
2210
2232
  }
2211
- for (let node of svgClone.querySelectorAll(".vvplot-interactive")) node.remove();
2233
+ for (let node of svgClone.querySelectorAll(".vvplot-interactive,foreignObject")) node.remove();
2212
2234
  removeComments(svgClone);
2213
2235
  svgClone.setAttribute("xmlns", "http://www.w3.org/2000/svg");
2214
2236
  svgClone.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
@@ -2226,7 +2248,9 @@ var VVPlot = (function(exports, vue) {
2226
2248
  tick_width: 1,
2227
2249
  tick_length: 5,
2228
2250
  label_size: 12,
2229
- title_size: 18
2251
+ title_size: 18,
2252
+ grid_width: 1,
2253
+ grid_width_major: 2
2230
2254
  },
2231
2255
  axis_h: {
2232
2256
  title_offset: 20
@@ -2251,10 +2275,6 @@ var VVPlot = (function(exports, vue) {
2251
2275
  tick_position: "bottom",
2252
2276
  title_position: "bottom"
2253
2277
  },
2254
- grid: {
2255
- line_width: 1,
2256
- line_width_major: 2
2257
- },
2258
2278
  plot: {
2259
2279
  margin: 20,
2260
2280
  padding_h: 50,
@@ -2272,10 +2292,8 @@ var VVPlot = (function(exports, vue) {
2272
2292
  line_color: "black",
2273
2293
  tick_color: "black",
2274
2294
  label_color: "black",
2275
- title_color: "black"
2276
- },
2277
- grid: {
2278
- line_color: "#eeeeee"
2295
+ title_color: "black",
2296
+ grid_color: "#eeeeee"
2279
2297
  }
2280
2298
  };
2281
2299
  const theme_light = {
@@ -2283,20 +2301,16 @@ var VVPlot = (function(exports, vue) {
2283
2301
  line_color: "gray",
2284
2302
  tick_color: "gray",
2285
2303
  label_color: "gray",
2286
- title_color: "gray"
2287
- },
2288
- grid: {
2289
- line_color: "#eeeeee"
2304
+ title_color: "gray",
2305
+ grid_color: "#eeeeee"
2290
2306
  }
2291
2307
  };
2292
2308
  const theme_gray = {
2293
2309
  axis: {
2294
2310
  tick_color: "black",
2295
2311
  label_color: "black",
2296
- title_color: "black"
2297
- },
2298
- grid: {
2299
- line_color: "white"
2312
+ title_color: "black",
2313
+ grid_color: "white"
2300
2314
  },
2301
2315
  plot: {
2302
2316
  background: "#eeeeee"
@@ -2306,10 +2320,8 @@ var VVPlot = (function(exports, vue) {
2306
2320
  axis: {
2307
2321
  tick_color: "#333333",
2308
2322
  label_color: "#555555",
2309
- title_color: "black"
2310
- },
2311
- grid: {
2312
- line_color: "#666666"
2323
+ title_color: "black",
2324
+ grid_color: "#666666"
2313
2325
  },
2314
2326
  plot: {
2315
2327
  background: "#888888"
@@ -2320,12 +2332,10 @@ var VVPlot = (function(exports, vue) {
2320
2332
  line_color: "black",
2321
2333
  tick_color: "black",
2322
2334
  label_color: "black",
2323
- title_color: "black"
2324
- },
2325
- grid: {
2326
- line_color: "black",
2327
- line_width_major: 1,
2328
- line_width_minor: 0.5
2335
+ title_color: "black",
2336
+ grid_color: "black",
2337
+ grid_width: 0.5,
2338
+ grid_width_major: 1
2329
2339
  }
2330
2340
  };
2331
2341
  const theme_classic = {
@@ -2334,12 +2344,10 @@ var VVPlot = (function(exports, vue) {
2334
2344
  tick_color: "black",
2335
2345
  label_color: "black",
2336
2346
  title_color: "black"
2337
- },
2338
- grid: null
2347
+ }
2339
2348
  };
2340
2349
  const theme_void = {
2341
- axis: null,
2342
- grid: null
2350
+ axis: null
2343
2351
  };
2344
2352
  function themeMerge(...themes) {
2345
2353
  return themes.reduce((acc, t) => {
@@ -2359,10 +2367,6 @@ var VVPlot = (function(exports, vue) {
2359
2367
  axis_v,
2360
2368
  axis_x,
2361
2369
  axis_y,
2362
- grid_h,
2363
- grid_v,
2364
- grid_x,
2365
- grid_y,
2366
2370
  plot: {
2367
2371
  margin_x,
2368
2372
  margin_y,
@@ -2379,8 +2383,6 @@ var VVPlot = (function(exports, vue) {
2379
2383
  if (flip) {
2380
2384
  axis_h = obj_merge(axis_h, axis_y);
2381
2385
  axis_v = obj_merge(axis_v, axis_x);
2382
- grid_h = obj_merge(grid_h, grid_x);
2383
- grid_v = obj_merge(grid_v, grid_y);
2384
2386
  plot.margin_h = margin_y === void 0 ? margin_h : margin_y;
2385
2387
  plot.margin_v = margin_x === void 0 ? margin_v : margin_x;
2386
2388
  plot.padding_h = padding_y === void 0 ? padding_h : padding_y;
@@ -2388,8 +2390,6 @@ var VVPlot = (function(exports, vue) {
2388
2390
  } else {
2389
2391
  axis_h = obj_merge(axis_h, axis_x);
2390
2392
  axis_v = obj_merge(axis_v, axis_y);
2391
- grid_h = obj_merge(grid_h, grid_y);
2392
- grid_v = obj_merge(grid_v, grid_x);
2393
2393
  plot.margin_h = margin_x === void 0 ? margin_h : margin_x;
2394
2394
  plot.margin_v = margin_y === void 0 ? margin_v : margin_y;
2395
2395
  plot.padding_h = padding_x === void 0 ? padding_h : padding_x;
@@ -2398,21 +2398,11 @@ var VVPlot = (function(exports, vue) {
2398
2398
  return {
2399
2399
  axis_h,
2400
2400
  axis_v,
2401
- grid_h,
2402
- grid_v,
2403
2401
  plot,
2404
2402
  ...rest
2405
2403
  };
2406
2404
  }
2407
2405
  function themeBuild(theme2) {
2408
- function _grid_build(grid_theme) {
2409
- return {
2410
- line_color_major: ["line_color", "line_color_major"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
2411
- line_color_minor: ["line_color", "line_color_minor"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
2412
- line_width_major: ["line_width", "line_width_major"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
2413
- line_width_minor: ["line_width", "line_width_minor"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0)
2414
- };
2415
- }
2416
2406
  return {
2417
2407
  axis: {
2418
2408
  h: obj_merge(...["axis", "axis_h"].map((k) => theme2?.[k])),
@@ -2430,10 +2420,6 @@ var VVPlot = (function(exports, vue) {
2430
2420
  ...["axis", "axis_h", "axis_bottom"].map((k) => theme2?.[k])
2431
2421
  )
2432
2422
  },
2433
- grid: {
2434
- h: _grid_build(obj_merge(...["grid", "grid_h"].map((k) => theme2?.[k]))),
2435
- v: _grid_build(obj_merge(...["grid", "grid_v"].map((k) => theme2?.[k])))
2436
- },
2437
2423
  plot: {
2438
2424
  margin: {
2439
2425
  left: ["margin", "margin_h", "margin_left"].map((k) => theme2?.plot?.[k]).findLast((x2) => x2 !== void 0) ?? 0,
@@ -2484,7 +2470,7 @@ var VVPlot = (function(exports, vue) {
2484
2470
  coord_scale(ds, levels) {
2485
2471
  let xnudge = ds.xnudge ?? 0, ynudge = ds.ynudge ?? 0;
2486
2472
  if (ds.x) {
2487
- let x2 = psum$a(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), xmin = psum$a(x2, ds.width?.map?.((x3) => -x3 / 2) ?? -0.5, xnudge), xmax = psum$a(x2, ds.width?.map?.((x3) => +x3 / 2) ?? 0.5, xnudge), 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(
2473
+ let x2 = psum$a(levels.x?.apply?.(ds.x) ?? ds.x, xnudge), xmin = psum$a(x2, ds.width?.map?.((x3) => -x3 / 2) ?? -0.5), xmax = psum$a(x2, ds.width?.map?.((x3) => +x3 / 2) ?? 0.5), lwisker = psum$a(ds.lwisker, ynudge), Q1 = psum$a(ds.Q1, ynudge), median = psum$a(ds.median, ynudge), Q3 = psum$a(ds.Q3, ynudge), uwisker = psum$a(ds.uwisker, ynudge), outliers = vecutils.apply(
2488
2474
  ($x, { y: ys, $raw }, nudge) => psum$a(ys, nudge).map(($y, i) => ({ x: $x, y: $y, $raw: $raw[i] })),
2489
2475
  x2,
2490
2476
  ds.outliers ?? [],
@@ -2506,7 +2492,7 @@ var VVPlot = (function(exports, vue) {
2506
2492
  $ymax
2507
2493
  };
2508
2494
  } else if (ds.y) {
2509
- let y2 = psum$a(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), ymin = psum$a(y2, ds.height?.map?.((y3) => -y3 / 2) ?? -0.5, ynudge), ymax = psum$a(y2, ds.height?.map?.((y3) => +y3 / 2) ?? 0.5, ynudge), lwisker = psum$a(ds.lwisker, xnudge), Q1 = psum$a(ds.Q1, xnudge), median = psum$a(ds.median, xnudge), Q3 = psum$a(ds.Q3, xnudge), uwisker = psum$a(ds.uwisker, xnudge), outliers = vecutils.apply(
2495
+ let y2 = psum$a(levels.y?.apply?.(ds.y) ?? ds.y, ynudge), ymin = psum$a(y2, ds.height?.map?.((y3) => -y3 / 2) ?? -0.5), ymax = psum$a(y2, ds.height?.map?.((y3) => +y3 / 2) ?? 0.5), lwisker = psum$a(ds.lwisker, xnudge), Q1 = psum$a(ds.Q1, xnudge), median = psum$a(ds.median, xnudge), Q3 = psum$a(ds.Q3, xnudge), uwisker = psum$a(ds.uwisker, xnudge), outliers = vecutils.apply(
2510
2496
  ($y, { x: xs, $raw }, nudge) => psum$a(xs, nudge).map(($x, i) => ({ x: $x, y: $y, $raw: $raw[i] })),
2511
2497
  y2,
2512
2498
  ds.outliers ?? [],
@@ -2542,13 +2528,10 @@ var VVPlot = (function(exports, vue) {
2542
2528
  const curve$1 = {
2543
2529
  scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2544
2530
  coord_scale(ds, levels) {
2545
- let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => {
2546
- let xn = xnudge?.[i] ?? 0, yn = ynudge?.[i] ?? 0;
2547
- return {
2548
- x: +(levels?.x?.[p.x] ?? p.x) + xn,
2549
- y: +(levels?.y?.[p.y] ?? p.y) + yn
2550
- };
2551
- }));
2531
+ let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => ({
2532
+ x: +(levels?.x?.[p.x] ?? p.x) + (xnudge?.[i] ?? 0),
2533
+ y: +(levels?.y?.[p.y] ?? p.y) + (ynudge?.[i] ?? 0)
2534
+ })));
2552
2535
  return { points };
2553
2536
  },
2554
2537
  get_range(ds, orientation) {
@@ -2650,13 +2633,10 @@ var VVPlot = (function(exports, vue) {
2650
2633
  const polygon$1 = {
2651
2634
  scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2652
2635
  coord_scale(ds, levels) {
2653
- let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => {
2654
- let xn = xnudge?.[i] ?? 0, yn = ynudge?.[i] ?? 0;
2655
- return {
2656
- x: +(levels?.x?.[p.x] ?? p.x) + xn,
2657
- y: +(levels?.y?.[p.y] ?? p.y) + yn
2658
- };
2659
- }));
2636
+ let xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => ({
2637
+ x: +(levels?.x?.[p.x] ?? p.x) + (xnudge?.[i] ?? 0),
2638
+ y: +(levels?.y?.[p.y] ?? p.y) + (ynudge?.[i] ?? 0)
2639
+ })));
2660
2640
  return { points };
2661
2641
  },
2662
2642
  get_range(ds, orientation) {
@@ -2684,6 +2664,28 @@ var VVPlot = (function(exports, vue) {
2684
2664
  return d;
2685
2665
  }
2686
2666
  };
2667
+ const shape$1 = {
2668
+ scale_attrs: ["fill", "color", "linewidth", "linetype", "alpha"],
2669
+ coord_scale(ds, levels) {
2670
+ let x2 = levels.x?.apply?.(ds.x) ?? ds.x, y2 = levels.y?.apply?.(ds.y) ?? ds.y, xnudge = ds.xnudge?.map((v) => +v), ynudge = ds.ynudge?.map((v) => +v), points = ds.points.map((points2, i) => points2.map((p) => ({
2671
+ x: +(levels?.x?.[p.x] ?? p.x) + (xnudge?.[i] ?? 0) + x2[i],
2672
+ y: +(levels?.y?.[p.y] ?? p.y) + (ynudge?.[i] ?? 0) + y2[i]
2673
+ })));
2674
+ return { points };
2675
+ },
2676
+ get_values(ds, orientation) {
2677
+ if (orientation == "x") return ds.x;
2678
+ if (orientation == "y") return ds.y;
2679
+ },
2680
+ get_range(ds, orientation) {
2681
+ if (orientation == "x") return (ds.points ?? []).flatMap((ps, i) => ps.map((p) => p.x + ds.x[i]));
2682
+ if (orientation == "y") return (ds.points ?? []).flatMap((ps, i) => ps.map((p) => p.y + ds.y[i]));
2683
+ },
2684
+ validate(d) {
2685
+ if (!Array.isArray(d.points)) return null;
2686
+ return d;
2687
+ }
2688
+ };
2687
2689
  let psum$3 = vecutils.sum;
2688
2690
  const stick$1 = {
2689
2691
  scale_attrs: ["color", "linewidth", "linetype", "alpha"],
@@ -2774,40 +2776,81 @@ var VVPlot = (function(exports, vue) {
2774
2776
  point: point$3,
2775
2777
  polygon: polygon$1,
2776
2778
  rect: rect$2,
2779
+ shape: shape$1,
2777
2780
  stick: stick$1,
2778
2781
  text: text$3,
2779
2782
  textsegment: textsegment$1,
2780
2783
  tile: tile$1
2781
2784
  }, Symbol.toStringTag, { value: "Module" }));
2782
- const bar = Object.assign(function(data) {
2785
+ const bar = Object.assign(function(data, { position = "stack", width = 0.9, height = 0.9 }) {
2783
2786
  if (data.x != null && data.y != null)
2784
2787
  throw new Error(`"StatBar" only supports "x" or "y", not both`);
2785
- let values = data.x ?? data.y;
2788
+ let cateAes = data.x ? "x" : "y";
2789
+ let values = data[cateAes];
2786
2790
  if (values == null)
2787
2791
  throw new Error(`Missing aesthetics for "StatBar": "x" or "y"`);
2788
2792
  if (values.some((x2) => typeof x2 === "number"))
2789
2793
  throw new Error(`"StatBar" requires a discrete aesthetic`);
2790
- let keys = Object.keys(data).filter((k) => !["x", "y"].includes(k) && !k.startsWith("$"));
2794
+ let keys = Object.keys(data).filter((k) => !k.startsWith("$"));
2791
2795
  let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
2792
2796
  let inter = intraaction({ group: group ?? 0, value: values });
2793
2797
  let groups = Map.groupBy(data.$raw, (_, i) => inter.categories[inter[i]]);
2794
2798
  let $raw = Array.from(groups.values()), cates = Array.from(groups.keys());
2795
2799
  let result = {
2796
2800
  $raw,
2797
- count: $raw.map((x2) => x2.length),
2798
- $group: cates.map((x2) => x2.group),
2799
- value: cates.map((x2) => x2.value)
2801
+ $group: cates.map((x2) => x2.group)
2800
2802
  };
2801
2803
  for (let key of keys) {
2802
2804
  result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
2803
2805
  }
2804
- if (data.x) {
2805
- return (({ value, count, ...etc }) => ({ x: value, y: count.map((x2) => x2 / 2), height: count, ...etc }))(result);
2806
+ if (cateAes == "x") {
2807
+ result.x = cates.map((v) => v.value);
2808
+ result.height = $raw.map((v) => v.length);
2809
+ } else {
2810
+ result.y = cates.map((v) => v.value);
2811
+ result.width = $raw.map((v) => v.length);
2812
+ }
2813
+ if (position == "stack") {
2814
+ let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
2815
+ let offset = cates.map((_) => 0);
2816
+ for (let cate in cate_group) {
2817
+ let s = 0;
2818
+ for (let i of cate_group[cate]) {
2819
+ offset[i] = s;
2820
+ s += $raw[i].length;
2821
+ }
2822
+ }
2823
+ if (cateAes == "x") {
2824
+ result.y = result.height.map((v, i) => offset[i] + v / 2);
2825
+ result.width = cates.map((_) => width);
2826
+ } else {
2827
+ result.x = result.width.map((v, i) => offset[i] + v / 2);
2828
+ result.height = cates.map((_) => height);
2829
+ }
2830
+ } else if (position == "dodge") {
2831
+ let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
2832
+ let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
2833
+ if (cateAes == "x") {
2834
+ result.y = result.height.map((v) => v / 2);
2835
+ result.width = $group.map((arr) => width / arr.length);
2836
+ result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
2837
+ } else {
2838
+ result.x = result.width.map((v) => v / 2);
2839
+ result.height = $group.map((arr) => height / arr.length);
2840
+ result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
2841
+ }
2806
2842
  } else {
2807
- return (({ value, count, ...etc }) => ({ y: value, x: count.map((x2) => x2 / 2), width: count, ...etc }))(result);
2843
+ if (cateAes == "x") {
2844
+ result.y = result.height.map((v) => v / 2);
2845
+ result.width = cates.map((_) => width);
2846
+ } else {
2847
+ result.x = result.width.map((v) => v / 2);
2848
+ result.height = cates.map((_) => height);
2849
+ }
2808
2850
  }
2851
+ return result;
2809
2852
  }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2810
- const boxplot = Object.assign(function(data, {}) {
2853
+ const boxplot = Object.assign(function(data, { position = "dodge", width = 0.9, height = 0.9 }) {
2811
2854
  let missingAes = ["x", "y"].filter((a) => data[a] == null);
2812
2855
  if (missingAes.length > 0)
2813
2856
  throw new Error(`Missing aesthetics for "StatBoxplot": "${missingAes.join('", "')}"`);
@@ -2842,11 +2885,28 @@ var VVPlot = (function(exports, vue) {
2842
2885
  max,
2843
2886
  outliers
2844
2887
  };
2888
+ if (position == "dodge") {
2889
+ let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
2890
+ let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
2891
+ if (isXdiscrete) {
2892
+ result.width = $group.map((arr) => width / arr.length);
2893
+ result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
2894
+ } else {
2895
+ result.height = $group.map((arr) => height / arr.length);
2896
+ result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
2897
+ }
2898
+ } else {
2899
+ if (isXdiscrete) {
2900
+ result.width = cates.map((_) => width);
2901
+ } else {
2902
+ result.height = cates.map((_) => height);
2903
+ }
2904
+ }
2845
2905
  for (let key of keys) {
2846
2906
  result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
2847
2907
  }
2848
2908
  return result;
2849
- }, { core_attrs: ["x", "y", "width", "height", "xnudge", "ynudge"] });
2909
+ }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2850
2910
  const curve = Object.assign(function(data) {
2851
2911
  if (data.points != null) return data;
2852
2912
  let missingAes = ["x", "y"].filter((a) => data[a] == null);
@@ -2869,7 +2929,7 @@ var VVPlot = (function(exports, vue) {
2869
2929
  }
2870
2930
  return result;
2871
2931
  }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2872
- const density = Object.assign(function(data, { n = 512, kernel = "gaussian" } = {}) {
2932
+ const density = Object.assign(function(data, { n = 512, kernel = "gaussian", scale = "area" } = {}) {
2873
2933
  if (data.x != null && data.y != null)
2874
2934
  throw new Error(`"StatDensity" only supports "x" or "y", not both`);
2875
2935
  let values = data.x ?? data.y;
@@ -2877,9 +2937,9 @@ var VVPlot = (function(exports, vue) {
2877
2937
  throw new Error(`Missing aesthetics for "StatDensity": "x" or "y"`);
2878
2938
  if (values.some((x2) => typeof x2 !== "number"))
2879
2939
  throw new Error(`"StatDensity" requires a continuous aesthetic`);
2880
- kernel = density_kernels[kernel];
2940
+ kernel = density_kernels$1[kernel];
2881
2941
  if (!kernel) {
2882
- throw new Error(`kernel must be one of ${Object.keys(density_kernels).map((k) => `"${k}"`).join(", ")}`);
2942
+ throw new Error(`kernel must be one of ${Object.keys(density_kernels$1).map((k) => `"${k}"`).join(", ")}`);
2883
2943
  }
2884
2944
  let keys = Object.keys(data).filter((k) => !["x", "y"].includes(k) && !k.startsWith("$"));
2885
2945
  let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
@@ -2894,13 +2954,14 @@ var VVPlot = (function(exports, vue) {
2894
2954
  $group: cates.map((x2) => x2.group)
2895
2955
  };
2896
2956
  let density2 = vs.map((v) => {
2897
- let bandwidth = bw.nrd0(v);
2957
+ let bandwidth = bw$1.nrd0(v);
2898
2958
  let { min, max } = numutils.extent(v);
2899
2959
  min -= 3 * bandwidth;
2900
2960
  max += 3 * bandwidth;
2901
2961
  let step = (max - min) / (n - 1);
2902
2962
  let breaks = Array.from({ length: n }, (_, i) => min + i * step);
2903
- return breaks.map((t) => [t, numutils.mean(v.map((d) => kernel((t - d) / bandwidth))) / bandwidth]);
2963
+ let ratio2 = scale === "count" ? v.length : 1;
2964
+ return breaks.map((t) => [t, numutils.mean(v.map((d) => kernel((t - d) / bandwidth))) / bandwidth * ratio2]);
2904
2965
  });
2905
2966
  for (let key of keys) {
2906
2967
  result[key] = cates.map((x2) => group.categories[x2.group][key]);
@@ -2912,7 +2973,7 @@ var VVPlot = (function(exports, vue) {
2912
2973
  }
2913
2974
  return result;
2914
2975
  }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
2915
- const bw = {
2976
+ const bw$1 = {
2916
2977
  nrd0: function(x2) {
2917
2978
  x2 = x2.filter((v2) => (typeof v2 === "number" || v2 instanceof Date) && isFinite(v2));
2918
2979
  let sd = numutils.sd(x2);
@@ -2928,7 +2989,7 @@ var VVPlot = (function(exports, vue) {
2928
2989
  return 1.06 * v * x2.length ** -0.2;
2929
2990
  }
2930
2991
  };
2931
- const density_kernels = {
2992
+ const density_kernels$1 = {
2932
2993
  uniform: (x2) => Math.abs(x2) <= 1 ? 0.5 : 0,
2933
2994
  triangular: (x2) => Math.abs(x2) <= 1 ? 1 - Math.abs(x2) : 0,
2934
2995
  epanechnikov: (x2) => Math.abs(x2) <= 1 ? 0.75 * (1 - x2 ** 2) : 0,
@@ -3129,6 +3190,12 @@ var VVPlot = (function(exports, vue) {
3129
3190
  throw new Error(`Missing aesthetics for "StatSegment": "${missingAes.join('", "')}"`);
3130
3191
  return data;
3131
3192
  }, { core_attrs: ["x", "y", "xend", "yend", "xnudge", "ynudge"] });
3193
+ const shape = Object.assign(function(data) {
3194
+ let missingAes = ["x", "y", "points"].filter((a) => data[a] == null);
3195
+ if (missingAes.length > 0)
3196
+ throw new Error(`Missing aesthetics for "StatShape": "${missingAes.join('", "')}"`);
3197
+ return data;
3198
+ }, { core_attrs: ["x", "y", "points", "xnudge", "ynudge"] });
3132
3199
  const stick = Object.assign(function(data) {
3133
3200
  if (data.dx == null) data.dx = Array(data.x.length).fill(0);
3134
3201
  if (data.dy == null) data.dy = Array(data.y.length).fill(0);
@@ -3163,6 +3230,103 @@ var VVPlot = (function(exports, vue) {
3163
3230
  throw new Error(`Missing aesthetics for "StatTile": "${missingAes.join('", "')}"`);
3164
3231
  return data;
3165
3232
  }, { core_attrs: ["x", "y", "width", "height", "xnudge", "ynudge"] });
3233
+ const violin = Object.assign(function(data, {
3234
+ n = 512,
3235
+ kernel = "gaussian",
3236
+ scale = "width",
3237
+ position = "dodge",
3238
+ width = 0.9,
3239
+ height = 0.9
3240
+ } = {}) {
3241
+ let missingAes = ["x", "y"].filter((a) => data[a] == null);
3242
+ if (missingAes.length > 0)
3243
+ throw new Error(`Missing aesthetics for "StatViolin": "${missingAes.join('", "')}"`);
3244
+ let isXdiscrete = data.x.some(is_categorical);
3245
+ let isYdiscrete = data.y.some(is_categorical);
3246
+ if (isXdiscrete && isYdiscrete)
3247
+ throw new Error(`Both "x" and "y" are discrete, "StatViolin" requires one continuous and one discrete aesthetic`);
3248
+ if (!isXdiscrete && !isYdiscrete)
3249
+ throw new Error(`Both "x" and "y" are continuous, "StatViolin" requires one continuous and one discrete aesthetic`);
3250
+ kernel = density_kernels[kernel];
3251
+ if (!kernel) {
3252
+ throw new Error(`kernel must be one of ${Object.keys(density_kernels).map((k) => `"${k}"`).join(", ")}`);
3253
+ }
3254
+ let [valueAes, cateAes, size] = isXdiscrete ? ["y", "x", width] : ["x", "y", height];
3255
+ let values = data[valueAes];
3256
+ let keys = Object.keys(data).filter((k) => k != valueAes && !k.startsWith("$"));
3257
+ let group = intraaction(Object.fromEntries(keys.map((k) => [k, data[k]])));
3258
+ let cut = intraaction({
3259
+ group: group ?? new Array(values.length).fill(0)
3260
+ }).map((v, _, a) => a.categories[v]);
3261
+ let map2 = Map.groupBy(data.$raw, (_, i) => cut[i]);
3262
+ let $raw = Array.from(map2.values()), cates = Array.from(map2.keys());
3263
+ let vs = Array.from(Map.groupBy(values, (_, i) => cut[i]).values());
3264
+ let result = {
3265
+ $raw,
3266
+ $group: cates.map((x2) => x2.group),
3267
+ [valueAes]: cates.map((v) => 0)
3268
+ };
3269
+ let density2 = vs.map((v) => {
3270
+ let bandwidth = bw.nrd0(v);
3271
+ let { min, max } = numutils.extent(v);
3272
+ min -= 3 * bandwidth;
3273
+ max += 3 * bandwidth;
3274
+ let step = (max - min) / (n - 1);
3275
+ let breaks = Array.from({ length: n }, (_, i) => min + i * step);
3276
+ let res = breaks.map((t) => numutils.mean(v.map((d) => kernel((t - d) / bandwidth))) / bandwidth);
3277
+ let ratio2 = scale == "area" ? 1 : 1 / numutils.max(res);
3278
+ return breaks.map((t, i) => [t, res[i] * ratio2 / 2]);
3279
+ });
3280
+ for (let key of keys) {
3281
+ result[key] = cates.map((x2) => group.categories[x2.group][key]);
3282
+ }
3283
+ if (position == "dodge") {
3284
+ let cate_group = Object.groupBy(result.$group, (v, i) => group.categories[v][cateAes]);
3285
+ let $group = result.$group.map((v) => cate_group[group.categories[v][cateAes]]);
3286
+ density2 = $group.map((arr, i) => density2[i].map(([x2, y2]) => [x2, y2 * size / arr.length]));
3287
+ if (isXdiscrete) {
3288
+ result.xnudge = $group.map((arr, i) => (result.xnudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * width);
3289
+ } else {
3290
+ result.ynudge = $group.map((arr, i) => (result.ynudge?.[i] ?? 0) + ((arr.indexOf(result.$group[i]) + 0.5) / arr.length - 0.5) * height);
3291
+ }
3292
+ } else {
3293
+ density2 = density2.map((v) => v.map(([x2, y2]) => [x2, y2 * size]));
3294
+ }
3295
+ if (isXdiscrete) {
3296
+ result.points = density2.map((v) => v.map(([y2, x2]) => ({ x: x2, y: y2 })).concat(v.map(([y2, x2]) => ({ x: -x2, y: y2 })).reverse()));
3297
+ } else {
3298
+ result.points = density2.map((v) => v.map(([x2, y2]) => ({ x: x2, y: y2 })).concat(v.map(([x2, y2]) => ({ x: x2, y: -y2 })).reverse()));
3299
+ }
3300
+ return result;
3301
+ }, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
3302
+ const bw = {
3303
+ nrd0: function(x2) {
3304
+ x2 = x2.filter((v2) => (typeof v2 === "number" || v2 instanceof Date) && isFinite(v2));
3305
+ let sd = numutils.sd(x2);
3306
+ let iqr = numutils.quantile(x2, 0.75) - numutils.quantile(x2, 0.25);
3307
+ let v = Math.min(sd, iqr / 1.34) || 1;
3308
+ return 0.9 * v * x2.length ** -0.2;
3309
+ },
3310
+ nrd: function(x2) {
3311
+ x2 = x2.filter((v2) => (typeof v2 === "number" || v2 instanceof Date) && isFinite(v2));
3312
+ let sd = numutils.sd(x2);
3313
+ let iqr = numutils.quantile(x2, 0.75) - numutils.quantile(x2, 0.25);
3314
+ let v = Math.min(sd, iqr / 1.34) || 1;
3315
+ return 1.06 * v * x2.length ** -0.2;
3316
+ }
3317
+ };
3318
+ const density_kernels = {
3319
+ uniform: (x2) => Math.abs(x2) <= 1 ? 0.5 : 0,
3320
+ triangular: (x2) => Math.abs(x2) <= 1 ? 1 - Math.abs(x2) : 0,
3321
+ epanechnikov: (x2) => Math.abs(x2) <= 1 ? 0.75 * (1 - x2 ** 2) : 0,
3322
+ biweight: (x2) => Math.abs(x2) <= 1 ? 15 / 16 * (1 - x2 ** 2) ** 2 : 0,
3323
+ triweight: (x2) => Math.abs(x2) <= 1 ? 35 / 32 * (1 - x2 ** 2) ** 3 : 0,
3324
+ tricube: (x2) => Math.abs(x2) <= 1 ? 70 / 81 * (1 - Math.abs(x2) ** 3) ** 3 : 0,
3325
+ gaussian: (x2) => Math.exp(-0.5 * x2 ** 2) / Math.sqrt(2 * Math.PI),
3326
+ cosine: (x2) => Math.abs(x2) <= 1 ? Math.PI / 4 * Math.cos(Math.PI / 2 * x2) : 0,
3327
+ logistic: (x2) => 1 / Math.cosh(x2) ** 2 / Math.PI,
3328
+ sigmoid: (x2) => 2 / (Math.exp(x2) + Math.exp(-x2)) ** 2 / Math.PI
3329
+ };
3166
3330
  const vvstat = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3167
3331
  __proto__: null,
3168
3332
  bar,
@@ -3179,10 +3343,12 @@ var VVPlot = (function(exports, vue) {
3179
3343
  polygon,
3180
3344
  rect: rect$1,
3181
3345
  segment,
3346
+ shape,
3182
3347
  stick,
3183
3348
  text: text$2,
3184
3349
  textsegment,
3185
- tile
3350
+ tile,
3351
+ violin
3186
3352
  }, Symbol.toStringTag, { value: "Module" }));
3187
3353
  function ascending$1(a, b) {
3188
3354
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -3284,7 +3450,7 @@ var VVPlot = (function(exports, vue) {
3284
3450
  const reverse = stop < start2, inc = reverse ? tickIncrement(stop, start2, count) : tickIncrement(start2, stop, count);
3285
3451
  return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
3286
3452
  }
3287
- var noop = { value: () => {
3453
+ var noop$1 = { value: () => {
3288
3454
  } };
3289
3455
  function dispatch() {
3290
3456
  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
@@ -3344,7 +3510,7 @@ var VVPlot = (function(exports, vue) {
3344
3510
  function set$1(type, name, callback) {
3345
3511
  for (var i = 0, n = type.length; i < n; ++i) {
3346
3512
  if (type[i].name === name) {
3347
- type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
3513
+ type[i] = noop$1, type = type.slice(0, i).concat(type.slice(i + 1));
3348
3514
  break;
3349
3515
  }
3350
3516
  }
@@ -5910,9 +6076,9 @@ var VVPlot = (function(exports, vue) {
5910
6076
  };
5911
6077
  }
5912
6078
  const epsilon$1 = 1e-12;
5913
- function withPath(shape) {
6079
+ function withPath(shape2) {
5914
6080
  let digits = 3;
5915
- shape.digits = function(_) {
6081
+ shape2.digits = function(_) {
5916
6082
  if (!arguments.length) return digits;
5917
6083
  if (_ == null) {
5918
6084
  digits = null;
@@ -5921,7 +6087,7 @@ var VVPlot = (function(exports, vue) {
5921
6087
  if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
5922
6088
  digits = d;
5923
6089
  }
5924
- return shape;
6090
+ return shape2;
5925
6091
  };
5926
6092
  return () => new Path(digits);
5927
6093
  }
@@ -6003,6 +6169,8 @@ var VVPlot = (function(exports, vue) {
6003
6169
  };
6004
6170
  return line2;
6005
6171
  }
6172
+ function noop() {
6173
+ }
6006
6174
  function point$1(that, x2, y2) {
6007
6175
  that._context.bezierCurveTo(
6008
6176
  that._x1 + that._k * (that._x2 - that._x0),
@@ -6071,6 +6239,69 @@ var VVPlot = (function(exports, vue) {
6071
6239
  };
6072
6240
  return cardinal2;
6073
6241
  })(0);
6242
+ function CardinalClosed(context, tension) {
6243
+ this._context = context;
6244
+ this._k = (1 - tension) / 6;
6245
+ }
6246
+ CardinalClosed.prototype = {
6247
+ areaStart: noop,
6248
+ areaEnd: noop,
6249
+ lineStart: function() {
6250
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
6251
+ this._point = 0;
6252
+ },
6253
+ lineEnd: function() {
6254
+ switch (this._point) {
6255
+ case 1: {
6256
+ this._context.moveTo(this._x3, this._y3);
6257
+ this._context.closePath();
6258
+ break;
6259
+ }
6260
+ case 2: {
6261
+ this._context.lineTo(this._x3, this._y3);
6262
+ this._context.closePath();
6263
+ break;
6264
+ }
6265
+ case 3: {
6266
+ this.point(this._x3, this._y3);
6267
+ this.point(this._x4, this._y4);
6268
+ this.point(this._x5, this._y5);
6269
+ break;
6270
+ }
6271
+ }
6272
+ },
6273
+ point: function(x2, y2) {
6274
+ x2 = +x2, y2 = +y2;
6275
+ switch (this._point) {
6276
+ case 0:
6277
+ this._point = 1;
6278
+ this._x3 = x2, this._y3 = y2;
6279
+ break;
6280
+ case 1:
6281
+ this._point = 2;
6282
+ this._context.moveTo(this._x4 = x2, this._y4 = y2);
6283
+ break;
6284
+ case 2:
6285
+ this._point = 3;
6286
+ this._x5 = x2, this._y5 = y2;
6287
+ break;
6288
+ default:
6289
+ point$1(this, x2, y2);
6290
+ break;
6291
+ }
6292
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2;
6293
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
6294
+ }
6295
+ };
6296
+ const cardinalClosed = (function custom(tension) {
6297
+ function cardinal2(context) {
6298
+ return new CardinalClosed(context, tension);
6299
+ }
6300
+ cardinal2.tension = function(tension2) {
6301
+ return custom(+tension2);
6302
+ };
6303
+ return cardinal2;
6304
+ })(0);
6074
6305
  function point(that, x2, y2) {
6075
6306
  var x1 = that._x1, y1 = that._y1, x22 = that._x2, y22 = that._y2;
6076
6307
  if (that._l01_a > epsilon$1) {
@@ -6148,6 +6379,96 @@ var VVPlot = (function(exports, vue) {
6148
6379
  };
6149
6380
  return catmullRom2;
6150
6381
  })(0.5);
6382
+ function CatmullRomClosed(context, alpha2) {
6383
+ this._context = context;
6384
+ this._alpha = alpha2;
6385
+ }
6386
+ CatmullRomClosed.prototype = {
6387
+ areaStart: noop,
6388
+ areaEnd: noop,
6389
+ lineStart: function() {
6390
+ this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
6391
+ this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
6392
+ },
6393
+ lineEnd: function() {
6394
+ switch (this._point) {
6395
+ case 1: {
6396
+ this._context.moveTo(this._x3, this._y3);
6397
+ this._context.closePath();
6398
+ break;
6399
+ }
6400
+ case 2: {
6401
+ this._context.lineTo(this._x3, this._y3);
6402
+ this._context.closePath();
6403
+ break;
6404
+ }
6405
+ case 3: {
6406
+ this.point(this._x3, this._y3);
6407
+ this.point(this._x4, this._y4);
6408
+ this.point(this._x5, this._y5);
6409
+ break;
6410
+ }
6411
+ }
6412
+ },
6413
+ point: function(x2, y2) {
6414
+ x2 = +x2, y2 = +y2;
6415
+ if (this._point) {
6416
+ var x23 = this._x2 - x2, y23 = this._y2 - y2;
6417
+ this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
6418
+ }
6419
+ switch (this._point) {
6420
+ case 0:
6421
+ this._point = 1;
6422
+ this._x3 = x2, this._y3 = y2;
6423
+ break;
6424
+ case 1:
6425
+ this._point = 2;
6426
+ this._context.moveTo(this._x4 = x2, this._y4 = y2);
6427
+ break;
6428
+ case 2:
6429
+ this._point = 3;
6430
+ this._x5 = x2, this._y5 = y2;
6431
+ break;
6432
+ default:
6433
+ point(this, x2, y2);
6434
+ break;
6435
+ }
6436
+ this._l01_a = this._l12_a, this._l12_a = this._l23_a;
6437
+ this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
6438
+ this._x0 = this._x1, this._x1 = this._x2, this._x2 = x2;
6439
+ this._y0 = this._y1, this._y1 = this._y2, this._y2 = y2;
6440
+ }
6441
+ };
6442
+ const catmullRomClosed = (function custom(alpha2) {
6443
+ function catmullRom2(context) {
6444
+ return alpha2 ? new CatmullRomClosed(context, alpha2) : new CardinalClosed(context, 0);
6445
+ }
6446
+ catmullRom2.alpha = function(alpha3) {
6447
+ return custom(+alpha3);
6448
+ };
6449
+ return catmullRom2;
6450
+ })(0.5);
6451
+ function LinearClosed(context) {
6452
+ this._context = context;
6453
+ }
6454
+ LinearClosed.prototype = {
6455
+ areaStart: noop,
6456
+ areaEnd: noop,
6457
+ lineStart: function() {
6458
+ this._point = 0;
6459
+ },
6460
+ lineEnd: function() {
6461
+ if (this._point) this._context.closePath();
6462
+ },
6463
+ point: function(x2, y2) {
6464
+ x2 = +x2, y2 = +y2;
6465
+ if (this._point) this._context.lineTo(x2, y2);
6466
+ else this._point = 1, this._context.moveTo(x2, y2);
6467
+ }
6468
+ };
6469
+ function linearClosed(context) {
6470
+ return new LinearClosed(context);
6471
+ }
6151
6472
  function Natural(context) {
6152
6473
  this._context = context;
6153
6474
  }
@@ -7186,42 +7507,39 @@ var VVPlot = (function(exports, vue) {
7186
7507
  this.titles = titles ?? vvlabel.asis();
7187
7508
  this.minorBreaks = minorBreaks ?? breaks ?? scale.minorBreaks ?? scale.breaks;
7188
7509
  }
7189
- getBindings({ range: range2, expandMult } = {}) {
7510
+ getBreaks({ range: range2, expandMult, breakSlot } = {}) {
7190
7511
  let majorBreaks = this.breaks, minorBreaks = this.minorBreaks, labels = this.labels, titles = this.titles;
7191
7512
  let min = range2?.min ?? this?.range?.min, max = range2?.max ?? this?.range?.max, interval2 = max - min || 0;
7192
7513
  min = min == null ? min : plus$1(min, -(expandMult?.min ?? 0) * interval2);
7193
7514
  max = max == null ? max : plus$1(max, +(expandMult?.max ?? 0) * interval2);
7194
- function normalizeBreaks(val) {
7195
- if (val.position != null) return val;
7196
- return { position: val };
7197
- }
7198
7515
  if (typeof majorBreaks == "function") majorBreaks = majorBreaks({ min, max });
7199
- majorBreaks = Array.isArray(majorBreaks) ? majorBreaks.map(normalizeBreaks) : [];
7200
- let breaks = majorBreaks.map((x2) => x2.position);
7201
- if (typeof minorBreaks == "function") minorBreaks = minorBreaks({ min, max, minor: true });
7202
- minorBreaks = Array.isArray(minorBreaks) ? minorBreaks.map(normalizeBreaks) : [];
7203
- if (typeof labels === "function") labels = breaks.map(labels);
7516
+ if (!Array.isArray(majorBreaks)) majorBreaks = [];
7517
+ if (typeof labels === "function") labels = majorBreaks.map(labels);
7204
7518
  if (!Array.isArray(labels)) {
7205
7519
  labels = [];
7206
- } else if (labels.length != breaks.length) {
7520
+ } else if (labels.length != majorBreaks.length) {
7207
7521
  throw new Error("Length of labels must be the same as breaks");
7208
7522
  }
7209
- if (typeof titles === "function") titles = breaks.map(titles);
7523
+ if (typeof titles === "function") titles = majorBreaks.map(titles);
7210
7524
  if (!Array.isArray(titles)) {
7211
7525
  titles = [];
7212
- } else if (titles.length != breaks.length) {
7526
+ } else if (titles.length != majorBreaks.length) {
7213
7527
  throw new Error("Length of titles must be the same as breaks");
7214
7528
  }
7215
- return {
7216
- majorBreaks,
7217
- minorBreaks,
7218
- ticks: breaks.map((position, i) => ({ position, label: labels[i], title: titles[i] }))
7219
- };
7220
- }
7221
- }
7529
+ if (typeof minorBreaks == "function") minorBreaks = minorBreaks({ min, max, minor: true });
7530
+ if (!Array.isArray(minorBreaks)) minorBreaks = [];
7531
+ majorBreaks = majorBreaks.map((value, i) => ({ type: "major", value, label: labels[i], title: titles[i] }));
7532
+ minorBreaks = minorBreaks.map((x2) => ({ type: "minor", value: x2 }));
7533
+ let breaks = majorBreaks.concat(minorBreaks);
7534
+ if (breakSlot instanceof Function) {
7535
+ breaks = expandFragment(breakSlot({ breaks, majorBreaks, minorBreaks, min, max })).filter((c) => c.type.$_type == "axis-break").map((c) => ({ ...c.type.$_props, ...c.props }));
7536
+ }
7537
+ return breaks;
7538
+ }
7539
+ }
7222
7540
  const _hoisted_1$e = ["font-size"];
7223
7541
  const _hoisted_2$8 = { key: 0 };
7224
- const _sfc_main$13 = {
7542
+ const _sfc_main$17 = {
7225
7543
  __name: "CoreText",
7226
7544
  props: {
7227
7545
  x: { type: Number, default: 0 },
@@ -7306,7 +7624,7 @@ var VVPlot = (function(exports, vue) {
7306
7624
  }), [
7307
7625
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
7308
7626
  __props.title ? (vue.openBlock(), vue.createElementBlock("title", _hoisted_2$8, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
7309
- vue.createTextVNode(" " + vue.toDisplayString(__props.text.replace(/ /g, " ")), 1)
7627
+ vue.createTextVNode(" " + vue.toDisplayString(__props.text?.replace(/ /g, " ")), 1)
7310
7628
  ])
7311
7629
  ], 16, _hoisted_1$e);
7312
7630
  };
@@ -7747,16 +8065,16 @@ var VVPlot = (function(exports, vue) {
7747
8065
  function requireDecode() {
7748
8066
  if (hasRequiredDecode) return decode;
7749
8067
  hasRequiredDecode = 1;
7750
- (function(exports$1) {
8068
+ (function(exports2) {
7751
8069
  var __importDefault = decode && decode.__importDefault || function(mod) {
7752
8070
  return mod && mod.__esModule ? mod : { "default": mod };
7753
8071
  };
7754
- Object.defineProperty(exports$1, "__esModule", { value: true });
7755
- exports$1.decodeXML = exports$1.decodeHTMLStrict = exports$1.decodeHTML = exports$1.determineBranch = exports$1.JUMP_OFFSET_BASE = exports$1.BinTrieFlags = exports$1.xmlDecodeTree = exports$1.htmlDecodeTree = void 0;
8072
+ Object.defineProperty(exports2, "__esModule", { value: true });
8073
+ exports2.decodeXML = exports2.decodeHTMLStrict = exports2.decodeHTML = exports2.determineBranch = exports2.JUMP_OFFSET_BASE = exports2.BinTrieFlags = exports2.xmlDecodeTree = exports2.htmlDecodeTree = void 0;
7756
8074
  var decode_data_html_1 = __importDefault(/* @__PURE__ */ requireDecodeDataHtml());
7757
- exports$1.htmlDecodeTree = decode_data_html_1.default;
8075
+ exports2.htmlDecodeTree = decode_data_html_1.default;
7758
8076
  var decode_data_xml_1 = __importDefault(/* @__PURE__ */ requireDecodeDataXml());
7759
- exports$1.xmlDecodeTree = decode_data_xml_1.default;
8077
+ exports2.xmlDecodeTree = decode_data_xml_1.default;
7760
8078
  var decode_codepoint_1 = __importDefault(/* @__PURE__ */ requireDecode_codepoint());
7761
8079
  var BinTrieFlags;
7762
8080
  (function(BinTrieFlags2) {
@@ -7764,8 +8082,8 @@ var VVPlot = (function(exports, vue) {
7764
8082
  BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 32512] = "BRANCH_LENGTH";
7765
8083
  BinTrieFlags2[BinTrieFlags2["MULTI_BYTE"] = 128] = "MULTI_BYTE";
7766
8084
  BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
7767
- })(BinTrieFlags = exports$1.BinTrieFlags || (exports$1.BinTrieFlags = {}));
7768
- exports$1.JUMP_OFFSET_BASE = 48 - 1;
8085
+ })(BinTrieFlags = exports2.BinTrieFlags || (exports2.BinTrieFlags = {}));
8086
+ exports2.JUMP_OFFSET_BASE = 48 - 1;
7769
8087
  function getDecoder(decodeTree) {
7770
8088
  return function decodeHTMLBinary(str, strict) {
7771
8089
  var ret = "";
@@ -7838,7 +8156,7 @@ var VVPlot = (function(exports, vue) {
7838
8156
  }
7839
8157
  var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
7840
8158
  if (jumpOffset) {
7841
- var value = char - exports$1.JUMP_OFFSET_BASE - jumpOffset;
8159
+ var value = char - exports2.JUMP_OFFSET_BASE - jumpOffset;
7842
8160
  return value < 0 || value > branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
7843
8161
  }
7844
8162
  var lo = nodeIdx;
@@ -7856,21 +8174,21 @@ var VVPlot = (function(exports, vue) {
7856
8174
  }
7857
8175
  return -1;
7858
8176
  }
7859
- exports$1.determineBranch = determineBranch;
8177
+ exports2.determineBranch = determineBranch;
7860
8178
  var htmlDecoder = getDecoder(decode_data_html_1.default);
7861
8179
  var xmlDecoder = getDecoder(decode_data_xml_1.default);
7862
8180
  function decodeHTML(str) {
7863
8181
  return htmlDecoder(str, false);
7864
8182
  }
7865
- exports$1.decodeHTML = decodeHTML;
8183
+ exports2.decodeHTML = decodeHTML;
7866
8184
  function decodeHTMLStrict(str) {
7867
8185
  return htmlDecoder(str, true);
7868
8186
  }
7869
- exports$1.decodeHTMLStrict = decodeHTMLStrict;
8187
+ exports2.decodeHTMLStrict = decodeHTMLStrict;
7870
8188
  function decodeXML(str) {
7871
8189
  return xmlDecoder(str, true);
7872
8190
  }
7873
- exports$1.decodeXML = decodeXML;
8191
+ exports2.decodeXML = decodeXML;
7874
8192
  })(decode);
7875
8193
  return decode;
7876
8194
  }
@@ -12142,17 +12460,17 @@ var VVPlot = (function(exports, vue) {
12142
12460
  function requireEncodeTrie() {
12143
12461
  if (hasRequiredEncodeTrie) return encodeTrie;
12144
12462
  hasRequiredEncodeTrie = 1;
12145
- (function(exports$1) {
12463
+ (function(exports2) {
12146
12464
  var __importDefault = encodeTrie && encodeTrie.__importDefault || function(mod) {
12147
12465
  return mod && mod.__esModule ? mod : { "default": mod };
12148
12466
  };
12149
- Object.defineProperty(exports$1, "__esModule", { value: true });
12150
- exports$1.getTrie = exports$1.encodeHTMLTrieRe = exports$1.getCodePoint = void 0;
12467
+ Object.defineProperty(exports2, "__esModule", { value: true });
12468
+ exports2.getTrie = exports2.encodeHTMLTrieRe = exports2.getCodePoint = void 0;
12151
12469
  var entities_json_1 = __importDefault(require$$2);
12152
12470
  function isHighSurrugate(c) {
12153
12471
  return (c & 64512) === 55296;
12154
12472
  }
12155
- exports$1.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
12473
+ exports2.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
12156
12474
  String.prototype.codePointAt != null ? function(str, index2) {
12157
12475
  return str.codePointAt(index2);
12158
12476
  } : (
@@ -12184,13 +12502,13 @@ var VVPlot = (function(exports, vue) {
12184
12502
  ret += str.substring(lastIdx, i) + next2.value;
12185
12503
  lastIdx = i + 1;
12186
12504
  } else {
12187
- ret += str.substring(lastIdx, i) + "&#x" + exports$1.getCodePoint(str, i).toString(16) + ";";
12505
+ ret += str.substring(lastIdx, i) + "&#x" + exports2.getCodePoint(str, i).toString(16) + ";";
12188
12506
  lastIdx = regExp.lastIndex += Number(isHighSurrugate(char));
12189
12507
  }
12190
12508
  }
12191
12509
  return ret + str.substr(lastIdx);
12192
12510
  }
12193
- exports$1.encodeHTMLTrieRe = encodeHTMLTrieRe;
12511
+ exports2.encodeHTMLTrieRe = encodeHTMLTrieRe;
12194
12512
  function getTrie(map2) {
12195
12513
  var _a, _b, _c, _d;
12196
12514
  var trie2 = /* @__PURE__ */ new Map();
@@ -12210,7 +12528,7 @@ var VVPlot = (function(exports, vue) {
12210
12528
  }
12211
12529
  return trie2;
12212
12530
  }
12213
- exports$1.getTrie = getTrie;
12531
+ exports2.getTrie = getTrie;
12214
12532
  })(encodeTrie);
12215
12533
  return encodeTrie;
12216
12534
  }
@@ -12305,27 +12623,27 @@ var VVPlot = (function(exports, vue) {
12305
12623
  function requireLib() {
12306
12624
  if (hasRequiredLib) return lib;
12307
12625
  hasRequiredLib = 1;
12308
- (function(exports$1) {
12309
- Object.defineProperty(exports$1, "__esModule", { value: true });
12310
- exports$1.decodeXMLStrict = exports$1.decodeHTML5Strict = exports$1.decodeHTML4Strict = exports$1.decodeHTML5 = exports$1.decodeHTML4 = exports$1.decodeHTMLStrict = exports$1.decodeHTML = exports$1.decodeXML = exports$1.encodeHTML5 = exports$1.encodeHTML4 = exports$1.escapeUTF8 = exports$1.escape = exports$1.encodeNonAsciiHTML = exports$1.encodeHTML = exports$1.encodeXML = exports$1.encode = exports$1.decodeStrict = exports$1.decode = exports$1.EncodingMode = exports$1.DecodingMode = exports$1.EntityLevel = void 0;
12626
+ (function(exports2) {
12627
+ Object.defineProperty(exports2, "__esModule", { value: true });
12628
+ exports2.decodeXMLStrict = exports2.decodeHTML5Strict = exports2.decodeHTML4Strict = exports2.decodeHTML5 = exports2.decodeHTML4 = exports2.decodeHTMLStrict = exports2.decodeHTML = exports2.decodeXML = exports2.encodeHTML5 = exports2.encodeHTML4 = exports2.escapeUTF8 = exports2.escape = exports2.encodeNonAsciiHTML = exports2.encodeHTML = exports2.encodeXML = exports2.encode = exports2.decodeStrict = exports2.decode = exports2.EncodingMode = exports2.DecodingMode = exports2.EntityLevel = void 0;
12311
12629
  var decode_1 = /* @__PURE__ */ requireDecode();
12312
12630
  var encode_12 = /* @__PURE__ */ requireEncode();
12313
12631
  var EntityLevel;
12314
12632
  (function(EntityLevel2) {
12315
12633
  EntityLevel2[EntityLevel2["XML"] = 0] = "XML";
12316
12634
  EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML";
12317
- })(EntityLevel = exports$1.EntityLevel || (exports$1.EntityLevel = {}));
12635
+ })(EntityLevel = exports2.EntityLevel || (exports2.EntityLevel = {}));
12318
12636
  var DecodingMode;
12319
12637
  (function(DecodingMode2) {
12320
12638
  DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy";
12321
12639
  DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict";
12322
- })(DecodingMode = exports$1.DecodingMode || (exports$1.DecodingMode = {}));
12640
+ })(DecodingMode = exports2.DecodingMode || (exports2.DecodingMode = {}));
12323
12641
  var EncodingMode;
12324
12642
  (function(EncodingMode2) {
12325
12643
  EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8";
12326
12644
  EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII";
12327
12645
  EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive";
12328
- })(EncodingMode = exports$1.EncodingMode || (exports$1.EncodingMode = {}));
12646
+ })(EncodingMode = exports2.EncodingMode || (exports2.EncodingMode = {}));
12329
12647
  function decode2(data, options) {
12330
12648
  if (options === void 0) {
12331
12649
  options = EntityLevel.XML;
@@ -12339,7 +12657,7 @@ var VVPlot = (function(exports, vue) {
12339
12657
  }
12340
12658
  return decode_1.decodeXML(data);
12341
12659
  }
12342
- exports$1.decode = decode2;
12660
+ exports2.decode = decode2;
12343
12661
  function decodeStrict(data, options) {
12344
12662
  if (options === void 0) {
12345
12663
  options = EntityLevel.XML;
@@ -12353,7 +12671,7 @@ var VVPlot = (function(exports, vue) {
12353
12671
  }
12354
12672
  return decode_1.decodeXML(data);
12355
12673
  }
12356
- exports$1.decodeStrict = decodeStrict;
12674
+ exports2.decodeStrict = decodeStrict;
12357
12675
  function encode2(data, options) {
12358
12676
  if (options === void 0) {
12359
12677
  options = EntityLevel.XML;
@@ -12369,52 +12687,52 @@ var VVPlot = (function(exports, vue) {
12369
12687
  }
12370
12688
  return encode_12.encodeXML(data);
12371
12689
  }
12372
- exports$1.encode = encode2;
12690
+ exports2.encode = encode2;
12373
12691
  var encode_2 = /* @__PURE__ */ requireEncode();
12374
- Object.defineProperty(exports$1, "encodeXML", { enumerable: true, get: function() {
12692
+ Object.defineProperty(exports2, "encodeXML", { enumerable: true, get: function() {
12375
12693
  return encode_2.encodeXML;
12376
12694
  } });
12377
- Object.defineProperty(exports$1, "encodeHTML", { enumerable: true, get: function() {
12695
+ Object.defineProperty(exports2, "encodeHTML", { enumerable: true, get: function() {
12378
12696
  return encode_2.encodeHTML;
12379
12697
  } });
12380
- Object.defineProperty(exports$1, "encodeNonAsciiHTML", { enumerable: true, get: function() {
12698
+ Object.defineProperty(exports2, "encodeNonAsciiHTML", { enumerable: true, get: function() {
12381
12699
  return encode_2.encodeNonAsciiHTML;
12382
12700
  } });
12383
- Object.defineProperty(exports$1, "escape", { enumerable: true, get: function() {
12701
+ Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
12384
12702
  return encode_2.escape;
12385
12703
  } });
12386
- Object.defineProperty(exports$1, "escapeUTF8", { enumerable: true, get: function() {
12704
+ Object.defineProperty(exports2, "escapeUTF8", { enumerable: true, get: function() {
12387
12705
  return encode_2.escapeUTF8;
12388
12706
  } });
12389
- Object.defineProperty(exports$1, "encodeHTML4", { enumerable: true, get: function() {
12707
+ Object.defineProperty(exports2, "encodeHTML4", { enumerable: true, get: function() {
12390
12708
  return encode_2.encodeHTML;
12391
12709
  } });
12392
- Object.defineProperty(exports$1, "encodeHTML5", { enumerable: true, get: function() {
12710
+ Object.defineProperty(exports2, "encodeHTML5", { enumerable: true, get: function() {
12393
12711
  return encode_2.encodeHTML;
12394
12712
  } });
12395
12713
  var decode_2 = /* @__PURE__ */ requireDecode();
12396
- Object.defineProperty(exports$1, "decodeXML", { enumerable: true, get: function() {
12714
+ Object.defineProperty(exports2, "decodeXML", { enumerable: true, get: function() {
12397
12715
  return decode_2.decodeXML;
12398
12716
  } });
12399
- Object.defineProperty(exports$1, "decodeHTML", { enumerable: true, get: function() {
12717
+ Object.defineProperty(exports2, "decodeHTML", { enumerable: true, get: function() {
12400
12718
  return decode_2.decodeHTML;
12401
12719
  } });
12402
- Object.defineProperty(exports$1, "decodeHTMLStrict", { enumerable: true, get: function() {
12720
+ Object.defineProperty(exports2, "decodeHTMLStrict", { enumerable: true, get: function() {
12403
12721
  return decode_2.decodeHTMLStrict;
12404
12722
  } });
12405
- Object.defineProperty(exports$1, "decodeHTML4", { enumerable: true, get: function() {
12723
+ Object.defineProperty(exports2, "decodeHTML4", { enumerable: true, get: function() {
12406
12724
  return decode_2.decodeHTML;
12407
12725
  } });
12408
- Object.defineProperty(exports$1, "decodeHTML5", { enumerable: true, get: function() {
12726
+ Object.defineProperty(exports2, "decodeHTML5", { enumerable: true, get: function() {
12409
12727
  return decode_2.decodeHTML;
12410
12728
  } });
12411
- Object.defineProperty(exports$1, "decodeHTML4Strict", { enumerable: true, get: function() {
12729
+ Object.defineProperty(exports2, "decodeHTML4Strict", { enumerable: true, get: function() {
12412
12730
  return decode_2.decodeHTMLStrict;
12413
12731
  } });
12414
- Object.defineProperty(exports$1, "decodeHTML5Strict", { enumerable: true, get: function() {
12732
+ Object.defineProperty(exports2, "decodeHTML5Strict", { enumerable: true, get: function() {
12415
12733
  return decode_2.decodeHTMLStrict;
12416
12734
  } });
12417
- Object.defineProperty(exports$1, "decodeXMLStrict", { enumerable: true, get: function() {
12735
+ Object.defineProperty(exports2, "decodeXMLStrict", { enumerable: true, get: function() {
12418
12736
  return decode_2.decodeXML;
12419
12737
  } });
12420
12738
  })(lib);
@@ -14472,7 +14790,7 @@ var VVPlot = (function(exports, vue) {
14472
14790
  XmlRenderer.prototype.esc = escapeXml;
14473
14791
  const _hoisted_1$d = ["text-anchor", "font-size"];
14474
14792
  const _hoisted_2$7 = { key: 0 };
14475
- const _sfc_main$12 = {
14793
+ const _sfc_main$16 = {
14476
14794
  __name: "CoreMarkdown",
14477
14795
  props: {
14478
14796
  x: { type: Number, default: 0 },
@@ -14619,6 +14937,72 @@ var VVPlot = (function(exports, vue) {
14619
14937
  };
14620
14938
  }
14621
14939
  };
14940
+ const _sfc_main$15 = {
14941
+ __name: "CoreAxisLabel",
14942
+ props: {
14943
+ type: String,
14944
+ value: null,
14945
+ getPosition: Function
14946
+ },
14947
+ emits: [
14948
+ "click",
14949
+ "dblclick",
14950
+ "contextmenu",
14951
+ "pointerdown",
14952
+ "pointerup",
14953
+ "pointerover",
14954
+ "pointerout",
14955
+ "pointerenter",
14956
+ "pointerleave",
14957
+ "pointermove",
14958
+ "wheel",
14959
+ "singleclick"
14960
+ ],
14961
+ setup(__props, { emit: __emit }) {
14962
+ const emit = __emit;
14963
+ const vOn = {
14964
+ pointerdown(e) {
14965
+ emit("pointerdown", e, __props.getPosition(e), __props.value);
14966
+ },
14967
+ pointerup(e) {
14968
+ emit("pointerup", e, __props.getPosition(e), __props.value);
14969
+ },
14970
+ pointerover(e) {
14971
+ emit("pointerover", e, __props.getPosition(e), __props.value);
14972
+ },
14973
+ pointerout(e) {
14974
+ emit("pointerout", e, __props.getPosition(e), __props.value);
14975
+ },
14976
+ pointerenter(e) {
14977
+ emit("pointerenter", e, __props.getPosition(e), __props.value);
14978
+ },
14979
+ pointerleave(e) {
14980
+ emit("pointerleave", e, __props.getPosition(e), __props.value);
14981
+ },
14982
+ dblclick(e) {
14983
+ emit("dblclick", e, __props.getPosition(e), __props.value);
14984
+ },
14985
+ click(e) {
14986
+ emit("click", e, __props.getPosition(e), __props.value);
14987
+ },
14988
+ singleclick(e) {
14989
+ emit("singleclick", e, __props.getPosition(e), __props.value);
14990
+ },
14991
+ contextmenu(e) {
14992
+ emit("contextmenu", e, __props.getPosition(e), __props.value);
14993
+ },
14994
+ pointermove(e) {
14995
+ emit("pointermove", e, __props.getPosition(e), __props.value);
14996
+ },
14997
+ wheel(e) {
14998
+ emit("wheel", e, __props.getPosition(e), __props.value);
14999
+ }
15000
+ };
15001
+ 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));
15003
+ };
15004
+ }
15005
+ };
14622
15006
  const _hoisted_1$c = ["transform"];
14623
15007
  const _hoisted_2$6 = ["x2"];
14624
15008
  const _hoisted_3$4 = {
@@ -14627,12 +15011,12 @@ var VVPlot = (function(exports, vue) {
14627
15011
  };
14628
15012
  const _hoisted_4$3 = ["width", "cursor"];
14629
15013
  const _hoisted_5$2 = {
14630
- key: 0,
15014
+ key: 1,
14631
15015
  class: "vvplot-interactive",
14632
15016
  fill: "transparent"
14633
15017
  };
14634
15018
  const _hoisted_6$2 = ["x"];
14635
- const _sfc_main$11 = {
15019
+ const _sfc_main$14 = {
14636
15020
  __name: "CoreAxisH",
14637
15021
  props: {
14638
15022
  coord: String,
@@ -14713,20 +15097,20 @@ var VVPlot = (function(exports, vue) {
14713
15097
  const tickLines = vue.computed(() => {
14714
15098
  let result = [];
14715
15099
  for (let tick of __props.ticks) {
14716
- if (typeof tick == "number") tick = { position: tick };
14717
- let pos = __props.coord2pos({ h: tick.position }).h;
15100
+ let { value, theme: $theme } = tick;
15101
+ let pos = __props.coord2pos({ h: value }).h;
14718
15102
  let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
14719
- let position = pos + __props.layout.l;
14720
- if (position + tsl < 0 || position + tsl > width.value) continue;
14721
- let offset = (__props.theme.tick_position == "top" ? -1 : 1) * (tick.length ?? __props.theme.tick_length);
15103
+ pos += __props.layout.l;
15104
+ if (pos + tsl < 0 || pos + tsl > width.value) continue;
15105
+ let offset = ($theme.tick_position == "top" ? -1 : 1) * $theme.tick_length;
14722
15106
  result.push({
14723
- key: "line-" + tick.position,
15107
+ key: "line-" + value,
14724
15108
  y1: 0,
14725
15109
  y2: offset,
14726
- x1: position,
14727
- x2: position,
14728
- "stroke": tick.color ?? __props.theme.tick_color,
14729
- "stroke-width": tick.width ?? __props.theme.tick_width,
15110
+ x1: pos,
15111
+ x2: pos,
15112
+ "stroke": $theme.tick_color,
15113
+ "stroke-width": $theme.tick_width,
14730
15114
  transform: tsl ? `translate(${tsl},0)` : null,
14731
15115
  style: { transition: __props.transition }
14732
15116
  });
@@ -14734,43 +15118,45 @@ var VVPlot = (function(exports, vue) {
14734
15118
  return result.filter((t) => t.stroke != null).sort((a, b) => a.x1 - b.x1);
14735
15119
  });
14736
15120
  const tickTexts = vue.computed(() => {
14737
- let isTop = (__props.theme.label_position ?? __props.theme.tick_position) == "top";
14738
15121
  let result = [];
14739
15122
  for (let tick of __props.ticks) {
14740
- if (typeof tick == "number") tick = { position: tick, label: tick };
14741
- let pos = __props.coord2pos({ h: tick.position }).h;
15123
+ let { type, value, label, title, theme: $theme, ...etc } = tick;
15124
+ let isTop = ($theme.label_position ?? $theme.tick_position) == "top";
15125
+ let pos = __props.coord2pos({ h: value }).h;
14742
15126
  let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
14743
- let position = pos + __props.layout.l;
14744
- if (position + tsl < 0 || position + tsl > width.value) continue;
14745
- let offset = (isTop ? -1 : 1) * (__props.theme.label_offset ?? tick.length ?? __props.theme.tick_length);
15127
+ pos += __props.layout.l;
15128
+ if (pos + tsl < 0 || pos + tsl > width.value) continue;
15129
+ let offset = (isTop ? -1 : 1) * ($theme.label_offset ?? $theme.tick_length);
14746
15130
  let anchorX, anchorY, dockX, dockY;
14747
- if (__props.theme.label_anchor_x != null || __props.theme.label_anchor_y != null) {
14748
- anchorX = __props.theme.label_anchor_x ?? 0.5;
14749
- anchorY = __props.theme.label_anchor_y ?? (isTop ? 0 : 1);
15131
+ if ($theme.label_anchor_x != null || $theme.label_anchor_y != null) {
15132
+ anchorX = $theme.label_anchor_x ?? 0.5;
15133
+ anchorY = $theme.label_anchor_y ?? (isTop ? 0 : 1);
14750
15134
  } else {
14751
- dockX = __props.theme.label_dock_x ?? 0.5;
14752
- dockY = __props.theme.label_dock_y ?? (isTop ? 0 : 1);
15135
+ dockX = $theme.label_dock_x ?? 0.5;
15136
+ dockY = $theme.label_dock_y ?? (isTop ? 0 : 1);
14753
15137
  }
14754
15138
  result.push({
14755
15139
  wrapper: {
14756
- key: "text-" + tick.position,
15140
+ key: "text-" + value,
14757
15141
  transform: tsl ? `translate(${tsl},0)` : null,
14758
15142
  style: { transition: __props.transition }
14759
15143
  },
14760
15144
  text: {
14761
- x: position,
15145
+ x: pos,
14762
15146
  y: offset,
14763
- angle: __props.theme.label_angle,
15147
+ angle: $theme.label_angle,
14764
15148
  anchorX,
14765
15149
  anchorY,
14766
15150
  dockX,
14767
15151
  dockY,
14768
- text: tick.label,
14769
- title: tick.title ?? tick.label,
14770
- fontSize: tick.size ?? __props.theme.label_size,
14771
- fill: tick.color ?? __props.theme.label_color,
15152
+ type: $theme.label_type,
15153
+ text: label,
15154
+ title: title ?? label,
15155
+ fontSize: $theme.label_size,
15156
+ fill: $theme.label_color,
14772
15157
  "font-family": "sans-serif",
14773
- ...__props.theme.label_style
15158
+ value,
15159
+ ...etc
14774
15160
  }
14775
15161
  });
14776
15162
  }
@@ -14801,13 +15187,6 @@ var VVPlot = (function(exports, vue) {
14801
15187
  }
14802
15188
  }
14803
15189
  e.target.addEventListener("pointermove", detectMove, { passive: true });
14804
- e.target.addEventListener("pointerup", function(ev) {
14805
- e.target.removeEventListener("pointermove", detectMove);
14806
- if (!pointerMoved) {
14807
- let position2 = getPosition(ev);
14808
- emit("singleclick", new PointerEvent("singleclick", ev), position2);
14809
- }
14810
- }, { once: true });
14811
15190
  let act = __props.action.find((a) => a.action == "move");
14812
15191
  if (!act) return;
14813
15192
  e.preventDefault();
@@ -14966,12 +15345,15 @@ var VVPlot = (function(exports, vue) {
14966
15345
  pointerleave(e) {
14967
15346
  emit("pointerleave", e, getPosition(e));
14968
15347
  },
14969
- dblclick(e) {
14970
- emit("dblclick", e, getPosition(e));
14971
- },
14972
15348
  click(e) {
14973
15349
  emit("click", e, getPosition(e));
14974
15350
  },
15351
+ singleclick(e) {
15352
+ emit("singleclick", e, getPosition(e));
15353
+ },
15354
+ dblclick(e) {
15355
+ emit("dblclick", e, getPosition(e));
15356
+ },
14975
15357
  contextmenu(e) {
14976
15358
  emit("contextmenu", e, getPosition(e));
14977
15359
  },
@@ -14985,13 +15367,14 @@ var VVPlot = (function(exports, vue) {
14985
15367
  transform: transform.value,
14986
15368
  style: vue.normalizeStyle({ transition: __props.transition })
14987
15369
  }, [
14988
- vue.createElementVNode("line", vue.mergeProps({
15370
+ axisLine.value.stroke != null ? (vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({
15371
+ key: 0,
14989
15372
  ref: "i",
14990
15373
  x1: 0,
14991
15374
  x2: width.value,
14992
15375
  y1: 0,
14993
15376
  y2: 0
14994
- }, axisLine.value), null, 16, _hoisted_2$6),
15377
+ }, axisLine.value), null, 16, _hoisted_2$6)) : vue.createCommentVNode("", true),
14995
15378
  _cache[1] || (_cache[1] = vue.createTextVNode()),
14996
15379
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickLines.value, (tick) => {
14997
15380
  return vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({ ref_for: true }, tick), null, 16);
@@ -14999,13 +15382,7 @@ var VVPlot = (function(exports, vue) {
14999
15382
  _cache[2] || (_cache[2] = vue.createTextVNode()),
15000
15383
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
15001
15384
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
15002
- __props.theme.label_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({
15003
- key: 0,
15004
- ref_for: true
15005
- }, tick.text), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({
15006
- key: 1,
15007
- ref_for: true
15008
- }, tick.text), null, 16))
15385
+ vue.createVNode(_sfc_main$15, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
15009
15386
  ], 16);
15010
15387
  }), 256)),
15011
15388
  _cache[3] || (_cache[3] = vue.createTextVNode()),
@@ -15037,8 +15414,8 @@ var VVPlot = (function(exports, vue) {
15037
15414
  }, vue.toHandlers(axisVOn, true), { onPointerdown: axisRescaleRightPointerdown }), null, 16, _hoisted_6$2)
15038
15415
  ])) : vue.createCommentVNode("", true),
15039
15416
  _cache[5] || (_cache[5] = vue.createTextVNode()),
15040
- axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
15041
- __props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$12, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$13, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
15417
+ 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))
15042
15419
  ], 64)) : vue.createCommentVNode("", true)
15043
15420
  ], 12, _hoisted_1$c);
15044
15421
  };
@@ -15052,12 +15429,12 @@ var VVPlot = (function(exports, vue) {
15052
15429
  };
15053
15430
  const _hoisted_4$2 = ["height", "cursor"];
15054
15431
  const _hoisted_5$1 = {
15055
- key: 0,
15432
+ key: 1,
15056
15433
  class: "vvplot-interactive",
15057
15434
  fill: "transparent"
15058
15435
  };
15059
15436
  const _hoisted_6$1 = ["y"];
15060
- const _sfc_main$10 = {
15437
+ const _sfc_main$13 = {
15061
15438
  __name: "CoreAxisV",
15062
15439
  props: {
15063
15440
  coord: String,
@@ -15138,20 +15515,20 @@ var VVPlot = (function(exports, vue) {
15138
15515
  const tickLines = vue.computed(() => {
15139
15516
  let result = [];
15140
15517
  for (let tick of __props.ticks) {
15141
- if (typeof tick == "number") tick = { position: tick };
15142
- let pos = __props.coord2pos({ v: tick.position }).v;
15518
+ let { value, theme: $theme } = tick;
15519
+ let pos = __props.coord2pos({ v: value }).v;
15143
15520
  let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
15144
- let position = pos + __props.layout.t;
15145
- if (position + tsl < 0 || position + tsl > height.value) continue;
15146
- let offset = (__props.theme.tick_position == "right" ? 1 : -1) * (tick.length ?? __props.theme.tick_length);
15521
+ pos += __props.layout.t;
15522
+ if (pos + tsl < 0 || pos + tsl > height.value) continue;
15523
+ let offset = ($theme.tick_position == "right" ? 1 : -1) * $theme.tick_length;
15147
15524
  result.push({
15148
- key: "line-" + tick.position,
15149
- y1: position,
15150
- y2: position,
15525
+ key: "line-" + tick.value,
15526
+ y1: pos,
15527
+ y2: pos,
15151
15528
  x1: 0,
15152
15529
  x2: offset,
15153
- "stroke": tick.color ?? __props.theme.tick_color,
15154
- "stroke-width": tick.width ?? __props.theme.tick_width,
15530
+ "stroke": tick.color ?? $theme.tick_color,
15531
+ "stroke-width": tick.width ?? $theme.tick_width,
15155
15532
  transform: tsl ? `translate(0,${tsl})` : null,
15156
15533
  style: { transition: __props.transition }
15157
15534
  });
@@ -15159,43 +15536,45 @@ var VVPlot = (function(exports, vue) {
15159
15536
  return result.filter((t) => t.stroke != null).sort((a, b) => a.y1 - b.y1);
15160
15537
  });
15161
15538
  const tickTexts = vue.computed(() => {
15162
- let isRight = (__props.theme.label_position ?? __props.theme.tick_position) == "right";
15163
15539
  let result = [];
15164
15540
  for (let tick of __props.ticks) {
15165
- if (typeof tick == "number") tick = { position: tick };
15166
- let pos = __props.coord2pos({ v: tick.position }).v;
15541
+ let { type, value, label, title, theme: $theme, ...etc } = tick;
15542
+ let isRight = ($theme.label_position ?? $theme.tick_position) == "right";
15543
+ let pos = __props.coord2pos({ v: value }).v;
15167
15544
  let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
15168
- let position = pos + __props.layout.t;
15169
- if (position + tsl < 0 || position + tsl > height.value) continue;
15170
- let offset = (isRight ? 1 : -1) * ((__props.theme.label_offset ?? tick.length ?? __props.theme.tick_length) + 3);
15545
+ pos += __props.layout.t;
15546
+ if (pos + tsl < 0 || pos + tsl > height.value) continue;
15547
+ let offset = (isRight ? 1 : -1) * (($theme.label_offset ?? $theme.tick_length) + 3);
15171
15548
  let anchorX, anchorY, dockX, dockY;
15172
- if (__props.theme.label_anchor_x != null || __props.theme.label_anchor_y != null) {
15173
- anchorX = __props.theme.label_anchor_x ?? (isRight ? 0 : 1);
15174
- anchorY = __props.theme.label_anchor_y ?? 0.5;
15549
+ if ($theme.label_anchor_x != null || $theme.label_anchor_y != null) {
15550
+ anchorX = $theme.label_anchor_x ?? (isRight ? 0 : 1);
15551
+ anchorY = $theme.label_anchor_y ?? 0.5;
15175
15552
  } else {
15176
- dockX = __props.theme.label_dock_x ?? (isRight ? 0 : 1);
15177
- dockY = __props.theme.label_dock_y ?? 0.5;
15553
+ dockX = $theme.label_dock_x ?? (isRight ? 0 : 1);
15554
+ dockY = $theme.label_dock_y ?? 0.5;
15178
15555
  }
15179
15556
  result.push({
15180
15557
  wrapper: {
15181
- key: "text-" + tick.position,
15558
+ key: "text-" + value,
15182
15559
  transform: tsl ? `translate(0,${tsl})` : null,
15183
15560
  style: { transition: __props.transition }
15184
15561
  },
15185
15562
  text: {
15186
- y: position,
15563
+ y: pos,
15187
15564
  x: offset,
15188
- angle: __props.theme.label_angle,
15565
+ angle: $theme.label_angle,
15189
15566
  anchorX,
15190
15567
  anchorY,
15191
15568
  dockX,
15192
15569
  dockY,
15193
- text: tick.label,
15194
- title: tick.title ?? tick.label,
15195
- fontSize: tick.size ?? __props.theme.label_size,
15196
- fill: tick.color ?? __props.theme.label_color,
15570
+ type: $theme.label_type,
15571
+ text: label,
15572
+ title: title ?? label,
15573
+ fontSize: $theme.label_size,
15574
+ fill: $theme.label_color,
15197
15575
  "font-family": "sans-serif",
15198
- ...__props.theme.label_style
15576
+ value,
15577
+ ...etc
15199
15578
  }
15200
15579
  });
15201
15580
  }
@@ -15226,13 +15605,6 @@ var VVPlot = (function(exports, vue) {
15226
15605
  }
15227
15606
  }
15228
15607
  e.target.addEventListener("pointermove", detectMove, { passive: true });
15229
- e.target.addEventListener("pointerup", function(ev) {
15230
- e.target.removeEventListener("pointermove", detectMove);
15231
- if (!pointerMoved) {
15232
- let position2 = getPosition(ev);
15233
- emit("singleclick", new PointerEvent("singleclick", ev), position2);
15234
- }
15235
- }, { once: true });
15236
15608
  let act = __props.action.find((a) => a.action == "move");
15237
15609
  if (!act) return;
15238
15610
  e.preventDefault();
@@ -15391,12 +15763,15 @@ var VVPlot = (function(exports, vue) {
15391
15763
  pointerleave(e) {
15392
15764
  emit("pointerleave", e, getPosition(e));
15393
15765
  },
15394
- dblclick(e) {
15395
- emit("dblclick", e, getPosition(e));
15396
- },
15397
15766
  click(e) {
15398
15767
  emit("click", e, getPosition(e));
15399
15768
  },
15769
+ singleclick(e) {
15770
+ emit("singleclick", e, getPosition(e));
15771
+ },
15772
+ dblclick(e) {
15773
+ emit("dblclick", e, getPosition(e));
15774
+ },
15400
15775
  contextmenu(e) {
15401
15776
  emit("contextmenu", e, getPosition(e));
15402
15777
  },
@@ -15410,13 +15785,14 @@ var VVPlot = (function(exports, vue) {
15410
15785
  transform: transform.value,
15411
15786
  style: vue.normalizeStyle({ transition: __props.transition })
15412
15787
  }, [
15413
- vue.createElementVNode("line", vue.mergeProps({
15788
+ axisLine.value.stroke != null ? (vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({
15789
+ key: 0,
15414
15790
  ref: "i",
15415
15791
  x1: 0,
15416
15792
  x2: 0,
15417
15793
  y1: 0,
15418
15794
  y2: height.value
15419
- }, axisLine.value), null, 16, _hoisted_2$5),
15795
+ }, axisLine.value), null, 16, _hoisted_2$5)) : vue.createCommentVNode("", true),
15420
15796
  _cache[1] || (_cache[1] = vue.createTextVNode()),
15421
15797
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickLines.value, (tick) => {
15422
15798
  return vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({ ref_for: true }, tick), null, 16);
@@ -15424,13 +15800,7 @@ var VVPlot = (function(exports, vue) {
15424
15800
  _cache[2] || (_cache[2] = vue.createTextVNode()),
15425
15801
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
15426
15802
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
15427
- __props.theme.label_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({
15428
- key: 0,
15429
- ref_for: true
15430
- }, tick.text), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({
15431
- key: 1,
15432
- ref_for: true
15433
- }, tick.text), null, 16))
15803
+ vue.createVNode(_sfc_main$15, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
15434
15804
  ], 16);
15435
15805
  }), 256)),
15436
15806
  _cache[3] || (_cache[3] = vue.createTextVNode()),
@@ -15462,14 +15832,14 @@ var VVPlot = (function(exports, vue) {
15462
15832
  }, vue.toHandlers(axisVOn, true), { onPointerdown: axisRescaleBottomPointerdown }), null, 16, _hoisted_6$1)
15463
15833
  ])) : vue.createCommentVNode("", true),
15464
15834
  _cache[5] || (_cache[5] = vue.createTextVNode()),
15465
- axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
15466
- __props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$12, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$13, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
15835
+ 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))
15467
15837
  ], 64)) : vue.createCommentVNode("", true)
15468
15838
  ], 12, _hoisted_1$b);
15469
15839
  };
15470
15840
  }
15471
15841
  };
15472
- const _sfc_main$$ = {
15842
+ const _sfc_main$12 = {
15473
15843
  __name: "CoreAxis",
15474
15844
  props: {
15475
15845
  theme: { type: Object, default: () => ({}) },
@@ -15478,8 +15848,8 @@ var VVPlot = (function(exports, vue) {
15478
15848
  },
15479
15849
  setup(__props) {
15480
15850
  const axis = {
15481
- h: _sfc_main$11,
15482
- v: _sfc_main$10
15851
+ h: _sfc_main$14,
15852
+ v: _sfc_main$13
15483
15853
  };
15484
15854
  return (_ctx, _cache) => {
15485
15855
  return __props.position != "none" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(axis[__props.orientation]), {
@@ -15490,15 +15860,13 @@ var VVPlot = (function(exports, vue) {
15490
15860
  };
15491
15861
  }
15492
15862
  };
15493
- const _sfc_main$_ = {
15863
+ const _sfc_main$11 = {
15494
15864
  __name: "CoreGridH",
15495
15865
  props: {
15496
- majorBreaks: { type: Array, default: () => [] },
15497
- minorBreaks: { type: Array, default: () => [] },
15866
+ breaks: { type: Array, default: () => [] },
15498
15867
  coord2pos: Function,
15499
15868
  pos2coord: Function,
15500
15869
  layout: Object,
15501
- theme: { type: Object, default: () => ({}) },
15502
15870
  action: { type: Object, default: () => ({}) },
15503
15871
  activeTransform: Object,
15504
15872
  transition: String
@@ -15508,20 +15876,21 @@ var VVPlot = (function(exports, vue) {
15508
15876
  const height = vue.computed(() => __props.layout.height + __props.layout.t + __props.layout.b);
15509
15877
  const majorLines = vue.computed(() => {
15510
15878
  let result = [];
15511
- for (let line2 of __props.majorBreaks) {
15512
- let pos = __props.coord2pos({ v: line2.position }).v;
15879
+ for (let b of __props.breaks) {
15880
+ if (b.type != "major") continue;
15881
+ let pos = __props.coord2pos({ v: b.value }).v;
15513
15882
  if (isNaN(pos)) continue;
15514
15883
  let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
15515
- let position = pos + __props.layout.t;
15516
- if (position + tsl < 0 || position + tsl > height.value) continue;
15884
+ pos += __props.layout.t;
15885
+ if (pos + tsl < 0 || pos + tsl > height.value) continue;
15517
15886
  result.push({
15518
- key: "major-" + line2.position,
15887
+ key: "major-" + b.value,
15519
15888
  x1: 0,
15520
15889
  x2: width.value,
15521
- y1: position,
15522
- y2: position,
15523
- "stroke": line2.color ?? __props.theme.line_color_major,
15524
- "stroke-width": line2.width ?? __props.theme.line_width_major ?? 0,
15890
+ y1: pos,
15891
+ y2: pos,
15892
+ "stroke": b.theme.grid_color_major,
15893
+ "stroke-width": b.theme.grid_width_major ?? 0,
15525
15894
  transform: tsl ? `translate(0,${tsl})` : null,
15526
15895
  style: { transition: __props.transition }
15527
15896
  });
@@ -15530,21 +15899,21 @@ var VVPlot = (function(exports, vue) {
15530
15899
  });
15531
15900
  const minorLines = vue.computed(() => {
15532
15901
  let result = [];
15533
- for (let line2 of __props.minorBreaks) {
15534
- if (__props.majorBreaks.some((ml) => ml.position == line2.position)) continue;
15535
- let pos = __props.coord2pos({ v: line2.position }).v;
15902
+ for (let b of __props.breaks) {
15903
+ if (b.type != "minor") continue;
15904
+ let pos = __props.coord2pos({ v: b.value }).v;
15536
15905
  if (isNaN(pos)) continue;
15537
15906
  let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
15538
- let position = pos + __props.layout.t;
15539
- if (position + tsl < 0 || position + tsl > height.value) continue;
15907
+ pos += __props.layout.t;
15908
+ if (pos + tsl < 0 || pos + tsl > height.value) continue;
15540
15909
  result.push({
15541
- key: "minor-" + line2.position,
15910
+ key: "minor-" + b.value,
15542
15911
  x1: 0,
15543
15912
  x2: width.value,
15544
- y1: position,
15545
- y2: position,
15546
- "stroke": line2.color ?? __props.theme.line_color_minor,
15547
- "stroke-width": line2.width ?? __props.theme.line_width_minor ?? 0,
15913
+ y1: pos,
15914
+ y2: pos,
15915
+ "stroke": b.theme.grid_color_minor,
15916
+ "stroke-width": b.theme.grid_width_minor ?? 0,
15548
15917
  transform: tsl ? `translate(0,${tsl})` : null,
15549
15918
  style: { transition: __props.transition }
15550
15919
  });
@@ -15563,15 +15932,13 @@ var VVPlot = (function(exports, vue) {
15563
15932
  };
15564
15933
  }
15565
15934
  };
15566
- const _sfc_main$Z = {
15935
+ const _sfc_main$10 = {
15567
15936
  __name: "CoreGridV",
15568
15937
  props: {
15569
- majorBreaks: { type: Array, default: () => [] },
15570
- minorBreaks: { type: Array, default: () => [] },
15938
+ breaks: { type: Array, default: () => [] },
15571
15939
  coord2pos: Function,
15572
15940
  pos2coord: Function,
15573
15941
  layout: Object,
15574
- theme: { type: Object, default: () => ({}) },
15575
15942
  action: { type: Object, default: () => ({}) },
15576
15943
  activeTransform: Object,
15577
15944
  transition: String
@@ -15581,20 +15948,21 @@ var VVPlot = (function(exports, vue) {
15581
15948
  const height = vue.computed(() => __props.layout.height + __props.layout.t + __props.layout.b);
15582
15949
  const majorLines = vue.computed(() => {
15583
15950
  let result = [];
15584
- for (let line2 of __props.majorBreaks) {
15585
- let pos = __props.coord2pos({ h: line2.position }).h;
15951
+ for (let b of __props.breaks) {
15952
+ if (b.type != "major") continue;
15953
+ let pos = __props.coord2pos({ h: b.value }).h;
15586
15954
  if (isNaN(pos)) continue;
15587
15955
  let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
15588
- let position = pos + __props.layout.l;
15589
- if (position + tsl < 0 || position + tsl > width.value) continue;
15956
+ pos += __props.layout.l;
15957
+ if (pos + tsl < 0 || pos + tsl > width.value) continue;
15590
15958
  result.push({
15591
- key: "major-" + line2.position,
15959
+ key: "major-" + b.value,
15592
15960
  y1: 0,
15593
15961
  y2: height.value,
15594
- x1: position,
15595
- x2: position,
15596
- "stroke": line2.color ?? __props.theme.line_color_major,
15597
- "stroke-width": line2.width ?? __props.theme.line_width_major ?? 0,
15962
+ x1: pos,
15963
+ x2: pos,
15964
+ "stroke": b.theme.grid_color_major,
15965
+ "stroke-width": b.theme.grid_width_major ?? 0,
15598
15966
  transform: tsl ? `translate(${tsl},0)` : null,
15599
15967
  style: { transition: __props.transition }
15600
15968
  });
@@ -15603,21 +15971,21 @@ var VVPlot = (function(exports, vue) {
15603
15971
  });
15604
15972
  const minorLines = vue.computed(() => {
15605
15973
  let result = [];
15606
- for (let line2 of __props.minorBreaks) {
15607
- if (__props.majorBreaks.some((ml) => ml.position == line2.position)) continue;
15608
- let pos = __props.coord2pos({ h: line2.position }).h;
15974
+ for (let b of __props.breaks) {
15975
+ if (b.type != "minor") continue;
15976
+ let pos = __props.coord2pos({ h: b.value }).h;
15609
15977
  if (isNaN(pos)) continue;
15610
15978
  let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
15611
- let position = pos + __props.layout.l;
15612
- if (position + tsl < 0 || position + tsl > width.value) continue;
15979
+ pos += __props.layout.l;
15980
+ if (pos + tsl < 0 || pos + tsl > width.value) continue;
15613
15981
  result.push({
15614
- key: "minor-" + line2.position,
15982
+ key: "minor-" + b.value,
15615
15983
  y1: 0,
15616
15984
  y2: height.value,
15617
- x1: position,
15618
- x2: position,
15619
- "stroke": line2.color ?? __props.theme.line_color_minor,
15620
- "stroke-width": line2.width ?? __props.theme.line_width_minor ?? 0,
15985
+ x1: pos,
15986
+ x2: pos,
15987
+ "stroke": b.theme.grid_color_minor,
15988
+ "stroke-width": b.theme.grid_width_minor ?? 0,
15621
15989
  transform: tsl ? `translate(${tsl},0)` : null,
15622
15990
  style: { transition: __props.transition }
15623
15991
  });
@@ -15636,7 +16004,7 @@ var VVPlot = (function(exports, vue) {
15636
16004
  };
15637
16005
  }
15638
16006
  };
15639
- const _sfc_main$Y = {
16007
+ const _sfc_main$$ = {
15640
16008
  __name: "CoreCanvasBoxplot",
15641
16009
  props: {
15642
16010
  extendX: { type: Number, default: 0 },
@@ -15697,7 +16065,6 @@ var VVPlot = (function(exports, vue) {
15697
16065
  "translate-y": translateY = 0,
15698
16066
  $raw
15699
16067
  } of group) {
15700
- if (color2 === "transparent") continue;
15701
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 });
15702
16069
  const { h: lx1, v: ly1 } = __props.coord2pos(x2 == null ? { y: y2, x: lwisker } : { x: x2, y: lwisker });
15703
16070
  const { h: lx2, v: ly2 } = __props.coord2pos(x2 == null ? { y: y2, x: uwisker } : { x: x2, y: uwisker });
@@ -15717,36 +16084,32 @@ var VVPlot = (function(exports, vue) {
15717
16084
  wiskerpath2d.lineTo(uwx2 + translateX, uwy2 + translateY);
15718
16085
  wiskerpath2d.moveTo(lwx1 + translateX, lwy1 + translateY);
15719
16086
  wiskerpath2d.lineTo(lwx2 + translateX, lwy2 + translateY);
15720
- ctx.lineWidth = linewidth;
15721
- if (color2 !== "none") {
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") {
15722
16094
  ctx.strokeStyle = color2;
16095
+ ctx.lineWidth = linewidth;
15723
16096
  ctx.stroke(linepath2d);
15724
16097
  ctx.stroke(wiskerpath2d);
15725
16098
  }
15726
- const rectpath2d = new Path2D();
15727
- rectpath2d.rect(rx1 + translateX, ry1 + translateY, rx2 - rx1, ry2 - ry1);
15728
16099
  if (fill !== "none") {
15729
16100
  ctx.fillStyle = fill;
15730
16101
  ctx.fill(rectpath2d);
15731
16102
  }
15732
- if (color2 != null) {
15733
- ctx.strokeStyle = color2;
16103
+ if (color2 != null && color2 !== "none") {
15734
16104
  ctx.stroke(rectpath2d);
15735
- }
15736
- _path_data.set(rectpath2d, $raw);
15737
- const medianpath2d = new Path2D();
15738
- medianpath2d.moveTo(mx1 + translateX, my1 + translateY);
15739
- medianpath2d.lineTo(mx2 + translateX, my2 + translateY);
15740
- ctx.lineWidth = linewidth * 2;
15741
- if (color2 !== "none") {
15742
- ctx.strokeStyle = color2;
16105
+ ctx.lineWidth = linewidth * 2;
15743
16106
  ctx.stroke(medianpath2d);
15744
16107
  }
15745
16108
  for (let { x: x3, y: y3, $raw: $raw2 } of outliers) {
15746
16109
  const { h: ox, v: oy } = __props.coord2pos({ x: x3, y: y3 });
15747
16110
  const outlierpath2d = new Path2D();
15748
16111
  outlierpath2d.arc(ox + translateX, oy + translateY, 2, 0, Math.PI * 2);
15749
- if (fill !== "none") {
16112
+ if (color2 != null && color2 !== "none") {
15750
16113
  ctx.fillStyle = color2;
15751
16114
  ctx.fill(outlierpath2d);
15752
16115
  }
@@ -15783,7 +16146,7 @@ var VVPlot = (function(exports, vue) {
15783
16146
  };
15784
16147
  }
15785
16148
  };
15786
- const _sfc_main$X = {
16149
+ const _sfc_main$_ = {
15787
16150
  __name: "CoreCanvasCurve",
15788
16151
  props: {
15789
16152
  extendX: { type: Number, default: 0 },
@@ -15820,8 +16183,8 @@ var VVPlot = (function(exports, vue) {
15820
16183
  for (const group of __props.data) {
15821
16184
  for (let {
15822
16185
  points,
15823
- fill = "none",
15824
- color: color2 = "black",
16186
+ fill,
16187
+ color: color2,
15825
16188
  linewidth,
15826
16189
  linetype,
15827
16190
  alpha: alpha2,
@@ -15848,7 +16211,7 @@ var VVPlot = (function(exports, vue) {
15848
16211
  ctx.fillStyle = fill;
15849
16212
  ctx.fill(path2d);
15850
16213
  }
15851
- if (color2 != null) {
16214
+ if (color2 != null && color2 !== "none") {
15852
16215
  ctx.strokeStyle = color2;
15853
16216
  ctx.stroke(path2d);
15854
16217
  }
@@ -15880,8 +16243,11 @@ var VVPlot = (function(exports, vue) {
15880
16243
  });
15881
16244
  const interpolators = {
15882
16245
  cardinal,
16246
+ cardinalClosed,
15883
16247
  catmullRom,
16248
+ catmullRomClosed,
15884
16249
  linear: curveLinear,
16250
+ linearClosed,
15885
16251
  natural: natural$1
15886
16252
  };
15887
16253
  return (_ctx, _cache) => {
@@ -15889,7 +16255,7 @@ var VVPlot = (function(exports, vue) {
15889
16255
  };
15890
16256
  }
15891
16257
  };
15892
- const _sfc_main$W = {
16258
+ const _sfc_main$Z = {
15893
16259
  __name: "CoreCanvasEllipse",
15894
16260
  props: {
15895
16261
  extendX: { type: Number, default: 0 },
@@ -15930,8 +16296,8 @@ var VVPlot = (function(exports, vue) {
15930
16296
  A,
15931
16297
  B,
15932
16298
  C,
15933
- fill = "none",
15934
- color: color2 = "black",
16299
+ fill,
16300
+ color: color2,
15935
16301
  linewidth,
15936
16302
  linetype,
15937
16303
  alpha: alpha2,
@@ -15959,7 +16325,7 @@ var VVPlot = (function(exports, vue) {
15959
16325
  ctx.fillStyle = fill;
15960
16326
  ctx.fill(path2d);
15961
16327
  }
15962
- if (color2 != null) {
16328
+ if (color2 != null && color2 !== "none") {
15963
16329
  ctx.strokeStyle = color2;
15964
16330
  ctx.stroke(path2d);
15965
16331
  }
@@ -15994,7 +16360,7 @@ var VVPlot = (function(exports, vue) {
15994
16360
  };
15995
16361
  }
15996
16362
  };
15997
- const _sfc_main$V = {
16363
+ const _sfc_main$Y = {
15998
16364
  __name: "CoreCanvasLine",
15999
16365
  props: {
16000
16366
  extendX: { type: Number, default: 0 },
@@ -16034,7 +16400,7 @@ var VVPlot = (function(exports, vue) {
16034
16400
  y: y2,
16035
16401
  xend,
16036
16402
  yend,
16037
- color: color2,
16403
+ color: color2 = "black",
16038
16404
  linewidth,
16039
16405
  alpha: alpha2,
16040
16406
  linetype,
@@ -16042,7 +16408,6 @@ var VVPlot = (function(exports, vue) {
16042
16408
  "translate-y": translateY = 0,
16043
16409
  $raw
16044
16410
  } of group) {
16045
- if (color2 === "transparent") continue;
16046
16411
  const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
16047
16412
  const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
16048
16413
  const path2d = new Path2D();
@@ -16052,7 +16417,7 @@ var VVPlot = (function(exports, vue) {
16052
16417
  ctx.lineWidth = linewidth;
16053
16418
  ctx.globalAlpha = alpha2;
16054
16419
  ctx.setLineDash(parseLinetype(linetype));
16055
- if (color2 !== "none") {
16420
+ if (color2 != null && color2 !== "none") {
16056
16421
  ctx.strokeStyle = color2;
16057
16422
  ctx.stroke(path2d);
16058
16423
  }
@@ -16087,7 +16452,7 @@ var VVPlot = (function(exports, vue) {
16087
16452
  };
16088
16453
  }
16089
16454
  };
16090
- const _sfc_main$U = {
16455
+ const _sfc_main$X = {
16091
16456
  __name: "CoreCanvasPoint",
16092
16457
  props: {
16093
16458
  extendX: { type: Number, default: 0 },
@@ -16107,7 +16472,8 @@ var VVPlot = (function(exports, vue) {
16107
16472
  diamond: (s) => `M0-${s * 0.707}L${s * 0.707},0L0,${s * 0.707}L-${s * 0.707},0Z`,
16108
16473
  square: (s) => `M-${s / 2}-${s / 2}H${s / 2}V${s / 2}H-${s / 2}Z`,
16109
16474
  plus: (s) => `M-${s / 10}-${s / 2}V-${s / 10}H-${s / 2}V${s / 10}H-${s / 10}V${s / 2}H${s / 10}V${s / 10}H${s / 2}V-${s / 10}H${s / 10}V-${s / 2}H-${s / 10}Z`,
16110
- corss: (s) => `M-${s * 0.283}-${s * 0.424}L-${s * 0.424}-${s * 0.283}L-${s * 0.141},0L-${s * 0.424},${s * 0.283}L-${s * 0.283},${s * 0.424}L0,${s * 0.141}L${s * 0.283},${s * 0.424}L${s * 0.424},${s * 0.283}L${s * 0.141},0L${s * 0.424},-${s * 0.283}L${s * 0.283},-${s * 0.424}L0,-${s * 0.141}Z`
16475
+ cross: (s) => `M-${s * 0.283}-${s * 0.424}L-${s * 0.424}-${s * 0.283}L-${s * 0.141},0L-${s * 0.424},${s * 0.283}L-${s * 0.283},${s * 0.424}L0,${s * 0.141}L${s * 0.283},${s * 0.424}L${s * 0.424},${s * 0.283}L${s * 0.141},0L${s * 0.424},-${s * 0.283}L${s * 0.283},-${s * 0.424}L0,-${s * 0.141}Z`,
16476
+ arrowhead: (s) => `M0,0L${s},${-s * 0.38}V${s * 0.38}Z`
16111
16477
  };
16112
16478
  const vBind = vue.computed(() => ({
16113
16479
  width: __props.layout.fullWidth * (1 + __props.extendX * 2),
@@ -16133,7 +16499,7 @@ var VVPlot = (function(exports, vue) {
16133
16499
  x: x2,
16134
16500
  y: y2,
16135
16501
  size = 6,
16136
- shape,
16502
+ shape: shape2,
16137
16503
  color: color2,
16138
16504
  stroke,
16139
16505
  linewidth,
@@ -16141,19 +16507,25 @@ var VVPlot = (function(exports, vue) {
16141
16507
  alpha: alpha2,
16142
16508
  "translate-x": translateX = 0,
16143
16509
  "translate-y": translateY = 0,
16510
+ angle: angle2 = 0,
16144
16511
  $raw
16145
16512
  } of group) {
16146
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
+ }
16147
16519
  const path2d = new Path2D();
16148
- if (String(shape).startsWith("path:")) {
16520
+ if (String(shape2).startsWith("path:")) {
16149
16521
  path2d.addPath(
16150
- new Path2D(shape.slice(5)),
16151
- new DOMMatrix().translateSelf(cx + translateX, cy + translateY)
16522
+ new Path2D(shape2.slice(5)),
16523
+ new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
16152
16524
  );
16153
- } else if (shape in paths) {
16525
+ } else if (shape2 in paths) {
16154
16526
  path2d.addPath(
16155
- new Path2D(paths[shape](size)),
16156
- new DOMMatrix().translate(cx + translateX, cy + translateY)
16527
+ new Path2D(paths[shape2](size)),
16528
+ new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
16157
16529
  );
16158
16530
  } else {
16159
16531
  path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
@@ -16166,7 +16538,7 @@ var VVPlot = (function(exports, vue) {
16166
16538
  ctx.fillStyle = color2;
16167
16539
  ctx.fill(path2d);
16168
16540
  }
16169
- if (stroke != null) {
16541
+ if (stroke != null && stroke !== "none") {
16170
16542
  ctx.strokeStyle = stroke;
16171
16543
  ctx.setLineDash(parseLinetype(linetype));
16172
16544
  ctx.stroke(path2d);
@@ -16202,7 +16574,7 @@ var VVPlot = (function(exports, vue) {
16202
16574
  };
16203
16575
  }
16204
16576
  };
16205
- const _sfc_main$T = {
16577
+ const _sfc_main$W = {
16206
16578
  __name: "CoreCanvasPolygon",
16207
16579
  props: {
16208
16580
  extendX: { type: Number, default: 0 },
@@ -16264,7 +16636,7 @@ var VVPlot = (function(exports, vue) {
16264
16636
  ctx.fillStyle = fill;
16265
16637
  ctx.fill(path2d);
16266
16638
  }
16267
- if (color2 != null) {
16639
+ if (color2 != null && color2 !== "none") {
16268
16640
  ctx.strokeStyle = color2;
16269
16641
  ctx.stroke(path2d);
16270
16642
  }
@@ -16299,7 +16671,7 @@ var VVPlot = (function(exports, vue) {
16299
16671
  };
16300
16672
  }
16301
16673
  };
16302
- const _sfc_main$S = {
16674
+ const _sfc_main$V = {
16303
16675
  __name: "CoreCanvasRect",
16304
16676
  props: {
16305
16677
  extendX: { type: Number, default: 0 },
@@ -16359,7 +16731,7 @@ var VVPlot = (function(exports, vue) {
16359
16731
  ctx.fillStyle = fill;
16360
16732
  ctx.fill(path2d);
16361
16733
  }
16362
- if (color2 != null) {
16734
+ if (color2 !== "none" && color2 != null) {
16363
16735
  ctx.strokeStyle = color2;
16364
16736
  ctx.stroke(path2d);
16365
16737
  }
@@ -16394,7 +16766,7 @@ var VVPlot = (function(exports, vue) {
16394
16766
  };
16395
16767
  }
16396
16768
  };
16397
- const _sfc_main$R = {
16769
+ const _sfc_main$U = {
16398
16770
  __name: "CoreCanvasText",
16399
16771
  props: {
16400
16772
  extendX: { type: Number, default: 0 },
@@ -16468,6 +16840,11 @@ var VVPlot = (function(exports, vue) {
16468
16840
  } else if (textLength != null) {
16469
16841
  width = textLength;
16470
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
+ }
16471
16848
  if (dockX != null || dockY != null) {
16472
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);
16473
16850
  if (isNaN(alnX)) alnX = 0.5;
@@ -16488,7 +16865,7 @@ var VVPlot = (function(exports, vue) {
16488
16865
  ctx.fillStyle = color2;
16489
16866
  ctx.fillText(label, 0, 0);
16490
16867
  }
16491
- if (stroke != null) {
16868
+ if (stroke != null && stroke !== "none") {
16492
16869
  ctx.strokeStyle = stroke;
16493
16870
  ctx.strokeText(label, 0, 0);
16494
16871
  }
@@ -16524,7 +16901,7 @@ var VVPlot = (function(exports, vue) {
16524
16901
  };
16525
16902
  }
16526
16903
  };
16527
- const _sfc_main$Q = {
16904
+ const _sfc_main$T = {
16528
16905
  __name: "CoreCanvasTextsegment",
16529
16906
  props: {
16530
16907
  extendX: { type: Number, default: 0 },
@@ -16625,7 +17002,7 @@ var VVPlot = (function(exports, vue) {
16625
17002
  ctx.fillStyle = color2;
16626
17003
  ctx.fillText(text2, 0, 0);
16627
17004
  }
16628
- if (stroke != null) {
17005
+ if (stroke != null && stroke !== "none") {
16629
17006
  ctx.strokeStyle = stroke;
16630
17007
  ctx.strokeText(text2, 0, 0);
16631
17008
  }
@@ -16643,7 +17020,7 @@ var VVPlot = (function(exports, vue) {
16643
17020
  ctx.fillStyle = color2;
16644
17021
  ctx.fillText(text2, 0, 0);
16645
17022
  }
16646
- if (stroke != null) {
17023
+ if (stroke != null && stroke !== "none") {
16647
17024
  ctx.strokeStyle = stroke;
16648
17025
  ctx.strokeText(text2, 0, 0);
16649
17026
  }
@@ -16698,19 +17075,20 @@ var VVPlot = (function(exports, vue) {
16698
17075
  };
16699
17076
  const canvas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16700
17077
  __proto__: null,
16701
- boxplot: _sfc_main$Y,
16702
- curve: _sfc_main$X,
16703
- ellipse: _sfc_main$W,
16704
- line: _sfc_main$V,
16705
- point: _sfc_main$U,
16706
- polygon: _sfc_main$T,
16707
- rect: _sfc_main$S,
16708
- stick: _sfc_main$V,
16709
- text: _sfc_main$R,
16710
- textsegment: _sfc_main$Q,
16711
- tile: _sfc_main$S
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
16712
17090
  }, Symbol.toStringTag, { value: "Module" }));
16713
- const _sfc_main$P = {
17091
+ const _sfc_main$S = {
16714
17092
  __name: "CoreSvgBlank",
16715
17093
  props: {
16716
17094
  extendX: { type: Number, default: 0 },
@@ -16730,7 +17108,7 @@ var VVPlot = (function(exports, vue) {
16730
17108
  }
16731
17109
  };
16732
17110
  const _hoisted_1$a = { key: 0 };
16733
- const _sfc_main$O = {
17111
+ const _sfc_main$R = {
16734
17112
  __name: "CoreTile",
16735
17113
  props: {
16736
17114
  x: { type: Number, default: 0 },
@@ -16772,7 +17150,7 @@ var VVPlot = (function(exports, vue) {
16772
17150
  };
16773
17151
  const _hoisted_1$9 = { key: 0 };
16774
17152
  const _hoisted_2$4 = { key: 0 };
16775
- const _sfc_main$N = {
17153
+ const _sfc_main$Q = {
16776
17154
  __name: "CorePoint",
16777
17155
  props: {
16778
17156
  x: { type: Number, default: 0 },
@@ -16781,7 +17159,7 @@ var VVPlot = (function(exports, vue) {
16781
17159
  size: { type: Number, default: 6 },
16782
17160
  color: String,
16783
17161
  stroke: String,
16784
- linewidth: Number,
17162
+ linewidth: { type: Number, default: 1 },
16785
17163
  linetype: String,
16786
17164
  alpha: { type: Number, default: 1 },
16787
17165
  title: String,
@@ -16796,7 +17174,8 @@ var VVPlot = (function(exports, vue) {
16796
17174
  triangle: "M0-0.667L0.577,0.333L-0.577,0.333Z",
16797
17175
  diamond: "M0-0.707L0.707,0L0,0.707L-0.707,0Z",
16798
17176
  plus: "M-0.1-0.5V-0.1H-0.5V0.1H-0.1V0.5H0.1V0.1H0.5V-0.1H0.1V-0.5H-0.1Z",
16799
- cross: "M-0.283-0.424L-0.424-0.283L-0.141,0L-0.424,0.283L-0.283,0.424L0,0.141L0.283,0.424L0.424,0.283L0.141,0L0.424,-0.283L0.283,-0.424L0,-0.141Z"
17177
+ cross: "M-0.283-0.424L-0.424-0.283L-0.141,0L-0.424,0.283L-0.283,0.424L0,0.141L0.283,0.424L0.424,0.283L0.141,0L0.424,-0.283L0.283,-0.424L0,-0.141Z",
17178
+ arrowhead: "M0,0L1,0.38V-0.38Z"
16800
17179
  };
16801
17180
  const binds = vue.computed(() => {
16802
17181
  let d = __props.shape?.startsWith?.("path:") ? __props.shape?.slice?.(5) : paths[__props.shape];
@@ -16805,7 +17184,6 @@ var VVPlot = (function(exports, vue) {
16805
17184
  fill: __props.color || null,
16806
17185
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16807
17186
  stroke: __props.stroke || null,
16808
- "stroke-width": __props.linewidth,
16809
17187
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
16810
17188
  "stroke-dasharray": parseLinetype(__props.linetype).join(" ") || null
16811
17189
  };
@@ -16814,10 +17192,10 @@ var VVPlot = (function(exports, vue) {
16814
17192
  if (tslX !== 0 || tslY !== 0) transform.push(`translate(${tslX},${tslY})`);
16815
17193
  if (__props.size != 1) transform.push(`scale(${__props.size})`);
16816
17194
  if (__props.angle) transform.push(`rotate(${__props.angle})`);
16817
- Object.assign(result, { d, transform: transform.join(" ") || null });
17195
+ Object.assign(result, { d, transform: transform.join(" ") || null, "stroke-width": __props.linewidth / __props.size });
16818
17196
  } else {
16819
17197
  let transform = __props.translateX || __props.translateY ? `translate(${__props.translateX}, ${__props.translateY})` : null;
16820
- Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform });
17198
+ Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform, "stroke-width": __props.linewidth });
16821
17199
  }
16822
17200
  return result;
16823
17201
  });
@@ -16831,7 +17209,7 @@ var VVPlot = (function(exports, vue) {
16831
17209
  }
16832
17210
  };
16833
17211
  const _hoisted_1$8 = { key: 0 };
16834
- const _sfc_main$M = {
17212
+ const _sfc_main$P = {
16835
17213
  __name: "CoreLine",
16836
17214
  props: {
16837
17215
  x1: { type: Number, default: 0 },
@@ -16869,7 +17247,7 @@ var VVPlot = (function(exports, vue) {
16869
17247
  };
16870
17248
  }
16871
17249
  };
16872
- const _sfc_main$L = {
17250
+ const _sfc_main$O = {
16873
17251
  __name: "CoreSvgBoxplot",
16874
17252
  props: {
16875
17253
  extendX: { type: Number, default: 0 },
@@ -17032,18 +17410,18 @@ var VVPlot = (function(exports, vue) {
17032
17410
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17033
17411
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbinds, von]) => {
17034
17412
  return vue.openBlock(), vue.createElementBlock("g", null, [
17035
- vue.createVNode(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
17413
+ vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
17036
17414
  _cache[0] || (_cache[0] = vue.createTextVNode()),
17037
- vue.createVNode(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbinds.rect, vue.toHandlers(von)), null, 16),
17415
+ vue.createVNode(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbinds.rect, vue.toHandlers(von)), null, 16),
17038
17416
  _cache[1] || (_cache[1] = vue.createTextVNode()),
17039
- vue.createVNode(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbinds.midline), null, 16),
17417
+ vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.midline), null, 16),
17040
17418
  _cache[2] || (_cache[2] = vue.createTextVNode()),
17041
- vue.createVNode(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
17419
+ vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
17042
17420
  _cache[3] || (_cache[3] = vue.createTextVNode()),
17043
- vue.createVNode(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
17421
+ vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
17044
17422
  _cache[4] || (_cache[4] = vue.createTextVNode()),
17045
17423
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vbinds.outliers, ([vbind, von2]) => {
17046
- return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von2)), null, 16);
17424
+ return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von2)), null, 16);
17047
17425
  }), 256))
17048
17426
  ]);
17049
17427
  }), 256))
@@ -17054,14 +17432,13 @@ var VVPlot = (function(exports, vue) {
17054
17432
  }
17055
17433
  };
17056
17434
  const _hoisted_1$7 = { key: 0 };
17057
- const _sfc_main$K = {
17435
+ const _sfc_main$N = {
17058
17436
  __name: "CoreCurve",
17059
17437
  props: {
17060
17438
  points: { type: Array, default: () => [] },
17061
17439
  interpolate: { default: "natural" },
17062
- fill: { type: String, default: "none" },
17440
+ fill: String,
17063
17441
  color: String,
17064
- stroke: String,
17065
17442
  linewidth: Number,
17066
17443
  linetype: String,
17067
17444
  alpha: { type: Number, default: 1 },
@@ -17086,8 +17463,11 @@ var VVPlot = (function(exports, vue) {
17086
17463
  });
17087
17464
  const interpolators = {
17088
17465
  cardinal,
17466
+ cardinalClosed,
17089
17467
  catmullRom,
17468
+ catmullRomClosed,
17090
17469
  linear: curveLinear,
17470
+ linearClosed,
17091
17471
  natural: natural$1
17092
17472
  };
17093
17473
  return (_ctx, _cache) => {
@@ -17097,7 +17477,7 @@ var VVPlot = (function(exports, vue) {
17097
17477
  };
17098
17478
  }
17099
17479
  };
17100
- const _sfc_main$J = {
17480
+ const _sfc_main$M = {
17101
17481
  __name: "CoreSvgCurve",
17102
17482
  props: {
17103
17483
  extendX: { type: Number, default: 0 },
@@ -17117,14 +17497,16 @@ var VVPlot = (function(exports, vue) {
17117
17497
  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;
17118
17498
  return __props.data.map((group) => group.map(({
17119
17499
  points,
17120
- fill = "none",
17121
- color: color2 = "black",
17500
+ fill,
17501
+ color: color2,
17122
17502
  linewidth,
17123
17503
  linetype,
17124
17504
  alpha: alpha2,
17125
17505
  title,
17126
17506
  "translate-x": translateX = 0,
17127
17507
  "translate-y": translateY = 0,
17508
+ "marker-start": markerStart,
17509
+ "marker-end": markerEnd,
17128
17510
  class: className,
17129
17511
  style,
17130
17512
  $raw,
@@ -17142,6 +17524,8 @@ var VVPlot = (function(exports, vue) {
17142
17524
  title,
17143
17525
  translateX,
17144
17526
  translateY,
17527
+ "marker-start": markerStart,
17528
+ "marker-end": markerEnd,
17145
17529
  class: className,
17146
17530
  style,
17147
17531
  interpolate: interpolate2
@@ -17157,7 +17541,7 @@ var VVPlot = (function(exports, vue) {
17157
17541
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17158
17542
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17159
17543
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17160
- return vue.openBlock(), vue.createBlock(_sfc_main$K, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17544
+ return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17161
17545
  }), 256))
17162
17546
  ], 16);
17163
17547
  }), 256))
@@ -17166,7 +17550,7 @@ var VVPlot = (function(exports, vue) {
17166
17550
  }
17167
17551
  };
17168
17552
  const _hoisted_1$6 = { key: 0 };
17169
- const _sfc_main$I = {
17553
+ const _sfc_main$L = {
17170
17554
  __name: "CoreEllipse",
17171
17555
  props: {
17172
17556
  cx: { type: Number, default: 0 },
@@ -17211,7 +17595,7 @@ var VVPlot = (function(exports, vue) {
17211
17595
  };
17212
17596
  }
17213
17597
  };
17214
- const _sfc_main$H = {
17598
+ const _sfc_main$K = {
17215
17599
  __name: "CoreSvgEllipse",
17216
17600
  props: {
17217
17601
  extendX: { type: Number, default: 0 },
@@ -17235,8 +17619,8 @@ var VVPlot = (function(exports, vue) {
17235
17619
  A,
17236
17620
  B,
17237
17621
  C,
17238
- fill = "none",
17239
- color: color2 = "black",
17622
+ fill,
17623
+ color: color2,
17240
17624
  linewidth,
17241
17625
  linetype,
17242
17626
  alpha: alpha2,
@@ -17285,7 +17669,7 @@ var VVPlot = (function(exports, vue) {
17285
17669
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17286
17670
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17287
17671
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17288
- return vue.openBlock(), vue.createBlock(_sfc_main$I, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17672
+ return vue.openBlock(), vue.createBlock(_sfc_main$L, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17289
17673
  }), 256))
17290
17674
  ], 16);
17291
17675
  }), 256))
@@ -17293,7 +17677,7 @@ var VVPlot = (function(exports, vue) {
17293
17677
  };
17294
17678
  }
17295
17679
  };
17296
- const _sfc_main$G = {
17680
+ const _sfc_main$J = {
17297
17681
  __name: "CoreSvgLine",
17298
17682
  props: {
17299
17683
  extendX: { type: Number, default: 0 },
@@ -17323,6 +17707,8 @@ var VVPlot = (function(exports, vue) {
17323
17707
  title,
17324
17708
  "translate-x": translateX = 0,
17325
17709
  "translate-y": translateY = 0,
17710
+ "marker-start": markerStart,
17711
+ "marker-end": markerEnd,
17326
17712
  class: className,
17327
17713
  style,
17328
17714
  $raw
@@ -17342,6 +17728,8 @@ var VVPlot = (function(exports, vue) {
17342
17728
  title,
17343
17729
  translateX,
17344
17730
  translateY,
17731
+ "marker-start": markerStart,
17732
+ "marker-end": markerEnd,
17345
17733
  class: className,
17346
17734
  style
17347
17735
  };
@@ -17356,7 +17744,7 @@ var VVPlot = (function(exports, vue) {
17356
17744
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17357
17745
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17358
17746
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17359
- return vue.openBlock(), vue.createBlock(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17747
+ return vue.openBlock(), vue.createBlock(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17360
17748
  }), 256))
17361
17749
  ], 16);
17362
17750
  }), 256))
@@ -17364,7 +17752,7 @@ var VVPlot = (function(exports, vue) {
17364
17752
  };
17365
17753
  }
17366
17754
  };
17367
- const _sfc_main$F = {
17755
+ const _sfc_main$I = {
17368
17756
  __name: "CoreSvgMarkdown",
17369
17757
  props: {
17370
17758
  extendX: { type: Number, default: 0 },
@@ -17415,6 +17803,11 @@ var VVPlot = (function(exports, vue) {
17415
17803
  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 });
17416
17804
  textLength = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
17417
17805
  }
17806
+ if (typeof angle2 == "object") {
17807
+ let { dx = 0, dy = 0 } = angle2;
17808
+ let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
17809
+ angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
17810
+ }
17418
17811
  let vbind = {
17419
17812
  x: tx,
17420
17813
  y: ty,
@@ -17450,7 +17843,7 @@ var VVPlot = (function(exports, vue) {
17450
17843
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17451
17844
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17452
17845
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17453
- return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17846
+ return vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17454
17847
  }), 256))
17455
17848
  ], 16);
17456
17849
  }), 256))
@@ -17458,7 +17851,7 @@ var VVPlot = (function(exports, vue) {
17458
17851
  };
17459
17852
  }
17460
17853
  };
17461
- const _sfc_main$E = {
17854
+ const _sfc_main$H = {
17462
17855
  __name: "CoreSvgMarkdownsegment",
17463
17856
  props: {
17464
17857
  extendX: { type: Number, default: 0 },
@@ -17571,7 +17964,7 @@ var VVPlot = (function(exports, vue) {
17571
17964
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17572
17965
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17573
17966
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17574
- return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17967
+ return vue.openBlock(), vue.createBlock(_sfc_main$16, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17575
17968
  }), 256))
17576
17969
  ], 16);
17577
17970
  }), 256))
@@ -17579,7 +17972,7 @@ var VVPlot = (function(exports, vue) {
17579
17972
  };
17580
17973
  }
17581
17974
  };
17582
- const _sfc_main$D = {
17975
+ const _sfc_main$G = {
17583
17976
  __name: "CoreSvgPoint",
17584
17977
  props: {
17585
17978
  extendX: { type: Number, default: 0 },
@@ -17600,7 +17993,7 @@ var VVPlot = (function(exports, vue) {
17600
17993
  return __props.data.map((group) => group.map(({
17601
17994
  x: x2,
17602
17995
  y: y2,
17603
- shape,
17996
+ shape: shape2,
17604
17997
  size = 6,
17605
17998
  color: color2,
17606
17999
  stroke,
@@ -17617,10 +18010,15 @@ var VVPlot = (function(exports, vue) {
17617
18010
  }) => {
17618
18011
  const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
17619
18012
  if (cx < xlim_min || cx > xlim_max || cy < ylim_min || cy > ylim_max) return null;
18013
+ if (typeof angle2 == "object") {
18014
+ let { dx = 0, dy = 0 } = angle2;
18015
+ let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
18016
+ angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
18017
+ }
17620
18018
  let vbind = {
17621
18019
  x: cx,
17622
18020
  y: cy,
17623
- shape,
18021
+ shape: shape2,
17624
18022
  size,
17625
18023
  color: color2,
17626
18024
  stroke,
@@ -17645,7 +18043,7 @@ var VVPlot = (function(exports, vue) {
17645
18043
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17646
18044
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17647
18045
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17648
- return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18046
+ return vue.openBlock(), vue.createBlock(_sfc_main$Q, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17649
18047
  }), 256))
17650
18048
  ], 16);
17651
18049
  }), 256))
@@ -17654,7 +18052,7 @@ var VVPlot = (function(exports, vue) {
17654
18052
  }
17655
18053
  };
17656
18054
  const _hoisted_1$5 = { key: 0 };
17657
- const _sfc_main$C = {
18055
+ const _sfc_main$F = {
17658
18056
  __name: "CorePolygon",
17659
18057
  props: {
17660
18058
  points: { type: Array, default: () => [] },
@@ -17688,7 +18086,7 @@ var VVPlot = (function(exports, vue) {
17688
18086
  };
17689
18087
  }
17690
18088
  };
17691
- const _sfc_main$B = {
18089
+ const _sfc_main$E = {
17692
18090
  __name: "CoreSvgPolygon",
17693
18091
  props: {
17694
18092
  extendX: { type: Number, default: 0 },
@@ -17716,6 +18114,9 @@ var VVPlot = (function(exports, vue) {
17716
18114
  title,
17717
18115
  "translate-x": translateX = 0,
17718
18116
  "translate-y": translateY = 0,
18117
+ "marker-start": markerStart,
18118
+ "marker-mid": markerMid,
18119
+ "marker-end": markerEnd,
17719
18120
  class: className,
17720
18121
  style,
17721
18122
  $raw
@@ -17732,6 +18133,9 @@ var VVPlot = (function(exports, vue) {
17732
18133
  title,
17733
18134
  translateX,
17734
18135
  translateY,
18136
+ "marker-start": markerStart,
18137
+ "marker-mid": markerMid,
18138
+ "marker-end": markerEnd,
17735
18139
  class: className,
17736
18140
  style
17737
18141
  };
@@ -17746,7 +18150,7 @@ var VVPlot = (function(exports, vue) {
17746
18150
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17747
18151
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17748
18152
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17749
- return vue.openBlock(), vue.createBlock(_sfc_main$C, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18153
+ return vue.openBlock(), vue.createBlock(_sfc_main$F, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17750
18154
  }), 256))
17751
18155
  ], 16);
17752
18156
  }), 256))
@@ -17754,7 +18158,7 @@ var VVPlot = (function(exports, vue) {
17754
18158
  };
17755
18159
  }
17756
18160
  };
17757
- const _sfc_main$A = {
18161
+ const _sfc_main$D = {
17758
18162
  __name: "CoreSvgRect",
17759
18163
  props: {
17760
18164
  extendX: { type: Number, default: 0 },
@@ -17777,7 +18181,7 @@ var VVPlot = (function(exports, vue) {
17777
18181
  xmax,
17778
18182
  ymin,
17779
18183
  ymax,
17780
- fill = "black",
18184
+ fill,
17781
18185
  color: color2,
17782
18186
  linewidth,
17783
18187
  linetype,
@@ -17818,7 +18222,7 @@ var VVPlot = (function(exports, vue) {
17818
18222
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17819
18223
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17820
18224
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17821
- return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18225
+ return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17822
18226
  }), 256))
17823
18227
  ], 16);
17824
18228
  }), 256))
@@ -17826,7 +18230,7 @@ var VVPlot = (function(exports, vue) {
17826
18230
  };
17827
18231
  }
17828
18232
  };
17829
- const _sfc_main$z = {
18233
+ const _sfc_main$C = {
17830
18234
  __name: "CoreSvgText",
17831
18235
  props: {
17832
18236
  extendX: { type: Number, default: 0 },
@@ -17877,6 +18281,11 @@ var VVPlot = (function(exports, vue) {
17877
18281
  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 });
17878
18282
  textLength = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
17879
18283
  }
18284
+ if (typeof angle2 == "object") {
18285
+ let { dx = 0, dy = 0 } = angle2;
18286
+ let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
18287
+ angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
18288
+ }
17880
18289
  let vbind = {
17881
18290
  x: tx,
17882
18291
  y: ty,
@@ -17912,7 +18321,7 @@ var VVPlot = (function(exports, vue) {
17912
18321
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17913
18322
  return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17914
18323
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17915
- return vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
18324
+ return vue.openBlock(), vue.createBlock(_sfc_main$17, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17916
18325
  }), 256))
17917
18326
  ], 16);
17918
18327
  }), 256))
@@ -17920,7 +18329,7 @@ var VVPlot = (function(exports, vue) {
17920
18329
  };
17921
18330
  }
17922
18331
  };
17923
- const _sfc_main$y = {
18332
+ const _sfc_main$B = {
17924
18333
  __name: "CoreSvgTextsegment",
17925
18334
  props: {
17926
18335
  extendX: { type: Number, default: 0 },
@@ -18099,22 +18508,23 @@ var VVPlot = (function(exports, vue) {
18099
18508
  };
18100
18509
  const svg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18101
18510
  __proto__: null,
18102
- blank: _sfc_main$P,
18103
- boxplot: _sfc_main$L,
18104
- curve: _sfc_main$J,
18105
- ellipse: _sfc_main$H,
18106
- line: _sfc_main$G,
18107
- markdown: _sfc_main$F,
18108
- markdownsegment: _sfc_main$E,
18109
- point: _sfc_main$D,
18110
- polygon: _sfc_main$B,
18111
- rect: _sfc_main$A,
18112
- stick: _sfc_main$G,
18113
- text: _sfc_main$z,
18114
- textsegment: _sfc_main$y,
18115
- tile: _sfc_main$A
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
18116
18526
  }, Symbol.toStringTag, { value: "Module" }));
18117
- const _sfc_main$x = {
18527
+ const _sfc_main$A = {
18118
18528
  __name: "CoreLayer",
18119
18529
  props: {
18120
18530
  data: Object,
@@ -18155,7 +18565,7 @@ var VVPlot = (function(exports, vue) {
18155
18565
  };
18156
18566
  const _hoisted_1$4 = { key: 0 };
18157
18567
  const _hoisted_2$3 = ["onPointerdown"];
18158
- const _sfc_main$w = {
18568
+ const _sfc_main$z = {
18159
18569
  __name: "CoreSelection",
18160
18570
  props: /* @__PURE__ */ vue.mergeModels({
18161
18571
  coord2pos: Function,
@@ -18255,7 +18665,7 @@ var VVPlot = (function(exports, vue) {
18255
18665
  if (pos.hmax == null) hmax += linewidth / 2;
18256
18666
  if (pos.vmin == null) vmin -= linewidth / 2;
18257
18667
  if (pos.vmax == null) vmax += linewidth / 2;
18258
- let width = hmax - hmin, height = vmax - vmin;
18668
+ let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
18259
18669
  return {
18260
18670
  x: hmin,
18261
18671
  y: vmin,
@@ -18274,7 +18684,7 @@ var VVPlot = (function(exports, vue) {
18274
18684
  if (!position.value || translating.value) return null;
18275
18685
  let size = 10;
18276
18686
  let { hmin, hmax, vmin, vmax, pos } = position.value;
18277
- let width = hmax - hmin, height = vmax - vmin;
18687
+ let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
18278
18688
  let binds = {};
18279
18689
  if (config.move) binds.tblr = {
18280
18690
  x: hmin,
@@ -18412,7 +18822,7 @@ var VVPlot = (function(exports, vue) {
18412
18822
  const _hoisted_1$3 = ["height", "width"];
18413
18823
  const _hoisted_2$2 = ["y1", "y2"];
18414
18824
  const _hoisted_3$2 = ["y"];
18415
- const _sfc_main$v = {
18825
+ const _sfc_main$y = {
18416
18826
  __name: "CoreGuideGradientbar",
18417
18827
  props: {
18418
18828
  scales: Array,
@@ -18452,7 +18862,7 @@ var VVPlot = (function(exports, vue) {
18452
18862
  ref: "svg"
18453
18863
  }, [
18454
18864
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(gradient_values.value, (v, i) => {
18455
- return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({
18865
+ return vue.openBlock(), vue.createBlock(_sfc_main$R, vue.mergeProps({
18456
18866
  width: 10,
18457
18867
  height: 3.1,
18458
18868
  x: 10,
@@ -18484,12 +18894,12 @@ var VVPlot = (function(exports, vue) {
18484
18894
  };
18485
18895
  const element = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
18486
18896
  __proto__: null,
18487
- curve: _sfc_main$K,
18488
- line: _sfc_main$M,
18489
- point: _sfc_main$N,
18490
- polygon: _sfc_main$C,
18491
- text: _sfc_main$13,
18492
- tile: _sfc_main$O
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
18493
18903
  }, Symbol.toStringTag, { value: "Module" }));
18494
18904
  const _hoisted_1$2 = ["height", "width"];
18495
18905
  const _hoisted_2$1 = ["transform"];
@@ -18499,7 +18909,7 @@ var VVPlot = (function(exports, vue) {
18499
18909
  y: "10",
18500
18910
  "alignment-baseline": "central"
18501
18911
  };
18502
- const _sfc_main$u = {
18912
+ const _sfc_main$x = {
18503
18913
  __name: "CoreGuideLegendkey",
18504
18914
  props: {
18505
18915
  scales: Array,
@@ -18529,7 +18939,7 @@ var VVPlot = (function(exports, vue) {
18529
18939
  const geoms = vue.computed(() => {
18530
18940
  let { text: text2, line: line2, point: point2, tile: tile2 } = __props.appearances;
18531
18941
  let result = {};
18532
- if (tile2 != null) result.tile = { width: 10, height: 10, fill: "transparent", ...tile2 };
18942
+ if (tile2 != null) result.tile = { width: 10, height: 10, fill: "none", ...tile2 };
18533
18943
  if (line2 != null) result.line = { x1: -5, x2: 5, color: "black", ...line2 };
18534
18944
  if (point2 != null) result.point = { size: 6, ...point2 };
18535
18945
  if (text2 != null) result.text = { size: 4, text: "a", ...text2 };
@@ -18566,7 +18976,7 @@ var VVPlot = (function(exports, vue) {
18566
18976
  };
18567
18977
  }
18568
18978
  };
18569
- const _sfc_main$t = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
18979
+ const _sfc_main$w = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
18570
18980
  __name: "CoreGuide",
18571
18981
  props: {
18572
18982
  scales: Array,
@@ -18574,8 +18984,8 @@ var VVPlot = (function(exports, vue) {
18574
18984
  },
18575
18985
  setup(__props) {
18576
18986
  const guide = {
18577
- legendkey: _sfc_main$u,
18578
- gradientbar: _sfc_main$v
18987
+ legendkey: _sfc_main$x,
18988
+ gradientbar: _sfc_main$y
18579
18989
  };
18580
18990
  const title = vue.computed(() => {
18581
18991
  return __props.scales.reduce((v, [s]) => v ?? s.title, null) ?? __props.scales.reduce((v, [s]) => v ?? s._title, null);
@@ -18619,7 +19029,7 @@ var VVPlot = (function(exports, vue) {
18619
19029
  };
18620
19030
  }
18621
19031
  });
18622
- const _sfc_main$s = {
19032
+ const _sfc_main$v = {
18623
19033
  __name: "CoreLegend",
18624
19034
  props: {
18625
19035
  theme: { type: Object, default: () => ({}) },
@@ -18653,7 +19063,7 @@ var VVPlot = (function(exports, vue) {
18653
19063
  style: vue.normalizeStyle({ gap: __props.theme.spacing + "px" })
18654
19064
  }, [
18655
19065
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(guides.value, ([[key, type], scales]) => {
18656
- return vue.openBlock(), vue.createBlock(_sfc_main$t, {
19066
+ return vue.openBlock(), vue.createBlock(_sfc_main$w, {
18657
19067
  key,
18658
19068
  type,
18659
19069
  scales
@@ -18671,7 +19081,7 @@ var VVPlot = (function(exports, vue) {
18671
19081
  const _hoisted_6 = ["transform"];
18672
19082
  const _hoisted_7 = ["clip-path"];
18673
19083
  const _hoisted_8 = { key: 1 };
18674
- const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
19084
+ const _sfc_main$u = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
18675
19085
  __name: "CorePlot",
18676
19086
  props: /* @__PURE__ */ vue.mergeModels({
18677
19087
  schema: Object,
@@ -19284,37 +19694,39 @@ var VVPlot = (function(exports, vue) {
19284
19694
  etc
19285
19695
  }));
19286
19696
  });
19697
+ function grid_theme_normalize(theme2) {
19698
+ let {
19699
+ grid_color,
19700
+ grid_color_major = grid_color,
19701
+ grid_color_minor = grid_color,
19702
+ grid_width,
19703
+ grid_width_major = grid_width,
19704
+ grid_width_minor = grid_width,
19705
+ ...result
19706
+ } = theme2;
19707
+ if (grid_color_major) result.grid_color_major = grid_color_major;
19708
+ if (grid_color_minor) result.grid_color_minor = grid_color_minor;
19709
+ if (grid_width_major) result.grid_width_major = grid_width_major;
19710
+ if (grid_width_minor) result.grid_width_minor = grid_width_minor;
19711
+ return result;
19712
+ }
19287
19713
  const vaxes = vue.computed(() => gaxes.value.map(({ coord, axis, etc }) => {
19288
- let { majorBreaks, minorBreaks, ticks: ticks2 } = axis.getBindings({
19289
- range: axisRange[coord],
19290
- expandMult: __props.expandMult[coord]
19291
- });
19292
- let { showGrid, orientation, ...bind } = etc;
19293
- return {
19294
- majorBreaks,
19295
- minorBreaks,
19296
- ticks: ticks2,
19297
- showGrid,
19298
- coord,
19299
- orientation,
19300
- bind
19301
- };
19714
+ let { showGrid, breakSlot, orientation, ...bind } = etc;
19715
+ let gtheme = grid_theme_normalize(__props.theme.axis[orientation] ?? {}), atheme = grid_theme_normalize(bind.theme);
19716
+ let breaks = axis.getBreaks({ range: axisRange[coord], expandMult: __props.expandMult[coord], breakSlot });
19717
+ for (let b of breaks)
19718
+ b.theme = Object.assign({}, gtheme, atheme, grid_theme_normalize(b.theme ?? {}));
19719
+ return { breaks, showGrid, coord, orientation, bind };
19302
19720
  }));
19303
19721
  const gridBreaks = vue.computed(() => {
19304
19722
  let hAxes = vaxes.value.filter((a) => a.showGrid && a.orientation == "v"), vAxes = vaxes.value.filter((a) => a.showGrid && a.orientation == "h");
19305
19723
  return {
19306
- h: {
19307
- majorBreaks: unique(hAxes.flatMap((a) => a.majorBreaks), (x2) => x2.position),
19308
- minorBreaks: unique(hAxes.flatMap((a) => a.minorBreaks), (x2) => x2.position)
19309
- },
19310
- v: {
19311
- majorBreaks: unique(vAxes.flatMap((a) => a.majorBreaks), (x2) => x2.position),
19312
- minorBreaks: unique(vAxes.flatMap((a) => a.minorBreaks), (x2) => x2.position)
19313
- }
19724
+ h: unique(hAxes.flatMap((a) => a.breaks), (x2) => x2.value, (a, b) => [a, b].find((x2) => x2.type == "major") ?? a),
19725
+ v: unique(vAxes.flatMap((a) => a.breaks), (x2) => x2.value, (a, b) => [a, b].find((x2) => x2.type == "major") ?? a)
19314
19726
  };
19315
19727
  });
19316
19728
  const axes = vue.computed(() => {
19317
- return vaxes.value.map(({ orientation, coord, bind, ticks: ticks2 }) => {
19729
+ return vaxes.value.map(({ orientation, coord, bind, breaks }) => {
19318
19730
  let {
19319
19731
  onMove: move = (...args) => emit("move", ...args),
19320
19732
  onZoom: zoom = (...args) => emit("zoom", ...args),
@@ -19327,7 +19739,7 @@ var VVPlot = (function(exports, vue) {
19327
19739
  bind: {
19328
19740
  coord,
19329
19741
  orientation,
19330
- ticks: ticks2,
19742
+ ticks: breaks.filter((x2) => x2.type == "major"),
19331
19743
  layout: innerRect,
19332
19744
  coord2pos,
19333
19745
  pos2coord,
@@ -19368,21 +19780,21 @@ var VVPlot = (function(exports, vue) {
19368
19780
  transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`,
19369
19781
  style: { "pointer-events": "none" }
19370
19782
  }, [
19371
- __props.theme.grid.h ? (vue.openBlock(), vue.createBlock(_sfc_main$_, vue.mergeProps({ key: 0 }, gridBreaks.value.h, {
19783
+ vue.createVNode(_sfc_main$11, {
19784
+ breaks: gridBreaks.value.h,
19372
19785
  layout: vue.unref(innerRect),
19373
- theme: __props.theme.grid.h,
19374
19786
  activeTransform: activeTransform.value,
19375
19787
  coord2pos,
19376
19788
  transition: transition.value
19377
- }), null, 16, ["layout", "theme", "activeTransform", "transition"])) : vue.createCommentVNode("", true),
19789
+ }, null, 8, ["breaks", "layout", "activeTransform", "transition"]),
19378
19790
  _cache[2] || (_cache[2] = vue.createTextVNode()),
19379
- __props.theme.grid.v ? (vue.openBlock(), vue.createBlock(_sfc_main$Z, vue.mergeProps({ key: 1 }, gridBreaks.value.v, {
19791
+ vue.createVNode(_sfc_main$10, {
19792
+ breaks: gridBreaks.value.v,
19380
19793
  layout: vue.unref(innerRect),
19381
- theme: __props.theme.grid.v,
19382
19794
  activeTransform: activeTransform.value,
19383
19795
  coord2pos,
19384
19796
  transition: transition.value
19385
- }), null, 16, ["layout", "theme", "activeTransform", "transition"])) : vue.createCommentVNode("", true)
19797
+ }, null, 8, ["breaks", "layout", "activeTransform", "transition"])
19386
19798
  ], 8, _hoisted_4),
19387
19799
  _cache[8] || (_cache[8] = vue.createTextVNode()),
19388
19800
  vue.createElementVNode("g", {
@@ -19393,7 +19805,7 @@ var VVPlot = (function(exports, vue) {
19393
19805
  style: { transition: transition.value }
19394
19806
  }), [
19395
19807
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vplot.value.layers, (layer) => {
19396
- return vue.openBlock(), vue.createBlock(_sfc_main$x, vue.mergeProps({
19808
+ return vue.openBlock(), vue.createBlock(_sfc_main$A, vue.mergeProps({
19397
19809
  ref_for: true,
19398
19810
  ref_key: "layers",
19399
19811
  ref: layers,
@@ -19410,7 +19822,7 @@ var VVPlot = (function(exports, vue) {
19410
19822
  ], 16),
19411
19823
  _cache[3] || (_cache[3] = vue.createTextVNode()),
19412
19824
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.selections, (sel) => {
19413
- return vue.openBlock(), vue.createBlock(_sfc_main$w, vue.mergeProps({
19825
+ return vue.openBlock(), vue.createBlock(_sfc_main$z, vue.mergeProps({
19414
19826
  coord2pos,
19415
19827
  pos2coord,
19416
19828
  layout: vue.unref(innerRect),
@@ -19421,7 +19833,7 @@ var VVPlot = (function(exports, vue) {
19421
19833
  }, { ref_for: true }, sel, { flip: __props.flip }), null, 16, ["layout", "transition", "activeTransform", "flip"]);
19422
19834
  }), 256)),
19423
19835
  _cache[4] || (_cache[4] = vue.createTextVNode()),
19424
- vue.createVNode(_sfc_main$w, {
19836
+ vue.createVNode(_sfc_main$z, {
19425
19837
  coord2pos,
19426
19838
  pos2coord,
19427
19839
  layout: vue.unref(innerRect),
@@ -19437,7 +19849,7 @@ var VVPlot = (function(exports, vue) {
19437
19849
  transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`
19438
19850
  }, [
19439
19851
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position !== "number"), (axis) => {
19440
- return vue.openBlock(), vue.createBlock(_sfc_main$$, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19852
+ return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19441
19853
  transition: transition.value,
19442
19854
  "onUpdate:transition": _cache[0] || (_cache[0] = ($event) => transition.value = $event),
19443
19855
  activeTransform: activeTransform.value
@@ -19448,7 +19860,7 @@ var VVPlot = (function(exports, vue) {
19448
19860
  "clip-path": props.clip ? `url(#${vue.unref(vid)}-plot-clip)` : null
19449
19861
  }, [
19450
19862
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position === "number"), (axis) => {
19451
- return vue.openBlock(), vue.createBlock(_sfc_main$$, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19863
+ return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
19452
19864
  transition: transition.value,
19453
19865
  "onUpdate:transition": _cache[1] || (_cache[1] = ($event) => transition.value = $event),
19454
19866
  activeTransform: activeTransform.value
@@ -19457,12 +19869,14 @@ var VVPlot = (function(exports, vue) {
19457
19869
  ], 8, _hoisted_7)
19458
19870
  ], 8, _hoisted_6),
19459
19871
  _cache[10] || (_cache[10] = vue.createTextVNode()),
19872
+ vue.renderSlot(_ctx.$slots, "default"),
19873
+ _cache[11] || (_cache[11] = vue.createTextVNode()),
19460
19874
  props.legendTeleport ? (vue.openBlock(), vue.createElementBlock("foreignObject", _hoisted_8, [
19461
19875
  (vue.openBlock(), vue.createBlock(vue.Teleport, {
19462
19876
  defer: "",
19463
19877
  to: props.legendTeleport
19464
19878
  }, [
19465
- vue.createVNode(_sfc_main$s, {
19879
+ vue.createVNode(_sfc_main$v, {
19466
19880
  scales: vplot.value?.scales,
19467
19881
  theme: __props.theme.legend
19468
19882
  }, null, 8, ["scales", "theme"])
@@ -19472,59 +19886,67 @@ var VVPlot = (function(exports, vue) {
19472
19886
  };
19473
19887
  }
19474
19888
  });
19475
- const _sfc_main$q = {
19889
+ const _sfc_main$t = {
19476
19890
  $_type: "action",
19477
19891
  $_props: {}
19478
19892
  };
19479
- const _sfc_main$p = {
19893
+ const _sfc_main$s = {
19480
19894
  $_type: "layer"
19481
19895
  };
19482
- const _sfc_main$o = {
19896
+ const _sfc_main$r = {
19483
19897
  $_props: {
19484
19898
  geom: "tile",
19485
19899
  stat: "bar"
19486
19900
  },
19487
- $_type: "layer"
19901
+ $_type: "layer",
19902
+ $_argnames: ["width", "height", "position"]
19488
19903
  };
19489
- const _sfc_main$n = {
19904
+ const _sfc_main$q = {
19490
19905
  $_props: {
19491
19906
  geom: "blank",
19492
19907
  stat: "identity"
19493
19908
  },
19494
19909
  $_type: "layer"
19495
19910
  };
19496
- const _sfc_main$m = {
19911
+ const _sfc_main$p = {
19497
19912
  $_props: {
19498
19913
  geom: "boxplot",
19499
19914
  stat: "boxplot"
19500
19915
  },
19501
- $_type: "layer"
19916
+ $_type: "layer",
19917
+ $_argnames: ["width", "height", "position"]
19502
19918
  };
19503
- const _sfc_main$l = {
19919
+ const _sfc_main$o = {
19504
19920
  $_props: {
19505
19921
  geom: "curve",
19506
- stat: "curve"
19922
+ stat: "curve",
19923
+ fill: "none",
19924
+ color: "black"
19507
19925
  },
19508
19926
  $_type: "layer",
19509
19927
  $_attrnames: ["interpolate"]
19510
19928
  };
19511
- const _sfc_main$k = {
19929
+ const _sfc_main$n = {
19512
19930
  $_props: {
19513
19931
  geom: "curve",
19514
- stat: "density"
19932
+ stat: "density",
19933
+ fill: "none",
19934
+ color: "black"
19515
19935
  },
19516
19936
  $_type: "layer",
19517
- $_argnames: ["n", "kernel"]
19937
+ $_argnames: ["n", "kernel", "scale"]
19518
19938
  };
19519
- const _sfc_main$j = {
19939
+ const _sfc_main$m = {
19520
19940
  $_props: {
19521
19941
  geom: "ellipse",
19522
- stat: "ellipse"
19942
+ stat: "ellipse",
19943
+ fill: "none",
19944
+ color: "black"
19523
19945
  },
19524
19946
  $_type: "layer",
19525
19947
  $_argnames: ["CI"]
19526
19948
  };
19527
- const _sfc_main$i = {
19949
+ const _sfc_main$l = {
19528
19950
  $_props: {
19529
19951
  geom: "rect",
19530
19952
  stat: "histogram"
@@ -19532,7 +19954,7 @@ var VVPlot = (function(exports, vue) {
19532
19954
  $_type: "layer",
19533
19955
  $_argnames: ["bins", "binwidth", "breaks"]
19534
19956
  };
19535
- const _sfc_main$h = {
19957
+ const _sfc_main$k = {
19536
19958
  $_props: {
19537
19959
  geom: "line",
19538
19960
  stat: "line"
@@ -19540,131 +19962,155 @@ var VVPlot = (function(exports, vue) {
19540
19962
  $_type: "layer",
19541
19963
  $_argnames: ["orientation"]
19542
19964
  };
19543
- const _sfc_main$g = {
19965
+ const _sfc_main$j = {
19544
19966
  $_props: {
19545
19967
  geom: "line",
19546
19968
  stat: "linerange"
19547
19969
  },
19548
19970
  $_type: "layer"
19549
19971
  };
19550
- const _sfc_main$f = {
19972
+ const _sfc_main$i = {
19551
19973
  $_props: {
19552
19974
  geom: "markdown",
19553
19975
  stat: "text"
19554
19976
  },
19555
19977
  $_type: "layer"
19556
19978
  };
19557
- const _sfc_main$e = {
19979
+ const _sfc_main$h = {
19558
19980
  $_props: {
19559
19981
  geom: "markdownsegment",
19560
19982
  stat: "textsegment"
19561
19983
  },
19562
19984
  $_type: "layer"
19563
19985
  };
19564
- const _sfc_main$d = {
19986
+ const _sfc_main$g = {
19565
19987
  $_props: {
19566
19988
  geom: "line",
19567
19989
  stat: "path"
19568
19990
  },
19569
19991
  $_type: "layer"
19570
19992
  };
19571
- const _sfc_main$c = {
19993
+ const _sfc_main$f = {
19572
19994
  $_props: {
19573
19995
  geom: "point",
19574
19996
  stat: "point"
19575
19997
  },
19576
19998
  $_type: "layer"
19577
19999
  };
19578
- const _sfc_main$b = {
20000
+ const _sfc_main$e = {
19579
20001
  $_props: {
19580
20002
  geom: "polygon",
19581
20003
  stat: "polygon"
19582
20004
  },
19583
20005
  $_type: "layer"
19584
20006
  };
19585
- const _sfc_main$a = {
20007
+ const _sfc_main$d = {
19586
20008
  $_props: {
19587
20009
  geom: "rect",
19588
20010
  stat: "rect"
19589
20011
  },
19590
20012
  $_type: "layer"
19591
20013
  };
19592
- const _sfc_main$9 = {
20014
+ const _sfc_main$c = {
19593
20015
  $_props: {
19594
20016
  geom: "line",
19595
20017
  stat: "segment"
19596
20018
  },
19597
20019
  $_type: "layer"
19598
20020
  };
19599
- const _sfc_main$8 = {
20021
+ const _sfc_main$b = {
20022
+ $_props: {
20023
+ geom: "shape",
20024
+ stat: "shape",
20025
+ interpolate: "catmullRomClosed"
20026
+ },
20027
+ $_type: "layer",
20028
+ $_attrnames: ["interpolate"]
20029
+ };
20030
+ const _sfc_main$a = {
19600
20031
  $_props: {
19601
20032
  geom: "stick",
19602
20033
  stat: "stick"
19603
20034
  },
19604
20035
  $_type: "layer"
19605
20036
  };
19606
- const _sfc_main$7 = {
20037
+ const _sfc_main$9 = {
19607
20038
  $_props: {
19608
20039
  geom: "text",
19609
20040
  stat: "text"
19610
20041
  },
19611
20042
  $_type: "layer"
19612
20043
  };
19613
- const _sfc_main$6 = {
20044
+ const _sfc_main$8 = {
19614
20045
  $_props: {
19615
20046
  geom: "textsegment",
19616
20047
  stat: "textsegment"
19617
20048
  },
19618
20049
  $_type: "layer"
19619
20050
  };
19620
- const _sfc_main$5 = {
20051
+ const _sfc_main$7 = {
19621
20052
  $_props: {
19622
20053
  geom: "tile",
19623
20054
  stat: "tile"
19624
20055
  },
19625
20056
  $_type: "layer"
19626
20057
  };
20058
+ const _sfc_main$6 = {
20059
+ $_props: {
20060
+ geom: "shape",
20061
+ stat: "violin"
20062
+ },
20063
+ $_type: "layer",
20064
+ $_argnames: ["n", "kernel", "scale", "width", "height", "position"]
20065
+ };
19627
20066
  const geom_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
19628
20067
  __proto__: null,
19629
- VVGeom: _sfc_main$p,
19630
- VVGeomBar: _sfc_main$o,
19631
- VVGeomBlank: _sfc_main$n,
19632
- VVGeomBoxplot: _sfc_main$m,
19633
- VVGeomCurve: _sfc_main$l,
19634
- VVGeomDensity: _sfc_main$k,
19635
- VVGeomEllipse: _sfc_main$j,
19636
- VVGeomHistogram: _sfc_main$i,
19637
- VVGeomLine: _sfc_main$h,
19638
- VVGeomLinerange: _sfc_main$g,
19639
- VVGeomMarkdown: _sfc_main$f,
19640
- VVGeomMarkdownsegment: _sfc_main$e,
19641
- VVGeomPath: _sfc_main$d,
19642
- VVGeomPoint: _sfc_main$c,
19643
- VVGeomPolygon: _sfc_main$b,
19644
- VVGeomRect: _sfc_main$a,
19645
- VVGeomSegment: _sfc_main$9,
19646
- VVGeomStick: _sfc_main$8,
19647
- VVGeomText: _sfc_main$7,
19648
- VVGeomTextsegment: _sfc_main$6,
19649
- VVGeomTile: _sfc_main$5
20068
+ VVGeom: _sfc_main$s,
20069
+ VVGeomBar: _sfc_main$r,
20070
+ VVGeomBlank: _sfc_main$q,
20071
+ VVGeomBoxplot: _sfc_main$p,
20072
+ VVGeomCurve: _sfc_main$o,
20073
+ VVGeomDensity: _sfc_main$n,
20074
+ VVGeomEllipse: _sfc_main$m,
20075
+ VVGeomHistogram: _sfc_main$l,
20076
+ VVGeomLine: _sfc_main$k,
20077
+ VVGeomLinerange: _sfc_main$j,
20078
+ VVGeomMarkdown: _sfc_main$i,
20079
+ VVGeomMarkdownsegment: _sfc_main$h,
20080
+ VVGeomPath: _sfc_main$g,
20081
+ VVGeomPoint: _sfc_main$f,
20082
+ VVGeomPolygon: _sfc_main$e,
20083
+ VVGeomRect: _sfc_main$d,
20084
+ VVGeomSegment: _sfc_main$c,
20085
+ VVGeomShape: _sfc_main$b,
20086
+ VVGeomStick: _sfc_main$a,
20087
+ VVGeomText: _sfc_main$9,
20088
+ VVGeomTextsegment: _sfc_main$8,
20089
+ VVGeomTile: _sfc_main$7,
20090
+ VVGeomViolin: _sfc_main$6
19650
20091
  }, Symbol.toStringTag, { value: "Module" }));
19651
- const _sfc_main$4 = {
20092
+ const _sfc_main$5 = {
19652
20093
  $_type: "axis",
19653
20094
  $_props: {}
19654
20095
  };
19655
- const _sfc_main$3 = {
20096
+ const _sfc_main$4 = {
19656
20097
  $_type: "axis",
19657
20098
  $_props: { coord: "x" }
19658
20099
  };
19659
- const _sfc_main$2 = {
20100
+ const _sfc_main$3 = {
19660
20101
  $_type: "axis",
19661
20102
  $_props: { coord: "y" }
19662
20103
  };
20104
+ const _sfc_main$2 = {
20105
+ $_type: "axis-break",
20106
+ $_props: { type: "major" }
20107
+ };
19663
20108
  const axis_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
19664
20109
  __proto__: null,
19665
- VVAxis: _sfc_main$4,
19666
- VVAxisX: _sfc_main$3,
19667
- VVAxisY: _sfc_main$2
20110
+ VVAxis: _sfc_main$5,
20111
+ VVAxisBreak: _sfc_main$2,
20112
+ VVAxisX: _sfc_main$4,
20113
+ VVAxisY: _sfc_main$3
19668
20114
  }, Symbol.toStringTag, { value: "Module" }));
19669
20115
  const _hoisted_1 = {
19670
20116
  key: 0,
@@ -19711,8 +20157,8 @@ var VVPlot = (function(exports, vue) {
19711
20157
  const components = {
19712
20158
  ...geom_components,
19713
20159
  ...axis_components,
19714
- VVAction: _sfc_main$q,
19715
- VVSelection: _sfc_main$q
20160
+ VVAction: _sfc_main$t,
20161
+ VVSelection: _sfc_main$t
19716
20162
  };
19717
20163
  const opponents = {
19718
20164
  x: "y",
@@ -19732,20 +20178,6 @@ var VVPlot = (function(exports, vue) {
19732
20178
  const selectionPreview = vue.useModel(__props, "selectionPreview");
19733
20179
  const selectionPreviewTheme = vue.useModel(__props, "selectionPreviewTheme");
19734
20180
  const transition = vue.useModel(__props, "transition");
19735
- function expandFragment(componentList) {
19736
- if (componentList == null) return [];
19737
- return componentList.flatMap((layer) => {
19738
- if (layer.type == vue.Fragment) {
19739
- return expandFragment(layer.children);
19740
- } else if (layer.type == "template") {
19741
- return expandFragment(layer.children).map((c) => {
19742
- c.props = { ...c.props, ...layer.props };
19743
- return c;
19744
- });
19745
- }
19746
- return layer;
19747
- });
19748
- }
19749
20181
  function resolveComponent(ast2) {
19750
20182
  let result = {
19751
20183
  props: Object.fromEntries(ast2.props.map((p) => {
@@ -19793,6 +20225,8 @@ var VVPlot = (function(exports, vue) {
19793
20225
  const vaction = vue.computed(() => Object.values(vnodes.action).flat());
19794
20226
  const vselection = vue.computed(() => Object.values(vnodes.selection).flat());
19795
20227
  const vdom = vue.computed(() => Object.keys(vnodes.dom).flatMap((k) => k == "panel" ? [] : vnodes.dom[k]));
20228
+ const vdom_svg = vue.computed(() => vdom.value.filter((v) => isSVGTag(v.type)));
20229
+ const vdom_etc = vue.computed(() => vdom.value.filter((v) => !isSVGTag(v.type)));
19796
20230
  const vBind = vue.computed(() => {
19797
20231
  let plot = {};
19798
20232
  let wrapper = {};
@@ -20013,7 +20447,7 @@ var VVPlot = (function(exports, vue) {
20013
20447
  const buttonsMap = { left: 1, right: 2, middle: 4, X1: 8, X2: 16 };
20014
20448
  const axes = vue.computed(() => {
20015
20449
  let ori = __props.flip ? { x: "v", y: "h" } : { x: "h", y: "v" };
20016
- let allAxes = vaxis.value.map((c) => ({ ...c.type.$_props, ...c.props, $_children: c.children })).concat(__props.axes ?? []);
20450
+ let allAxes = vaxis.value.map((c) => ({ ...c.type.$_props, ...c.props, $_children: c.children ?? {} })).concat(__props.axes ?? []);
20017
20451
  if (allAxes.every((ax) => ax?.coord != "x")) allAxes.push({ coord: "x" });
20018
20452
  if (allAxes.every((ax) => ax?.coord != "y")) allAxes.push({ coord: "y" });
20019
20453
  return allAxes.map(({
@@ -20040,7 +20474,7 @@ var VVPlot = (function(exports, vue) {
20040
20474
  max,
20041
20475
  "onUpdate:min": oum,
20042
20476
  "onUpdate:max": ouM,
20043
- $_children,
20477
+ $_children = {},
20044
20478
  ...etc
20045
20479
  }) => {
20046
20480
  let orientation = ori[coord];
@@ -20052,7 +20486,8 @@ var VVPlot = (function(exports, vue) {
20052
20486
  position = { h: "top", v: "right" }[orientation];
20053
20487
  if (reverse[opponents[coord]]) position = opponents[position];
20054
20488
  }
20055
- let action2 = Object.values($_children ?? {}).filter((s) => typeof s == "function").flatMap((s) => expandFragment(s())).map((c) => ({ ...c.type.$_props, ...c.props })).concat($$action ?? []).flatMap((props) => {
20489
+ let breakSlot = $_children.breaks;
20490
+ let action2 = Object.keys($_children).filter((k) => typeof $_children[k] == "function" && k != "breaks").flatMap((k) => expandFragment($_children[k]())).map((c) => ({ ...c.type.$_props, ...c.props })).concat($$action ?? []).flatMap((props) => {
20056
20491
  let res = [];
20057
20492
  for (let a of ["move", "nudge", "zoom", "rescale"]) {
20058
20493
  let act = props[a];
@@ -20082,6 +20517,7 @@ var VVPlot = (function(exports, vue) {
20082
20517
  labels,
20083
20518
  titles,
20084
20519
  minorBreaks,
20520
+ breakSlot,
20085
20521
  showGrid: _isPropTruthy(showGrid) ?? position !== "none",
20086
20522
  extend: extend2 ?? primaryAxisConfig.extend[coord],
20087
20523
  theme: Object.assign({}, ...[theme2.value?.axis?.[position] ?? theme2.value?.axis?.[orientation]].concat($$theme)),
@@ -20239,7 +20675,7 @@ var VVPlot = (function(exports, vue) {
20239
20675
  class: "vvplot",
20240
20676
  style: wrapperStyle.value
20241
20677
  }, vBind.value.wrapper), [
20242
- vue.createVNode(_sfc_main$r, vue.mergeProps({
20678
+ vue.createVNode(_sfc_main$u, vue.mergeProps({
20243
20679
  ref: "plot",
20244
20680
  paddings,
20245
20681
  schema: schema.value,
@@ -20268,7 +20704,14 @@ var VVPlot = (function(exports, vue) {
20268
20704
  dpi: __props.dpi ?? 96 * vue.unref(pixelRatio),
20269
20705
  legendTeleport: __props.legendTeleport,
20270
20706
  onSelect: _cache[3] || (_cache[3] = (d, e) => emit("select", d, e))
20271
- }), null, 16, ["paddings", "schema", "layers", "min-range", "expand-add", "expand-mult", "reverse", "flip", "coord-levels", "levels", "scales", "axes", "theme", "selections", "transition", "selection-preview", "selection-preview-theme", "action", "clip", "render", "dpi", "legendTeleport"]),
20707
+ }), {
20708
+ default: vue.withCtx(() => [
20709
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vdom_svg.value, (c) => {
20710
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(c));
20711
+ }), 256))
20712
+ ]),
20713
+ _: 1
20714
+ }, 16, ["paddings", "schema", "layers", "min-range", "expand-add", "expand-mult", "reverse", "flip", "coord-levels", "levels", "scales", "axes", "theme", "selections", "transition", "selection-preview", "selection-preview-theme", "action", "clip", "render", "dpi", "legendTeleport"]),
20272
20715
  _cache[4] || (_cache[4] = vue.createTextVNode()),
20273
20716
  vue.createElementVNode("div", {
20274
20717
  class: "vvplot-panel-container",
@@ -20281,7 +20724,7 @@ var VVPlot = (function(exports, vue) {
20281
20724
  ])) : vue.createCommentVNode("", true)
20282
20725
  ], 4),
20283
20726
  _cache[5] || (_cache[5] = vue.createTextVNode()),
20284
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vdom.value, (c) => {
20727
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vdom_etc.value, (c) => {
20285
20728
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(c));
20286
20729
  }), 256))
20287
20730
  ], 16);
@@ -20294,67 +20737,75 @@ var VVPlot = (function(exports, vue) {
20294
20737
  };
20295
20738
  const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20296
20739
  __proto__: null,
20297
- VVAction: _sfc_main$q,
20298
- VVAxis: _sfc_main$4,
20299
- VVAxisX: _sfc_main$3,
20300
- VVAxisY: _sfc_main$2,
20301
- VVGeom: _sfc_main$p,
20302
- VVGeomBar: _sfc_main$o,
20303
- VVGeomBlank: _sfc_main$n,
20304
- VVGeomBoxplot: _sfc_main$m,
20305
- VVGeomCurve: _sfc_main$l,
20306
- VVGeomDensity: _sfc_main$k,
20307
- VVGeomEllipse: _sfc_main$j,
20308
- VVGeomHistogram: _sfc_main$i,
20309
- VVGeomLine: _sfc_main$h,
20310
- VVGeomLinerange: _sfc_main$g,
20311
- VVGeomMarkdown: _sfc_main$f,
20312
- VVGeomMarkdownsegment: _sfc_main$e,
20313
- VVGeomPath: _sfc_main$d,
20314
- VVGeomPoint: _sfc_main$c,
20315
- VVGeomPolygon: _sfc_main$b,
20316
- VVGeomRect: _sfc_main$a,
20317
- VVGeomSegment: _sfc_main$9,
20318
- VVGeomStick: _sfc_main$8,
20319
- VVGeomText: _sfc_main$7,
20320
- VVGeomTextsegment: _sfc_main$6,
20321
- VVGeomTile: _sfc_main$5,
20740
+ VVAction: _sfc_main$t,
20741
+ VVAxis: _sfc_main$5,
20742
+ VVAxisBreak: _sfc_main$2,
20743
+ VVAxisX: _sfc_main$4,
20744
+ VVAxisY: _sfc_main$3,
20745
+ VVGeom: _sfc_main$s,
20746
+ VVGeomBar: _sfc_main$r,
20747
+ VVGeomBlank: _sfc_main$q,
20748
+ VVGeomBoxplot: _sfc_main$p,
20749
+ VVGeomCurve: _sfc_main$o,
20750
+ VVGeomDensity: _sfc_main$n,
20751
+ VVGeomEllipse: _sfc_main$m,
20752
+ VVGeomHistogram: _sfc_main$l,
20753
+ VVGeomLine: _sfc_main$k,
20754
+ VVGeomLinerange: _sfc_main$j,
20755
+ VVGeomMarkdown: _sfc_main$i,
20756
+ VVGeomMarkdownsegment: _sfc_main$h,
20757
+ VVGeomPath: _sfc_main$g,
20758
+ VVGeomPoint: _sfc_main$f,
20759
+ VVGeomPolygon: _sfc_main$e,
20760
+ VVGeomRect: _sfc_main$d,
20761
+ VVGeomSegment: _sfc_main$c,
20762
+ VVGeomShape: _sfc_main$b,
20763
+ VVGeomStick: _sfc_main$a,
20764
+ VVGeomText: _sfc_main$9,
20765
+ VVGeomTextsegment: _sfc_main$8,
20766
+ VVGeomTile: _sfc_main$7,
20767
+ VVGeomViolin: _sfc_main$6,
20322
20768
  VVPlot: _sfc_main$1,
20323
20769
  VVSelection: _sfc_main
20324
20770
  }, Symbol.toStringTag, { value: "Module" }));
20325
- exports.VVAction = _sfc_main$q;
20326
- exports.VVAxis = _sfc_main$4;
20327
- exports.VVAxisX = _sfc_main$3;
20328
- exports.VVAxisY = _sfc_main$2;
20329
- exports.VVGeom = _sfc_main$p;
20330
- exports.VVGeomBar = _sfc_main$o;
20331
- exports.VVGeomBlank = _sfc_main$n;
20332
- exports.VVGeomBoxplot = _sfc_main$m;
20333
- exports.VVGeomCurve = _sfc_main$l;
20334
- exports.VVGeomDensity = _sfc_main$k;
20335
- exports.VVGeomEllipse = _sfc_main$j;
20336
- exports.VVGeomHistogram = _sfc_main$i;
20337
- exports.VVGeomLine = _sfc_main$h;
20338
- exports.VVGeomLinerange = _sfc_main$g;
20339
- exports.VVGeomMarkdown = _sfc_main$f;
20340
- exports.VVGeomMarkdownsegment = _sfc_main$e;
20341
- exports.VVGeomPath = _sfc_main$d;
20342
- exports.VVGeomPoint = _sfc_main$c;
20343
- exports.VVGeomPolygon = _sfc_main$b;
20344
- exports.VVGeomRect = _sfc_main$a;
20345
- exports.VVGeomSegment = _sfc_main$9;
20346
- exports.VVGeomStick = _sfc_main$8;
20347
- exports.VVGeomText = _sfc_main$7;
20348
- exports.VVGeomTextsegment = _sfc_main$6;
20349
- exports.VVGeomTile = _sfc_main$5;
20771
+ exports.VVAction = _sfc_main$t;
20772
+ exports.VVAxis = _sfc_main$5;
20773
+ exports.VVAxisBreak = _sfc_main$2;
20774
+ exports.VVAxisX = _sfc_main$4;
20775
+ 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;
20780
+ exports.VVGeomCurve = _sfc_main$o;
20781
+ exports.VVGeomDensity = _sfc_main$n;
20782
+ exports.VVGeomEllipse = _sfc_main$m;
20783
+ exports.VVGeomHistogram = _sfc_main$l;
20784
+ exports.VVGeomLine = _sfc_main$k;
20785
+ exports.VVGeomLinerange = _sfc_main$j;
20786
+ exports.VVGeomMarkdown = _sfc_main$i;
20787
+ exports.VVGeomMarkdownsegment = _sfc_main$h;
20788
+ exports.VVGeomPath = _sfc_main$g;
20789
+ exports.VVGeomPoint = _sfc_main$f;
20790
+ exports.VVGeomPolygon = _sfc_main$e;
20791
+ exports.VVGeomRect = _sfc_main$d;
20792
+ exports.VVGeomSegment = _sfc_main$c;
20793
+ exports.VVGeomShape = _sfc_main$b;
20794
+ exports.VVGeomStick = _sfc_main$a;
20795
+ exports.VVGeomText = _sfc_main$9;
20796
+ exports.VVGeomTextsegment = _sfc_main$8;
20797
+ exports.VVGeomTile = _sfc_main$7;
20798
+ exports.VVGeomViolin = _sfc_main$6;
20350
20799
  exports.VVPlot = _sfc_main$1;
20351
20800
  exports.VVSelection = _sfc_main;
20352
20801
  exports.components = index;
20353
20802
  exports.number_cut = number_cut;
20354
20803
  exports.oob = oob;
20355
20804
  exports.vvbreak = vvbreak;
20805
+ exports.vvgeom = vvgeom;
20356
20806
  exports.vvlabel = vvlabel;
20357
20807
  exports.vvscale = vvscale;
20808
+ exports.vvstat = vvstat;
20358
20809
  exports.vvtheme = theme;
20359
20810
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
20360
20811
  return exports;