vvplot 0.4.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vvplot.esm.js +699 -657
- package/dist/vvplot.esm.min.js +18 -18
- package/dist/vvplot.global.js +698 -656
- package/dist/vvplot.global.min.js +18 -18
- package/package.json +1 -1
package/dist/vvplot.global.js
CHANGED
|
@@ -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) {
|
|
@@ -1819,7 +1841,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
1819
1841
|
AsisNumber.#cache.set(n, this);
|
|
1820
1842
|
}
|
|
1821
1843
|
}
|
|
1822
|
-
class Asis
|
|
1844
|
+
class Asis {
|
|
1823
1845
|
static #cache = /* @__PURE__ */ new Map();
|
|
1824
1846
|
constructor(value) {
|
|
1825
1847
|
if (typeof value === "string" || value instanceof String) {
|
|
@@ -1863,7 +1885,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
1863
1885
|
static from(x2) {
|
|
1864
1886
|
if (x2 instanceof this) return x2;
|
|
1865
1887
|
if (x2[Symbol.iterator]) {
|
|
1866
|
-
let lvl = unique(Array.from(x2).filter((x3) => !(x3 instanceof Asis)).map((x3) => String(x3))).sort((a, b) => compare(a, b, { numeric: true }));
|
|
1888
|
+
let lvl = unique(Array.from(x2).filter((x3) => !(x3 instanceof Asis) && x3 != null).map((x3) => String(x3))).sort((a, b) => compare(a, b, { numeric: true }));
|
|
1867
1889
|
return new this(...lvl);
|
|
1868
1890
|
} else if (typeof x2 === "object") {
|
|
1869
1891
|
let lvl = Object.keys(x2).map((x3) => String(x3)).sort((a, b) => compare(x2[a], x2[b]));
|
|
@@ -1917,6 +1939,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
1917
1939
|
function is_continuous(x2) {
|
|
1918
1940
|
return typeof x2 === "number" || x2 instanceof Number || x2 instanceof Date;
|
|
1919
1941
|
}
|
|
1942
|
+
function is_categorical(v) {
|
|
1943
|
+
return typeof v === "string" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "object" && v !== null && typeof v.valueOf() !== "number" && typeof v.valueOf() !== "bigint";
|
|
1944
|
+
}
|
|
1920
1945
|
function plus$1(a, b = 0) {
|
|
1921
1946
|
if (b == 0 || a == null) return a;
|
|
1922
1947
|
if (a instanceof Date) return new a.constructor(+a + b);
|
|
@@ -1978,7 +2003,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
1978
2003
|
let length = values[0].length;
|
|
1979
2004
|
if (values.some((v) => v.length != length))
|
|
1980
2005
|
throw new Error("Arrays must have the same length");
|
|
1981
|
-
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));
|
|
1982
2007
|
},
|
|
1983
2008
|
/* vectorized opposite of numbers */
|
|
1984
2009
|
opposite(value) {
|
|
@@ -2021,8 +2046,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2021
2046
|
if (arr.length == 0) return null;
|
|
2022
2047
|
return arr.reduce((a, c) => {
|
|
2023
2048
|
for (let k in c) {
|
|
2024
|
-
if (c[k]
|
|
2025
|
-
if (c[k] != void 0) a[k] = c[k];
|
|
2049
|
+
if (c[k] !== void 0) a[k] = c[k];
|
|
2026
2050
|
}
|
|
2027
2051
|
return a;
|
|
2028
2052
|
}, {});
|
|
@@ -2032,11 +2056,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
2032
2056
|
if (args.some((x2) => x2 === null)) return null;
|
|
2033
2057
|
return args.join("");
|
|
2034
2058
|
}
|
|
2035
|
-
function unique(arr,
|
|
2059
|
+
function unique(arr, key = null, priority = null) {
|
|
2036
2060
|
let map2 = /* @__PURE__ */ new Map();
|
|
2037
2061
|
for (let i in arr) {
|
|
2038
|
-
let
|
|
2039
|
-
if (!map2.has(
|
|
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]));
|
|
2040
2065
|
}
|
|
2041
2066
|
return Array.from(map2.values());
|
|
2042
2067
|
}
|
|
@@ -2205,7 +2230,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2205
2230
|
img.setAttribute("height", foreignElement.getAttribute("height"));
|
|
2206
2231
|
foreignClone.parentNode.replaceChild(img, foreignClone);
|
|
2207
2232
|
}
|
|
2208
|
-
for (let node of svgClone.querySelectorAll(".vvplot-interactive")) node.remove();
|
|
2233
|
+
for (let node of svgClone.querySelectorAll(".vvplot-interactive,foreignObject")) node.remove();
|
|
2209
2234
|
removeComments(svgClone);
|
|
2210
2235
|
svgClone.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
2211
2236
|
svgClone.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
|
|
@@ -2223,7 +2248,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
2223
2248
|
tick_width: 1,
|
|
2224
2249
|
tick_length: 5,
|
|
2225
2250
|
label_size: 12,
|
|
2226
|
-
title_size: 18
|
|
2251
|
+
title_size: 18,
|
|
2252
|
+
grid_width: 1,
|
|
2253
|
+
grid_width_major: 2
|
|
2227
2254
|
},
|
|
2228
2255
|
axis_h: {
|
|
2229
2256
|
title_offset: 20
|
|
@@ -2248,10 +2275,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
2248
2275
|
tick_position: "bottom",
|
|
2249
2276
|
title_position: "bottom"
|
|
2250
2277
|
},
|
|
2251
|
-
grid: {
|
|
2252
|
-
line_width: 1,
|
|
2253
|
-
line_width_major: 2
|
|
2254
|
-
},
|
|
2255
2278
|
plot: {
|
|
2256
2279
|
margin: 20,
|
|
2257
2280
|
padding_h: 50,
|
|
@@ -2269,10 +2292,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
2269
2292
|
line_color: "black",
|
|
2270
2293
|
tick_color: "black",
|
|
2271
2294
|
label_color: "black",
|
|
2272
|
-
title_color: "black"
|
|
2273
|
-
|
|
2274
|
-
grid: {
|
|
2275
|
-
line_color: "#eeeeee"
|
|
2295
|
+
title_color: "black",
|
|
2296
|
+
grid_color: "#eeeeee"
|
|
2276
2297
|
}
|
|
2277
2298
|
};
|
|
2278
2299
|
const theme_light = {
|
|
@@ -2280,20 +2301,16 @@ var VVPlot = (function(exports, vue) {
|
|
|
2280
2301
|
line_color: "gray",
|
|
2281
2302
|
tick_color: "gray",
|
|
2282
2303
|
label_color: "gray",
|
|
2283
|
-
title_color: "gray"
|
|
2284
|
-
|
|
2285
|
-
grid: {
|
|
2286
|
-
line_color: "#eeeeee"
|
|
2304
|
+
title_color: "gray",
|
|
2305
|
+
grid_color: "#eeeeee"
|
|
2287
2306
|
}
|
|
2288
2307
|
};
|
|
2289
2308
|
const theme_gray = {
|
|
2290
2309
|
axis: {
|
|
2291
2310
|
tick_color: "black",
|
|
2292
2311
|
label_color: "black",
|
|
2293
|
-
title_color: "black"
|
|
2294
|
-
|
|
2295
|
-
grid: {
|
|
2296
|
-
line_color: "white"
|
|
2312
|
+
title_color: "black",
|
|
2313
|
+
grid_color: "white"
|
|
2297
2314
|
},
|
|
2298
2315
|
plot: {
|
|
2299
2316
|
background: "#eeeeee"
|
|
@@ -2303,10 +2320,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
2303
2320
|
axis: {
|
|
2304
2321
|
tick_color: "#333333",
|
|
2305
2322
|
label_color: "#555555",
|
|
2306
|
-
title_color: "black"
|
|
2307
|
-
|
|
2308
|
-
grid: {
|
|
2309
|
-
line_color: "#666666"
|
|
2323
|
+
title_color: "black",
|
|
2324
|
+
grid_color: "#666666"
|
|
2310
2325
|
},
|
|
2311
2326
|
plot: {
|
|
2312
2327
|
background: "#888888"
|
|
@@ -2317,12 +2332,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
2317
2332
|
line_color: "black",
|
|
2318
2333
|
tick_color: "black",
|
|
2319
2334
|
label_color: "black",
|
|
2320
|
-
title_color: "black"
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
line_width_major: 1,
|
|
2325
|
-
line_width_minor: 0.5
|
|
2335
|
+
title_color: "black",
|
|
2336
|
+
grid_color: "black",
|
|
2337
|
+
grid_width: 0.5,
|
|
2338
|
+
grid_width_major: 1
|
|
2326
2339
|
}
|
|
2327
2340
|
};
|
|
2328
2341
|
const theme_classic = {
|
|
@@ -2331,12 +2344,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
2331
2344
|
tick_color: "black",
|
|
2332
2345
|
label_color: "black",
|
|
2333
2346
|
title_color: "black"
|
|
2334
|
-
}
|
|
2335
|
-
grid: null
|
|
2347
|
+
}
|
|
2336
2348
|
};
|
|
2337
2349
|
const theme_void = {
|
|
2338
|
-
axis: null
|
|
2339
|
-
grid: null
|
|
2350
|
+
axis: null
|
|
2340
2351
|
};
|
|
2341
2352
|
function themeMerge(...themes) {
|
|
2342
2353
|
return themes.reduce((acc, t) => {
|
|
@@ -2356,10 +2367,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
2356
2367
|
axis_v,
|
|
2357
2368
|
axis_x,
|
|
2358
2369
|
axis_y,
|
|
2359
|
-
grid_h,
|
|
2360
|
-
grid_v,
|
|
2361
|
-
grid_x,
|
|
2362
|
-
grid_y,
|
|
2363
2370
|
plot: {
|
|
2364
2371
|
margin_x,
|
|
2365
2372
|
margin_y,
|
|
@@ -2376,8 +2383,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
2376
2383
|
if (flip) {
|
|
2377
2384
|
axis_h = obj_merge(axis_h, axis_y);
|
|
2378
2385
|
axis_v = obj_merge(axis_v, axis_x);
|
|
2379
|
-
grid_h = obj_merge(grid_h, grid_x);
|
|
2380
|
-
grid_v = obj_merge(grid_v, grid_y);
|
|
2381
2386
|
plot.margin_h = margin_y === void 0 ? margin_h : margin_y;
|
|
2382
2387
|
plot.margin_v = margin_x === void 0 ? margin_v : margin_x;
|
|
2383
2388
|
plot.padding_h = padding_y === void 0 ? padding_h : padding_y;
|
|
@@ -2385,8 +2390,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
2385
2390
|
} else {
|
|
2386
2391
|
axis_h = obj_merge(axis_h, axis_x);
|
|
2387
2392
|
axis_v = obj_merge(axis_v, axis_y);
|
|
2388
|
-
grid_h = obj_merge(grid_h, grid_y);
|
|
2389
|
-
grid_v = obj_merge(grid_v, grid_x);
|
|
2390
2393
|
plot.margin_h = margin_x === void 0 ? margin_h : margin_x;
|
|
2391
2394
|
plot.margin_v = margin_y === void 0 ? margin_v : margin_y;
|
|
2392
2395
|
plot.padding_h = padding_x === void 0 ? padding_h : padding_x;
|
|
@@ -2395,21 +2398,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
2395
2398
|
return {
|
|
2396
2399
|
axis_h,
|
|
2397
2400
|
axis_v,
|
|
2398
|
-
grid_h,
|
|
2399
|
-
grid_v,
|
|
2400
2401
|
plot,
|
|
2401
2402
|
...rest
|
|
2402
2403
|
};
|
|
2403
2404
|
}
|
|
2404
2405
|
function themeBuild(theme2) {
|
|
2405
|
-
function _grid_build(grid_theme) {
|
|
2406
|
-
return {
|
|
2407
|
-
line_color_major: ["line_color", "line_color_major"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
|
|
2408
|
-
line_color_minor: ["line_color", "line_color_minor"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
|
|
2409
|
-
line_width_major: ["line_width", "line_width_major"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
|
|
2410
|
-
line_width_minor: ["line_width", "line_width_minor"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0)
|
|
2411
|
-
};
|
|
2412
|
-
}
|
|
2413
2406
|
return {
|
|
2414
2407
|
axis: {
|
|
2415
2408
|
h: obj_merge(...["axis", "axis_h"].map((k) => theme2?.[k])),
|
|
@@ -2427,10 +2420,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
2427
2420
|
...["axis", "axis_h", "axis_bottom"].map((k) => theme2?.[k])
|
|
2428
2421
|
)
|
|
2429
2422
|
},
|
|
2430
|
-
grid: {
|
|
2431
|
-
h: _grid_build(obj_merge(...["grid", "grid_h"].map((k) => theme2?.[k]))),
|
|
2432
|
-
v: _grid_build(obj_merge(...["grid", "grid_v"].map((k) => theme2?.[k])))
|
|
2433
|
-
},
|
|
2434
2423
|
plot: {
|
|
2435
2424
|
margin: {
|
|
2436
2425
|
left: ["margin", "margin_h", "margin_left"].map((k) => theme2?.plot?.[k]).findLast((x2) => x2 !== void 0) ?? 0,
|
|
@@ -2508,7 +2497,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2508
2497
|
y2,
|
|
2509
2498
|
ds.outliers ?? [],
|
|
2510
2499
|
xnudge
|
|
2511
|
-
), $xmin = psum$a(ds.
|
|
2500
|
+
), $xmin = psum$a(ds.min, xnudge), $xmax = psum$a(ds.max, xnudge);
|
|
2512
2501
|
return {
|
|
2513
2502
|
y: y2,
|
|
2514
2503
|
ymin,
|
|
@@ -2776,7 +2765,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
2776
2765
|
textsegment: textsegment$1,
|
|
2777
2766
|
tile: tile$1
|
|
2778
2767
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2779
|
-
const bar = Object.assign(function(data) {
|
|
2768
|
+
const bar = Object.assign(function(data, { position = "stack", width = 1, height = 1 }) {
|
|
2780
2769
|
if (data.x != null && data.y != null)
|
|
2781
2770
|
throw new Error(`"StatBar" only supports "x" or "y", not both`);
|
|
2782
2771
|
let values = data.x ?? data.y;
|
|
@@ -2791,25 +2780,52 @@ var VVPlot = (function(exports, vue) {
|
|
|
2791
2780
|
let $raw = Array.from(groups.values()), cates = Array.from(groups.keys());
|
|
2792
2781
|
let result = {
|
|
2793
2782
|
$raw,
|
|
2794
|
-
|
|
2795
|
-
$group: cates.map((x2) => x2.group),
|
|
2796
|
-
value: cates.map((x2) => x2.value)
|
|
2783
|
+
$group: cates.map((x2) => x2.group)
|
|
2797
2784
|
};
|
|
2798
2785
|
for (let key of keys) {
|
|
2799
2786
|
result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
|
|
2800
2787
|
}
|
|
2801
2788
|
if (data.x) {
|
|
2802
|
-
|
|
2789
|
+
result.x = cates.map((v) => v.value);
|
|
2790
|
+
result.height = $raw.map((v) => v.length);
|
|
2791
|
+
} else {
|
|
2792
|
+
result.y = cates.map((v) => v.value);
|
|
2793
|
+
result.width = $raw.map((v) => v.length);
|
|
2794
|
+
}
|
|
2795
|
+
if (position == "dodge") {
|
|
2796
|
+
if (data.x) {
|
|
2797
|
+
result.y = result.height.map((v) => v / 2);
|
|
2798
|
+
result.width = cates.map((_, i) => width / group.categories.length);
|
|
2799
|
+
result.xnudge = result.$group.map((v, i) => (result.xnudge?.[i] ?? 0) + ((v + 0.5) / group.categories.length - 0.5) * width);
|
|
2800
|
+
} else {
|
|
2801
|
+
result.x = result.width.map((v) => v / 2);
|
|
2802
|
+
result.height = cates.map((_, i) => height / group.categories.length);
|
|
2803
|
+
result.ynudge = result.$group.map((v, i) => (result.ynudge?.[i] ?? 0) + ((v + 0.5) / group.categories.length - 0.5) * height);
|
|
2804
|
+
}
|
|
2803
2805
|
} else {
|
|
2804
|
-
|
|
2806
|
+
let tmp = Object.fromEntries(Array.from(new Set(values)).map((v) => [v, 0]));
|
|
2807
|
+
let offset = cates.map((_) => 0);
|
|
2808
|
+
let indices = cates.map((cate, i) => [cate, i]).sort(([{ group: a }], [{ group: b }]) => a - b);
|
|
2809
|
+
for (let [cate, i] of indices) {
|
|
2810
|
+
offset[i] = tmp[cate.value];
|
|
2811
|
+
tmp[cate.value] += $raw[i].length;
|
|
2812
|
+
}
|
|
2813
|
+
if (data.x) {
|
|
2814
|
+
result.y = result.height.map((v, i) => offset[i] + v / 2);
|
|
2815
|
+
result.width = cates.map((_) => width);
|
|
2816
|
+
} else {
|
|
2817
|
+
result.x = result.width.map((v, i) => offset[i] + v / 2);
|
|
2818
|
+
result.height = cates.map((_) => height);
|
|
2819
|
+
}
|
|
2805
2820
|
}
|
|
2821
|
+
return result;
|
|
2806
2822
|
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
2807
2823
|
const boxplot = Object.assign(function(data, {}) {
|
|
2808
2824
|
let missingAes = ["x", "y"].filter((a) => data[a] == null);
|
|
2809
2825
|
if (missingAes.length > 0)
|
|
2810
2826
|
throw new Error(`Missing aesthetics for "StatBoxplot": "${missingAes.join('", "')}"`);
|
|
2811
|
-
let isXdiscrete = data.x.some(
|
|
2812
|
-
let isYdiscrete = data.y.some(
|
|
2827
|
+
let isXdiscrete = data.x.some(is_categorical);
|
|
2828
|
+
let isYdiscrete = data.y.some(is_categorical);
|
|
2813
2829
|
if (isXdiscrete && isYdiscrete)
|
|
2814
2830
|
throw new Error(`Both "x" and "y" are discrete, "StatBoxplot" requires one continuous and one discrete aesthetic`);
|
|
2815
2831
|
if (!isXdiscrete && !isYdiscrete)
|
|
@@ -6793,9 +6809,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
6793
6809
|
if (obj == null) return {};
|
|
6794
6810
|
return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, expr(k, v)]));
|
|
6795
6811
|
}
|
|
6796
|
-
function is_categorical(v) {
|
|
6797
|
-
return typeof v === "string" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "object" && v !== null && typeof v.valueOf() !== "number" && typeof v.valueOf() !== "bigint";
|
|
6798
|
-
}
|
|
6799
6812
|
class GLayer {
|
|
6800
6813
|
/**
|
|
6801
6814
|
* Create a graphic layer from schema
|
|
@@ -7186,42 +7199,39 @@ var VVPlot = (function(exports, vue) {
|
|
|
7186
7199
|
this.titles = titles ?? vvlabel.asis();
|
|
7187
7200
|
this.minorBreaks = minorBreaks ?? breaks ?? scale.minorBreaks ?? scale.breaks;
|
|
7188
7201
|
}
|
|
7189
|
-
|
|
7202
|
+
getBreaks({ range: range2, expandMult, breakSlot } = {}) {
|
|
7190
7203
|
let majorBreaks = this.breaks, minorBreaks = this.minorBreaks, labels = this.labels, titles = this.titles;
|
|
7191
7204
|
let min = range2?.min ?? this?.range?.min, max = range2?.max ?? this?.range?.max, interval2 = max - min || 0;
|
|
7192
7205
|
min = min == null ? min : plus$1(min, -(expandMult?.min ?? 0) * interval2);
|
|
7193
7206
|
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
7207
|
if (typeof majorBreaks == "function") majorBreaks = majorBreaks({ min, max });
|
|
7199
|
-
|
|
7200
|
-
|
|
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);
|
|
7208
|
+
if (!Array.isArray(majorBreaks)) majorBreaks = [];
|
|
7209
|
+
if (typeof labels === "function") labels = majorBreaks.map(labels);
|
|
7204
7210
|
if (!Array.isArray(labels)) {
|
|
7205
7211
|
labels = [];
|
|
7206
|
-
} else if (labels.length !=
|
|
7212
|
+
} else if (labels.length != majorBreaks.length) {
|
|
7207
7213
|
throw new Error("Length of labels must be the same as breaks");
|
|
7208
7214
|
}
|
|
7209
|
-
if (typeof titles === "function") titles =
|
|
7215
|
+
if (typeof titles === "function") titles = majorBreaks.map(titles);
|
|
7210
7216
|
if (!Array.isArray(titles)) {
|
|
7211
7217
|
titles = [];
|
|
7212
|
-
} else if (titles.length !=
|
|
7218
|
+
} else if (titles.length != majorBreaks.length) {
|
|
7213
7219
|
throw new Error("Length of titles must be the same as breaks");
|
|
7214
7220
|
}
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7221
|
+
if (typeof minorBreaks == "function") minorBreaks = minorBreaks({ min, max, minor: true });
|
|
7222
|
+
if (!Array.isArray(minorBreaks)) minorBreaks = [];
|
|
7223
|
+
majorBreaks = majorBreaks.map((value, i) => ({ type: "major", value, label: labels[i], title: titles[i] }));
|
|
7224
|
+
minorBreaks = minorBreaks.map((x2) => ({ type: "minor", value: x2 }));
|
|
7225
|
+
let breaks = majorBreaks.concat(minorBreaks);
|
|
7226
|
+
if (breakSlot instanceof Function) {
|
|
7227
|
+
breaks = expandFragment(breakSlot({ breaks, majorBreaks, minorBreaks, min, max })).filter((c) => c.type.$_type == "axis-break").map((c) => ({ ...c.type.$_props, ...c.props }));
|
|
7228
|
+
}
|
|
7229
|
+
return breaks;
|
|
7220
7230
|
}
|
|
7221
7231
|
}
|
|
7222
7232
|
const _hoisted_1$e = ["font-size"];
|
|
7223
7233
|
const _hoisted_2$8 = { key: 0 };
|
|
7224
|
-
const _sfc_main$
|
|
7234
|
+
const _sfc_main$15 = {
|
|
7225
7235
|
__name: "CoreText",
|
|
7226
7236
|
props: {
|
|
7227
7237
|
x: { type: Number, default: 0 },
|
|
@@ -7306,7 +7316,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
7306
7316
|
}), [
|
|
7307
7317
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
7308
7318
|
__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
|
|
7319
|
+
vue.createTextVNode(" " + vue.toDisplayString(__props.text?.replace(/ /g, " ")), 1)
|
|
7310
7320
|
])
|
|
7311
7321
|
], 16, _hoisted_1$e);
|
|
7312
7322
|
};
|
|
@@ -7747,16 +7757,16 @@ var VVPlot = (function(exports, vue) {
|
|
|
7747
7757
|
function requireDecode() {
|
|
7748
7758
|
if (hasRequiredDecode) return decode;
|
|
7749
7759
|
hasRequiredDecode = 1;
|
|
7750
|
-
(function(
|
|
7760
|
+
(function(exports2) {
|
|
7751
7761
|
var __importDefault = decode && decode.__importDefault || function(mod) {
|
|
7752
7762
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
7753
7763
|
};
|
|
7754
|
-
Object.defineProperty(
|
|
7755
|
-
|
|
7764
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
7765
|
+
exports2.decodeXML = exports2.decodeHTMLStrict = exports2.decodeHTML = exports2.determineBranch = exports2.JUMP_OFFSET_BASE = exports2.BinTrieFlags = exports2.xmlDecodeTree = exports2.htmlDecodeTree = void 0;
|
|
7756
7766
|
var decode_data_html_1 = __importDefault(/* @__PURE__ */ requireDecodeDataHtml());
|
|
7757
|
-
|
|
7767
|
+
exports2.htmlDecodeTree = decode_data_html_1.default;
|
|
7758
7768
|
var decode_data_xml_1 = __importDefault(/* @__PURE__ */ requireDecodeDataXml());
|
|
7759
|
-
|
|
7769
|
+
exports2.xmlDecodeTree = decode_data_xml_1.default;
|
|
7760
7770
|
var decode_codepoint_1 = __importDefault(/* @__PURE__ */ requireDecode_codepoint());
|
|
7761
7771
|
var BinTrieFlags;
|
|
7762
7772
|
(function(BinTrieFlags2) {
|
|
@@ -7764,8 +7774,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
7764
7774
|
BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 32512] = "BRANCH_LENGTH";
|
|
7765
7775
|
BinTrieFlags2[BinTrieFlags2["MULTI_BYTE"] = 128] = "MULTI_BYTE";
|
|
7766
7776
|
BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
|
|
7767
|
-
})(BinTrieFlags =
|
|
7768
|
-
|
|
7777
|
+
})(BinTrieFlags = exports2.BinTrieFlags || (exports2.BinTrieFlags = {}));
|
|
7778
|
+
exports2.JUMP_OFFSET_BASE = 48 - 1;
|
|
7769
7779
|
function getDecoder(decodeTree) {
|
|
7770
7780
|
return function decodeHTMLBinary(str, strict) {
|
|
7771
7781
|
var ret = "";
|
|
@@ -7838,7 +7848,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
7838
7848
|
}
|
|
7839
7849
|
var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
|
|
7840
7850
|
if (jumpOffset) {
|
|
7841
|
-
var value = char -
|
|
7851
|
+
var value = char - exports2.JUMP_OFFSET_BASE - jumpOffset;
|
|
7842
7852
|
return value < 0 || value > branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
|
|
7843
7853
|
}
|
|
7844
7854
|
var lo = nodeIdx;
|
|
@@ -7856,21 +7866,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
7856
7866
|
}
|
|
7857
7867
|
return -1;
|
|
7858
7868
|
}
|
|
7859
|
-
|
|
7869
|
+
exports2.determineBranch = determineBranch;
|
|
7860
7870
|
var htmlDecoder = getDecoder(decode_data_html_1.default);
|
|
7861
7871
|
var xmlDecoder = getDecoder(decode_data_xml_1.default);
|
|
7862
7872
|
function decodeHTML(str) {
|
|
7863
7873
|
return htmlDecoder(str, false);
|
|
7864
7874
|
}
|
|
7865
|
-
|
|
7875
|
+
exports2.decodeHTML = decodeHTML;
|
|
7866
7876
|
function decodeHTMLStrict(str) {
|
|
7867
7877
|
return htmlDecoder(str, true);
|
|
7868
7878
|
}
|
|
7869
|
-
|
|
7879
|
+
exports2.decodeHTMLStrict = decodeHTMLStrict;
|
|
7870
7880
|
function decodeXML(str) {
|
|
7871
7881
|
return xmlDecoder(str, true);
|
|
7872
7882
|
}
|
|
7873
|
-
|
|
7883
|
+
exports2.decodeXML = decodeXML;
|
|
7874
7884
|
})(decode);
|
|
7875
7885
|
return decode;
|
|
7876
7886
|
}
|
|
@@ -12142,17 +12152,17 @@ var VVPlot = (function(exports, vue) {
|
|
|
12142
12152
|
function requireEncodeTrie() {
|
|
12143
12153
|
if (hasRequiredEncodeTrie) return encodeTrie;
|
|
12144
12154
|
hasRequiredEncodeTrie = 1;
|
|
12145
|
-
(function(
|
|
12155
|
+
(function(exports2) {
|
|
12146
12156
|
var __importDefault = encodeTrie && encodeTrie.__importDefault || function(mod) {
|
|
12147
12157
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12148
12158
|
};
|
|
12149
|
-
Object.defineProperty(
|
|
12150
|
-
|
|
12159
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12160
|
+
exports2.getTrie = exports2.encodeHTMLTrieRe = exports2.getCodePoint = void 0;
|
|
12151
12161
|
var entities_json_1 = __importDefault(require$$2);
|
|
12152
12162
|
function isHighSurrugate(c) {
|
|
12153
12163
|
return (c & 64512) === 55296;
|
|
12154
12164
|
}
|
|
12155
|
-
|
|
12165
|
+
exports2.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
12156
12166
|
String.prototype.codePointAt != null ? function(str, index2) {
|
|
12157
12167
|
return str.codePointAt(index2);
|
|
12158
12168
|
} : (
|
|
@@ -12184,13 +12194,13 @@ var VVPlot = (function(exports, vue) {
|
|
|
12184
12194
|
ret += str.substring(lastIdx, i) + next2.value;
|
|
12185
12195
|
lastIdx = i + 1;
|
|
12186
12196
|
} else {
|
|
12187
|
-
ret += str.substring(lastIdx, i) + "&#x" +
|
|
12197
|
+
ret += str.substring(lastIdx, i) + "&#x" + exports2.getCodePoint(str, i).toString(16) + ";";
|
|
12188
12198
|
lastIdx = regExp.lastIndex += Number(isHighSurrugate(char));
|
|
12189
12199
|
}
|
|
12190
12200
|
}
|
|
12191
12201
|
return ret + str.substr(lastIdx);
|
|
12192
12202
|
}
|
|
12193
|
-
|
|
12203
|
+
exports2.encodeHTMLTrieRe = encodeHTMLTrieRe;
|
|
12194
12204
|
function getTrie(map2) {
|
|
12195
12205
|
var _a, _b, _c, _d;
|
|
12196
12206
|
var trie2 = /* @__PURE__ */ new Map();
|
|
@@ -12210,7 +12220,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
12210
12220
|
}
|
|
12211
12221
|
return trie2;
|
|
12212
12222
|
}
|
|
12213
|
-
|
|
12223
|
+
exports2.getTrie = getTrie;
|
|
12214
12224
|
})(encodeTrie);
|
|
12215
12225
|
return encodeTrie;
|
|
12216
12226
|
}
|
|
@@ -12305,27 +12315,27 @@ var VVPlot = (function(exports, vue) {
|
|
|
12305
12315
|
function requireLib() {
|
|
12306
12316
|
if (hasRequiredLib) return lib;
|
|
12307
12317
|
hasRequiredLib = 1;
|
|
12308
|
-
(function(
|
|
12309
|
-
Object.defineProperty(
|
|
12310
|
-
|
|
12318
|
+
(function(exports2) {
|
|
12319
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12320
|
+
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
12321
|
var decode_1 = /* @__PURE__ */ requireDecode();
|
|
12312
12322
|
var encode_12 = /* @__PURE__ */ requireEncode();
|
|
12313
12323
|
var EntityLevel;
|
|
12314
12324
|
(function(EntityLevel2) {
|
|
12315
12325
|
EntityLevel2[EntityLevel2["XML"] = 0] = "XML";
|
|
12316
12326
|
EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML";
|
|
12317
|
-
})(EntityLevel =
|
|
12327
|
+
})(EntityLevel = exports2.EntityLevel || (exports2.EntityLevel = {}));
|
|
12318
12328
|
var DecodingMode;
|
|
12319
12329
|
(function(DecodingMode2) {
|
|
12320
12330
|
DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy";
|
|
12321
12331
|
DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict";
|
|
12322
|
-
})(DecodingMode =
|
|
12332
|
+
})(DecodingMode = exports2.DecodingMode || (exports2.DecodingMode = {}));
|
|
12323
12333
|
var EncodingMode;
|
|
12324
12334
|
(function(EncodingMode2) {
|
|
12325
12335
|
EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8";
|
|
12326
12336
|
EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII";
|
|
12327
12337
|
EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive";
|
|
12328
|
-
})(EncodingMode =
|
|
12338
|
+
})(EncodingMode = exports2.EncodingMode || (exports2.EncodingMode = {}));
|
|
12329
12339
|
function decode2(data, options) {
|
|
12330
12340
|
if (options === void 0) {
|
|
12331
12341
|
options = EntityLevel.XML;
|
|
@@ -12339,7 +12349,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
12339
12349
|
}
|
|
12340
12350
|
return decode_1.decodeXML(data);
|
|
12341
12351
|
}
|
|
12342
|
-
|
|
12352
|
+
exports2.decode = decode2;
|
|
12343
12353
|
function decodeStrict(data, options) {
|
|
12344
12354
|
if (options === void 0) {
|
|
12345
12355
|
options = EntityLevel.XML;
|
|
@@ -12353,7 +12363,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
12353
12363
|
}
|
|
12354
12364
|
return decode_1.decodeXML(data);
|
|
12355
12365
|
}
|
|
12356
|
-
|
|
12366
|
+
exports2.decodeStrict = decodeStrict;
|
|
12357
12367
|
function encode2(data, options) {
|
|
12358
12368
|
if (options === void 0) {
|
|
12359
12369
|
options = EntityLevel.XML;
|
|
@@ -12369,52 +12379,52 @@ var VVPlot = (function(exports, vue) {
|
|
|
12369
12379
|
}
|
|
12370
12380
|
return encode_12.encodeXML(data);
|
|
12371
12381
|
}
|
|
12372
|
-
|
|
12382
|
+
exports2.encode = encode2;
|
|
12373
12383
|
var encode_2 = /* @__PURE__ */ requireEncode();
|
|
12374
|
-
Object.defineProperty(
|
|
12384
|
+
Object.defineProperty(exports2, "encodeXML", { enumerable: true, get: function() {
|
|
12375
12385
|
return encode_2.encodeXML;
|
|
12376
12386
|
} });
|
|
12377
|
-
Object.defineProperty(
|
|
12387
|
+
Object.defineProperty(exports2, "encodeHTML", { enumerable: true, get: function() {
|
|
12378
12388
|
return encode_2.encodeHTML;
|
|
12379
12389
|
} });
|
|
12380
|
-
Object.defineProperty(
|
|
12390
|
+
Object.defineProperty(exports2, "encodeNonAsciiHTML", { enumerable: true, get: function() {
|
|
12381
12391
|
return encode_2.encodeNonAsciiHTML;
|
|
12382
12392
|
} });
|
|
12383
|
-
Object.defineProperty(
|
|
12393
|
+
Object.defineProperty(exports2, "escape", { enumerable: true, get: function() {
|
|
12384
12394
|
return encode_2.escape;
|
|
12385
12395
|
} });
|
|
12386
|
-
Object.defineProperty(
|
|
12396
|
+
Object.defineProperty(exports2, "escapeUTF8", { enumerable: true, get: function() {
|
|
12387
12397
|
return encode_2.escapeUTF8;
|
|
12388
12398
|
} });
|
|
12389
|
-
Object.defineProperty(
|
|
12399
|
+
Object.defineProperty(exports2, "encodeHTML4", { enumerable: true, get: function() {
|
|
12390
12400
|
return encode_2.encodeHTML;
|
|
12391
12401
|
} });
|
|
12392
|
-
Object.defineProperty(
|
|
12402
|
+
Object.defineProperty(exports2, "encodeHTML5", { enumerable: true, get: function() {
|
|
12393
12403
|
return encode_2.encodeHTML;
|
|
12394
12404
|
} });
|
|
12395
12405
|
var decode_2 = /* @__PURE__ */ requireDecode();
|
|
12396
|
-
Object.defineProperty(
|
|
12406
|
+
Object.defineProperty(exports2, "decodeXML", { enumerable: true, get: function() {
|
|
12397
12407
|
return decode_2.decodeXML;
|
|
12398
12408
|
} });
|
|
12399
|
-
Object.defineProperty(
|
|
12409
|
+
Object.defineProperty(exports2, "decodeHTML", { enumerable: true, get: function() {
|
|
12400
12410
|
return decode_2.decodeHTML;
|
|
12401
12411
|
} });
|
|
12402
|
-
Object.defineProperty(
|
|
12412
|
+
Object.defineProperty(exports2, "decodeHTMLStrict", { enumerable: true, get: function() {
|
|
12403
12413
|
return decode_2.decodeHTMLStrict;
|
|
12404
12414
|
} });
|
|
12405
|
-
Object.defineProperty(
|
|
12415
|
+
Object.defineProperty(exports2, "decodeHTML4", { enumerable: true, get: function() {
|
|
12406
12416
|
return decode_2.decodeHTML;
|
|
12407
12417
|
} });
|
|
12408
|
-
Object.defineProperty(
|
|
12418
|
+
Object.defineProperty(exports2, "decodeHTML5", { enumerable: true, get: function() {
|
|
12409
12419
|
return decode_2.decodeHTML;
|
|
12410
12420
|
} });
|
|
12411
|
-
Object.defineProperty(
|
|
12421
|
+
Object.defineProperty(exports2, "decodeHTML4Strict", { enumerable: true, get: function() {
|
|
12412
12422
|
return decode_2.decodeHTMLStrict;
|
|
12413
12423
|
} });
|
|
12414
|
-
Object.defineProperty(
|
|
12424
|
+
Object.defineProperty(exports2, "decodeHTML5Strict", { enumerable: true, get: function() {
|
|
12415
12425
|
return decode_2.decodeHTMLStrict;
|
|
12416
12426
|
} });
|
|
12417
|
-
Object.defineProperty(
|
|
12427
|
+
Object.defineProperty(exports2, "decodeXMLStrict", { enumerable: true, get: function() {
|
|
12418
12428
|
return decode_2.decodeXML;
|
|
12419
12429
|
} });
|
|
12420
12430
|
})(lib);
|
|
@@ -14472,7 +14482,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
14472
14482
|
XmlRenderer.prototype.esc = escapeXml;
|
|
14473
14483
|
const _hoisted_1$d = ["text-anchor", "font-size"];
|
|
14474
14484
|
const _hoisted_2$7 = { key: 0 };
|
|
14475
|
-
const _sfc_main$
|
|
14485
|
+
const _sfc_main$14 = {
|
|
14476
14486
|
__name: "CoreMarkdown",
|
|
14477
14487
|
props: {
|
|
14478
14488
|
x: { type: Number, default: 0 },
|
|
@@ -14619,6 +14629,72 @@ var VVPlot = (function(exports, vue) {
|
|
|
14619
14629
|
};
|
|
14620
14630
|
}
|
|
14621
14631
|
};
|
|
14632
|
+
const _sfc_main$13 = {
|
|
14633
|
+
__name: "CoreAxisLabel",
|
|
14634
|
+
props: {
|
|
14635
|
+
type: String,
|
|
14636
|
+
value: null,
|
|
14637
|
+
getPosition: Function
|
|
14638
|
+
},
|
|
14639
|
+
emits: [
|
|
14640
|
+
"click",
|
|
14641
|
+
"dblclick",
|
|
14642
|
+
"contextmenu",
|
|
14643
|
+
"pointerdown",
|
|
14644
|
+
"pointerup",
|
|
14645
|
+
"pointerover",
|
|
14646
|
+
"pointerout",
|
|
14647
|
+
"pointerenter",
|
|
14648
|
+
"pointerleave",
|
|
14649
|
+
"pointermove",
|
|
14650
|
+
"wheel",
|
|
14651
|
+
"singleclick"
|
|
14652
|
+
],
|
|
14653
|
+
setup(__props, { emit: __emit }) {
|
|
14654
|
+
const emit = __emit;
|
|
14655
|
+
const vOn = {
|
|
14656
|
+
pointerdown(e) {
|
|
14657
|
+
emit("pointerdown", e, __props.getPosition(e), __props.value);
|
|
14658
|
+
},
|
|
14659
|
+
pointerup(e) {
|
|
14660
|
+
emit("pointerup", e, __props.getPosition(e), __props.value);
|
|
14661
|
+
},
|
|
14662
|
+
pointerover(e) {
|
|
14663
|
+
emit("pointerover", e, __props.getPosition(e), __props.value);
|
|
14664
|
+
},
|
|
14665
|
+
pointerout(e) {
|
|
14666
|
+
emit("pointerout", e, __props.getPosition(e), __props.value);
|
|
14667
|
+
},
|
|
14668
|
+
pointerenter(e) {
|
|
14669
|
+
emit("pointerenter", e, __props.getPosition(e), __props.value);
|
|
14670
|
+
},
|
|
14671
|
+
pointerleave(e) {
|
|
14672
|
+
emit("pointerleave", e, __props.getPosition(e), __props.value);
|
|
14673
|
+
},
|
|
14674
|
+
dblclick(e) {
|
|
14675
|
+
emit("dblclick", e, __props.getPosition(e), __props.value);
|
|
14676
|
+
},
|
|
14677
|
+
click(e) {
|
|
14678
|
+
emit("click", e, __props.getPosition(e), __props.value);
|
|
14679
|
+
},
|
|
14680
|
+
singleclick(e) {
|
|
14681
|
+
emit("singleclick", e, __props.getPosition(e), __props.value);
|
|
14682
|
+
},
|
|
14683
|
+
contextmenu(e) {
|
|
14684
|
+
emit("contextmenu", e, __props.getPosition(e), __props.value);
|
|
14685
|
+
},
|
|
14686
|
+
pointermove(e) {
|
|
14687
|
+
emit("pointermove", e, __props.getPosition(e), __props.value);
|
|
14688
|
+
},
|
|
14689
|
+
wheel(e) {
|
|
14690
|
+
emit("wheel", e, __props.getPosition(e), __props.value);
|
|
14691
|
+
}
|
|
14692
|
+
};
|
|
14693
|
+
return (_ctx, _cache) => {
|
|
14694
|
+
return __props.type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$14, vue.mergeProps({ key: 0 }, vue.toHandlers(vOn)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$15, vue.mergeProps({ key: 1 }, vue.toHandlers(vOn)), null, 16));
|
|
14695
|
+
};
|
|
14696
|
+
}
|
|
14697
|
+
};
|
|
14622
14698
|
const _hoisted_1$c = ["transform"];
|
|
14623
14699
|
const _hoisted_2$6 = ["x2"];
|
|
14624
14700
|
const _hoisted_3$4 = {
|
|
@@ -14627,12 +14703,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
14627
14703
|
};
|
|
14628
14704
|
const _hoisted_4$3 = ["width", "cursor"];
|
|
14629
14705
|
const _hoisted_5$2 = {
|
|
14630
|
-
key:
|
|
14706
|
+
key: 1,
|
|
14631
14707
|
class: "vvplot-interactive",
|
|
14632
14708
|
fill: "transparent"
|
|
14633
14709
|
};
|
|
14634
14710
|
const _hoisted_6$2 = ["x"];
|
|
14635
|
-
const _sfc_main$
|
|
14711
|
+
const _sfc_main$12 = {
|
|
14636
14712
|
__name: "CoreAxisH",
|
|
14637
14713
|
props: {
|
|
14638
14714
|
coord: String,
|
|
@@ -14713,20 +14789,20 @@ var VVPlot = (function(exports, vue) {
|
|
|
14713
14789
|
const tickLines = vue.computed(() => {
|
|
14714
14790
|
let result = [];
|
|
14715
14791
|
for (let tick of __props.ticks) {
|
|
14716
|
-
|
|
14717
|
-
let pos = __props.coord2pos({ h:
|
|
14792
|
+
let { value, theme: $theme } = tick;
|
|
14793
|
+
let pos = __props.coord2pos({ h: value }).h;
|
|
14718
14794
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
14719
|
-
|
|
14720
|
-
if (
|
|
14721
|
-
let offset = (
|
|
14795
|
+
pos += __props.layout.l;
|
|
14796
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
14797
|
+
let offset = ($theme.tick_position == "top" ? -1 : 1) * $theme.tick_length;
|
|
14722
14798
|
result.push({
|
|
14723
|
-
key: "line-" +
|
|
14799
|
+
key: "line-" + value,
|
|
14724
14800
|
y1: 0,
|
|
14725
14801
|
y2: offset,
|
|
14726
|
-
x1:
|
|
14727
|
-
x2:
|
|
14728
|
-
"stroke":
|
|
14729
|
-
"stroke-width":
|
|
14802
|
+
x1: pos,
|
|
14803
|
+
x2: pos,
|
|
14804
|
+
"stroke": $theme.tick_color,
|
|
14805
|
+
"stroke-width": $theme.tick_width,
|
|
14730
14806
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
14731
14807
|
style: { transition: __props.transition }
|
|
14732
14808
|
});
|
|
@@ -14734,43 +14810,45 @@ var VVPlot = (function(exports, vue) {
|
|
|
14734
14810
|
return result.filter((t) => t.stroke != null).sort((a, b) => a.x1 - b.x1);
|
|
14735
14811
|
});
|
|
14736
14812
|
const tickTexts = vue.computed(() => {
|
|
14737
|
-
let isTop = (__props.theme.label_position ?? __props.theme.tick_position) == "top";
|
|
14738
14813
|
let result = [];
|
|
14739
14814
|
for (let tick of __props.ticks) {
|
|
14740
|
-
|
|
14741
|
-
let
|
|
14815
|
+
let { type, value, label, title, theme: $theme, ...etc } = tick;
|
|
14816
|
+
let isTop = ($theme.label_position ?? $theme.tick_position) == "top";
|
|
14817
|
+
let pos = __props.coord2pos({ h: value }).h;
|
|
14742
14818
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
14743
|
-
|
|
14744
|
-
if (
|
|
14745
|
-
let offset = (isTop ? -1 : 1) * (
|
|
14819
|
+
pos += __props.layout.l;
|
|
14820
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
14821
|
+
let offset = (isTop ? -1 : 1) * ($theme.label_offset ?? $theme.tick_length);
|
|
14746
14822
|
let anchorX, anchorY, dockX, dockY;
|
|
14747
|
-
if (
|
|
14748
|
-
anchorX =
|
|
14749
|
-
anchorY =
|
|
14823
|
+
if ($theme.label_anchor_x != null || $theme.label_anchor_y != null) {
|
|
14824
|
+
anchorX = $theme.label_anchor_x ?? 0.5;
|
|
14825
|
+
anchorY = $theme.label_anchor_y ?? (isTop ? 0 : 1);
|
|
14750
14826
|
} else {
|
|
14751
|
-
dockX =
|
|
14752
|
-
dockY =
|
|
14827
|
+
dockX = $theme.label_dock_x ?? 0.5;
|
|
14828
|
+
dockY = $theme.label_dock_y ?? (isTop ? 0 : 1);
|
|
14753
14829
|
}
|
|
14754
14830
|
result.push({
|
|
14755
14831
|
wrapper: {
|
|
14756
|
-
key: "text-" +
|
|
14832
|
+
key: "text-" + value,
|
|
14757
14833
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
14758
14834
|
style: { transition: __props.transition }
|
|
14759
14835
|
},
|
|
14760
14836
|
text: {
|
|
14761
|
-
x:
|
|
14837
|
+
x: pos,
|
|
14762
14838
|
y: offset,
|
|
14763
|
-
angle:
|
|
14839
|
+
angle: $theme.label_angle,
|
|
14764
14840
|
anchorX,
|
|
14765
14841
|
anchorY,
|
|
14766
14842
|
dockX,
|
|
14767
14843
|
dockY,
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14844
|
+
type: $theme.label_type,
|
|
14845
|
+
text: label,
|
|
14846
|
+
title: title ?? label,
|
|
14847
|
+
fontSize: $theme.label_size,
|
|
14848
|
+
fill: $theme.label_color,
|
|
14772
14849
|
"font-family": "sans-serif",
|
|
14773
|
-
|
|
14850
|
+
value,
|
|
14851
|
+
...etc
|
|
14774
14852
|
}
|
|
14775
14853
|
});
|
|
14776
14854
|
}
|
|
@@ -14801,13 +14879,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
14801
14879
|
}
|
|
14802
14880
|
}
|
|
14803
14881
|
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
14882
|
let act = __props.action.find((a) => a.action == "move");
|
|
14812
14883
|
if (!act) return;
|
|
14813
14884
|
e.preventDefault();
|
|
@@ -14966,19 +15037,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
14966
15037
|
pointerleave(e) {
|
|
14967
15038
|
emit("pointerleave", e, getPosition(e));
|
|
14968
15039
|
},
|
|
14969
|
-
dblclick(e) {
|
|
14970
|
-
emit("dblclick", e, getPosition(e));
|
|
14971
|
-
},
|
|
14972
15040
|
click(e) {
|
|
14973
15041
|
emit("click", e, getPosition(e));
|
|
14974
15042
|
},
|
|
15043
|
+
singleclick(e) {
|
|
15044
|
+
emit("singleclick", e, getPosition(e));
|
|
15045
|
+
},
|
|
15046
|
+
dblclick(e) {
|
|
15047
|
+
emit("dblclick", e, getPosition(e));
|
|
15048
|
+
},
|
|
14975
15049
|
contextmenu(e) {
|
|
14976
15050
|
emit("contextmenu", e, getPosition(e));
|
|
14977
15051
|
},
|
|
14978
15052
|
pointermove(e) {
|
|
14979
15053
|
emit("pointermove", e, getPosition(e));
|
|
14980
15054
|
},
|
|
14981
|
-
pointerdown: axisMovePointerdown,
|
|
14982
15055
|
wheel: axisWheel
|
|
14983
15056
|
};
|
|
14984
15057
|
return (_ctx, _cache) => {
|
|
@@ -14986,13 +15059,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
14986
15059
|
transform: transform.value,
|
|
14987
15060
|
style: vue.normalizeStyle({ transition: __props.transition })
|
|
14988
15061
|
}, [
|
|
14989
|
-
vue.
|
|
15062
|
+
axisLine.value.stroke != null ? (vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({
|
|
15063
|
+
key: 0,
|
|
14990
15064
|
ref: "i",
|
|
14991
15065
|
x1: 0,
|
|
14992
15066
|
x2: width.value,
|
|
14993
15067
|
y1: 0,
|
|
14994
15068
|
y2: 0
|
|
14995
|
-
}, axisLine.value), null, 16, _hoisted_2$6),
|
|
15069
|
+
}, axisLine.value), null, 16, _hoisted_2$6)) : vue.createCommentVNode("", true),
|
|
14996
15070
|
_cache[1] || (_cache[1] = vue.createTextVNode()),
|
|
14997
15071
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickLines.value, (tick) => {
|
|
14998
15072
|
return vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({ ref_for: true }, tick), null, 16);
|
|
@@ -15000,13 +15074,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15000
15074
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
15001
15075
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
|
|
15002
15076
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
|
|
15003
|
-
|
|
15004
|
-
key: 0,
|
|
15005
|
-
ref_for: true
|
|
15006
|
-
}, tick.text), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({
|
|
15007
|
-
key: 1,
|
|
15008
|
-
ref_for: true
|
|
15009
|
-
}, tick.text), null, 16))
|
|
15077
|
+
vue.createVNode(_sfc_main$13, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
|
|
15010
15078
|
], 16);
|
|
15011
15079
|
}), 256)),
|
|
15012
15080
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
@@ -15016,31 +15084,30 @@ var VVPlot = (function(exports, vue) {
|
|
|
15016
15084
|
height: 10,
|
|
15017
15085
|
y: -5
|
|
15018
15086
|
}, vue.toHandlers(axisVOn, true), {
|
|
15087
|
+
onPointerdown: axisMovePointerdown,
|
|
15019
15088
|
cursor: __props.action.some?.((a) => a.action == "move") ? "grab" : null
|
|
15020
15089
|
}), null, 16, _hoisted_4$3)
|
|
15021
15090
|
]),
|
|
15022
15091
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
15023
15092
|
__props.action.some?.((a) => a.action == "rescale") ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_5$2, [
|
|
15024
|
-
vue.createElementVNode("rect", {
|
|
15093
|
+
vue.createElementVNode("rect", vue.mergeProps({
|
|
15025
15094
|
width: 20,
|
|
15026
15095
|
height: 10,
|
|
15027
15096
|
y: -5,
|
|
15028
|
-
style: { "cursor": "ew-resize" }
|
|
15029
|
-
|
|
15030
|
-
}, null, 32),
|
|
15097
|
+
style: { "cursor": "ew-resize" }
|
|
15098
|
+
}, vue.toHandlers(axisVOn, true), { onPointerdown: axisRescaleLeftPointerdown }), null, 16),
|
|
15031
15099
|
_cache[0] || (_cache[0] = vue.createTextVNode()),
|
|
15032
|
-
vue.createElementVNode("rect", {
|
|
15100
|
+
vue.createElementVNode("rect", vue.mergeProps({
|
|
15033
15101
|
width: 20,
|
|
15034
15102
|
height: 10,
|
|
15035
15103
|
y: -5,
|
|
15036
15104
|
x: width.value - 20,
|
|
15037
|
-
style: { "cursor": "ew-resize" }
|
|
15038
|
-
|
|
15039
|
-
}, null, 40, _hoisted_6$2)
|
|
15105
|
+
style: { "cursor": "ew-resize" }
|
|
15106
|
+
}, vue.toHandlers(axisVOn, true), { onPointerdown: axisRescaleRightPointerdown }), null, 16, _hoisted_6$2)
|
|
15040
15107
|
])) : vue.createCommentVNode("", true),
|
|
15041
15108
|
_cache[5] || (_cache[5] = vue.createTextVNode()),
|
|
15042
|
-
axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key:
|
|
15043
|
-
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
15109
|
+
axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
15110
|
+
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$14, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$15, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
|
|
15044
15111
|
], 64)) : vue.createCommentVNode("", true)
|
|
15045
15112
|
], 12, _hoisted_1$c);
|
|
15046
15113
|
};
|
|
@@ -15054,12 +15121,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
15054
15121
|
};
|
|
15055
15122
|
const _hoisted_4$2 = ["height", "cursor"];
|
|
15056
15123
|
const _hoisted_5$1 = {
|
|
15057
|
-
key:
|
|
15124
|
+
key: 1,
|
|
15058
15125
|
class: "vvplot-interactive",
|
|
15059
15126
|
fill: "transparent"
|
|
15060
15127
|
};
|
|
15061
15128
|
const _hoisted_6$1 = ["y"];
|
|
15062
|
-
const _sfc_main$
|
|
15129
|
+
const _sfc_main$11 = {
|
|
15063
15130
|
__name: "CoreAxisV",
|
|
15064
15131
|
props: {
|
|
15065
15132
|
coord: String,
|
|
@@ -15140,20 +15207,20 @@ var VVPlot = (function(exports, vue) {
|
|
|
15140
15207
|
const tickLines = vue.computed(() => {
|
|
15141
15208
|
let result = [];
|
|
15142
15209
|
for (let tick of __props.ticks) {
|
|
15143
|
-
|
|
15144
|
-
let pos = __props.coord2pos({ v:
|
|
15210
|
+
let { value, theme: $theme } = tick;
|
|
15211
|
+
let pos = __props.coord2pos({ v: value }).v;
|
|
15145
15212
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15146
|
-
|
|
15147
|
-
if (
|
|
15148
|
-
let offset = (
|
|
15213
|
+
pos += __props.layout.t;
|
|
15214
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15215
|
+
let offset = ($theme.tick_position == "right" ? 1 : -1) * $theme.tick_length;
|
|
15149
15216
|
result.push({
|
|
15150
|
-
key: "line-" + tick.
|
|
15151
|
-
y1:
|
|
15152
|
-
y2:
|
|
15217
|
+
key: "line-" + tick.value,
|
|
15218
|
+
y1: pos,
|
|
15219
|
+
y2: pos,
|
|
15153
15220
|
x1: 0,
|
|
15154
15221
|
x2: offset,
|
|
15155
|
-
"stroke": tick.color ??
|
|
15156
|
-
"stroke-width": tick.width ??
|
|
15222
|
+
"stroke": tick.color ?? $theme.tick_color,
|
|
15223
|
+
"stroke-width": tick.width ?? $theme.tick_width,
|
|
15157
15224
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15158
15225
|
style: { transition: __props.transition }
|
|
15159
15226
|
});
|
|
@@ -15161,43 +15228,45 @@ var VVPlot = (function(exports, vue) {
|
|
|
15161
15228
|
return result.filter((t) => t.stroke != null).sort((a, b) => a.y1 - b.y1);
|
|
15162
15229
|
});
|
|
15163
15230
|
const tickTexts = vue.computed(() => {
|
|
15164
|
-
let isRight = (__props.theme.label_position ?? __props.theme.tick_position) == "right";
|
|
15165
15231
|
let result = [];
|
|
15166
15232
|
for (let tick of __props.ticks) {
|
|
15167
|
-
|
|
15168
|
-
let
|
|
15233
|
+
let { type, value, label, title, theme: $theme, ...etc } = tick;
|
|
15234
|
+
let isRight = ($theme.label_position ?? $theme.tick_position) == "right";
|
|
15235
|
+
let pos = __props.coord2pos({ v: value }).v;
|
|
15169
15236
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15170
|
-
|
|
15171
|
-
if (
|
|
15172
|
-
let offset = (isRight ? 1 : -1) * ((
|
|
15237
|
+
pos += __props.layout.t;
|
|
15238
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15239
|
+
let offset = (isRight ? 1 : -1) * (($theme.label_offset ?? $theme.tick_length) + 3);
|
|
15173
15240
|
let anchorX, anchorY, dockX, dockY;
|
|
15174
|
-
if (
|
|
15175
|
-
anchorX =
|
|
15176
|
-
anchorY =
|
|
15241
|
+
if ($theme.label_anchor_x != null || $theme.label_anchor_y != null) {
|
|
15242
|
+
anchorX = $theme.label_anchor_x ?? (isRight ? 0 : 1);
|
|
15243
|
+
anchorY = $theme.label_anchor_y ?? 0.5;
|
|
15177
15244
|
} else {
|
|
15178
|
-
dockX =
|
|
15179
|
-
dockY =
|
|
15245
|
+
dockX = $theme.label_dock_x ?? (isRight ? 0 : 1);
|
|
15246
|
+
dockY = $theme.label_dock_y ?? 0.5;
|
|
15180
15247
|
}
|
|
15181
15248
|
result.push({
|
|
15182
15249
|
wrapper: {
|
|
15183
|
-
key: "text-" +
|
|
15250
|
+
key: "text-" + value,
|
|
15184
15251
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15185
15252
|
style: { transition: __props.transition }
|
|
15186
15253
|
},
|
|
15187
15254
|
text: {
|
|
15188
|
-
y:
|
|
15255
|
+
y: pos,
|
|
15189
15256
|
x: offset,
|
|
15190
|
-
angle:
|
|
15257
|
+
angle: $theme.label_angle,
|
|
15191
15258
|
anchorX,
|
|
15192
15259
|
anchorY,
|
|
15193
15260
|
dockX,
|
|
15194
15261
|
dockY,
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15262
|
+
type: $theme.label_type,
|
|
15263
|
+
text: label,
|
|
15264
|
+
title: title ?? label,
|
|
15265
|
+
fontSize: $theme.label_size,
|
|
15266
|
+
fill: $theme.label_color,
|
|
15199
15267
|
"font-family": "sans-serif",
|
|
15200
|
-
|
|
15268
|
+
value,
|
|
15269
|
+
...etc
|
|
15201
15270
|
}
|
|
15202
15271
|
});
|
|
15203
15272
|
}
|
|
@@ -15228,13 +15297,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
15228
15297
|
}
|
|
15229
15298
|
}
|
|
15230
15299
|
e.target.addEventListener("pointermove", detectMove, { passive: true });
|
|
15231
|
-
e.target.addEventListener("pointerup", function(ev) {
|
|
15232
|
-
e.target.removeEventListener("pointermove", detectMove);
|
|
15233
|
-
if (!pointerMoved) {
|
|
15234
|
-
let position2 = getPosition(ev);
|
|
15235
|
-
emit("singleclick", new PointerEvent("singleclick", ev), position2);
|
|
15236
|
-
}
|
|
15237
|
-
}, { once: true });
|
|
15238
15300
|
let act = __props.action.find((a) => a.action == "move");
|
|
15239
15301
|
if (!act) return;
|
|
15240
15302
|
e.preventDefault();
|
|
@@ -15393,19 +15455,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
15393
15455
|
pointerleave(e) {
|
|
15394
15456
|
emit("pointerleave", e, getPosition(e));
|
|
15395
15457
|
},
|
|
15396
|
-
dblclick(e) {
|
|
15397
|
-
emit("dblclick", e, getPosition(e));
|
|
15398
|
-
},
|
|
15399
15458
|
click(e) {
|
|
15400
15459
|
emit("click", e, getPosition(e));
|
|
15401
15460
|
},
|
|
15461
|
+
singleclick(e) {
|
|
15462
|
+
emit("singleclick", e, getPosition(e));
|
|
15463
|
+
},
|
|
15464
|
+
dblclick(e) {
|
|
15465
|
+
emit("dblclick", e, getPosition(e));
|
|
15466
|
+
},
|
|
15402
15467
|
contextmenu(e) {
|
|
15403
15468
|
emit("contextmenu", e, getPosition(e));
|
|
15404
15469
|
},
|
|
15405
15470
|
pointermove(e) {
|
|
15406
15471
|
emit("pointermove", e, getPosition(e));
|
|
15407
15472
|
},
|
|
15408
|
-
pointerdown: axisMovePointerdown,
|
|
15409
15473
|
wheel: axisWheel
|
|
15410
15474
|
};
|
|
15411
15475
|
return (_ctx, _cache) => {
|
|
@@ -15413,13 +15477,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
15413
15477
|
transform: transform.value,
|
|
15414
15478
|
style: vue.normalizeStyle({ transition: __props.transition })
|
|
15415
15479
|
}, [
|
|
15416
|
-
vue.
|
|
15480
|
+
axisLine.value.stroke != null ? (vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({
|
|
15481
|
+
key: 0,
|
|
15417
15482
|
ref: "i",
|
|
15418
15483
|
x1: 0,
|
|
15419
15484
|
x2: 0,
|
|
15420
15485
|
y1: 0,
|
|
15421
15486
|
y2: height.value
|
|
15422
|
-
}, axisLine.value), null, 16, _hoisted_2$5),
|
|
15487
|
+
}, axisLine.value), null, 16, _hoisted_2$5)) : vue.createCommentVNode("", true),
|
|
15423
15488
|
_cache[1] || (_cache[1] = vue.createTextVNode()),
|
|
15424
15489
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickLines.value, (tick) => {
|
|
15425
15490
|
return vue.openBlock(), vue.createElementBlock("line", vue.mergeProps({ ref_for: true }, tick), null, 16);
|
|
@@ -15427,13 +15492,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15427
15492
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
15428
15493
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(tickTexts.value, (tick) => {
|
|
15429
15494
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, tick.wrapper), [
|
|
15430
|
-
|
|
15431
|
-
key: 0,
|
|
15432
|
-
ref_for: true
|
|
15433
|
-
}, tick.text), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({
|
|
15434
|
-
key: 1,
|
|
15435
|
-
ref_for: true
|
|
15436
|
-
}, tick.text), null, 16))
|
|
15495
|
+
vue.createVNode(_sfc_main$13, vue.mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
|
|
15437
15496
|
], 16);
|
|
15438
15497
|
}), 256)),
|
|
15439
15498
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
@@ -15443,37 +15502,36 @@ var VVPlot = (function(exports, vue) {
|
|
|
15443
15502
|
height: height.value,
|
|
15444
15503
|
x: -5
|
|
15445
15504
|
}, vue.toHandlers(axisVOn, true), {
|
|
15505
|
+
onPointerdown: axisMovePointerdown,
|
|
15446
15506
|
cursor: __props.action.some?.((a) => a.action == "move") ? "grab" : null
|
|
15447
15507
|
}), null, 16, _hoisted_4$2)
|
|
15448
15508
|
]),
|
|
15449
15509
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
15450
15510
|
__props.action.some?.((a) => a.action == "rescale") ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_5$1, [
|
|
15451
|
-
vue.createElementVNode("rect", {
|
|
15511
|
+
vue.createElementVNode("rect", vue.mergeProps({
|
|
15452
15512
|
width: 10,
|
|
15453
15513
|
height: 20,
|
|
15454
15514
|
x: -5,
|
|
15455
|
-
style: { "cursor": "ns-resize" }
|
|
15456
|
-
|
|
15457
|
-
}, null, 32),
|
|
15515
|
+
style: { "cursor": "ns-resize" }
|
|
15516
|
+
}, vue.toHandlers(axisVOn, true), { onPointerdown: axisRescaleTopPointerdown }), null, 16),
|
|
15458
15517
|
_cache[0] || (_cache[0] = vue.createTextVNode()),
|
|
15459
|
-
vue.createElementVNode("rect", {
|
|
15518
|
+
vue.createElementVNode("rect", vue.mergeProps({
|
|
15460
15519
|
width: 10,
|
|
15461
15520
|
height: 20,
|
|
15462
15521
|
x: -5,
|
|
15463
15522
|
y: height.value - 20,
|
|
15464
|
-
style: { "cursor": "ns-resize" }
|
|
15465
|
-
|
|
15466
|
-
}, null, 40, _hoisted_6$1)
|
|
15523
|
+
style: { "cursor": "ns-resize" }
|
|
15524
|
+
}, vue.toHandlers(axisVOn, true), { onPointerdown: axisRescaleBottomPointerdown }), null, 16, _hoisted_6$1)
|
|
15467
15525
|
])) : vue.createCommentVNode("", true),
|
|
15468
15526
|
_cache[5] || (_cache[5] = vue.createTextVNode()),
|
|
15469
|
-
axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key:
|
|
15470
|
-
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
15527
|
+
axisTitle.value.text ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
15528
|
+
__props.theme.title_type == "markdown" ? (vue.openBlock(), vue.createBlock(_sfc_main$14, vue.normalizeProps(vue.mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (vue.openBlock(), vue.createBlock(_sfc_main$15, vue.normalizeProps(vue.mergeProps({ key: 1 }, axisTitle.value)), null, 16))
|
|
15471
15529
|
], 64)) : vue.createCommentVNode("", true)
|
|
15472
15530
|
], 12, _hoisted_1$b);
|
|
15473
15531
|
};
|
|
15474
15532
|
}
|
|
15475
15533
|
};
|
|
15476
|
-
const _sfc_main
|
|
15534
|
+
const _sfc_main$10 = {
|
|
15477
15535
|
__name: "CoreAxis",
|
|
15478
15536
|
props: {
|
|
15479
15537
|
theme: { type: Object, default: () => ({}) },
|
|
@@ -15482,8 +15540,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
15482
15540
|
},
|
|
15483
15541
|
setup(__props) {
|
|
15484
15542
|
const axis = {
|
|
15485
|
-
h: _sfc_main$
|
|
15486
|
-
v: _sfc_main$
|
|
15543
|
+
h: _sfc_main$12,
|
|
15544
|
+
v: _sfc_main$11
|
|
15487
15545
|
};
|
|
15488
15546
|
return (_ctx, _cache) => {
|
|
15489
15547
|
return __props.position != "none" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(axis[__props.orientation]), {
|
|
@@ -15494,15 +15552,13 @@ var VVPlot = (function(exports, vue) {
|
|
|
15494
15552
|
};
|
|
15495
15553
|
}
|
|
15496
15554
|
};
|
|
15497
|
-
const _sfc_main
|
|
15555
|
+
const _sfc_main$$ = {
|
|
15498
15556
|
__name: "CoreGridH",
|
|
15499
15557
|
props: {
|
|
15500
|
-
|
|
15501
|
-
minorBreaks: { type: Array, default: () => [] },
|
|
15558
|
+
breaks: { type: Array, default: () => [] },
|
|
15502
15559
|
coord2pos: Function,
|
|
15503
15560
|
pos2coord: Function,
|
|
15504
15561
|
layout: Object,
|
|
15505
|
-
theme: { type: Object, default: () => ({}) },
|
|
15506
15562
|
action: { type: Object, default: () => ({}) },
|
|
15507
15563
|
activeTransform: Object,
|
|
15508
15564
|
transition: String
|
|
@@ -15512,20 +15568,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
15512
15568
|
const height = vue.computed(() => __props.layout.height + __props.layout.t + __props.layout.b);
|
|
15513
15569
|
const majorLines = vue.computed(() => {
|
|
15514
15570
|
let result = [];
|
|
15515
|
-
for (let
|
|
15516
|
-
|
|
15571
|
+
for (let b of __props.breaks) {
|
|
15572
|
+
if (b.type != "major") continue;
|
|
15573
|
+
let pos = __props.coord2pos({ v: b.value }).v;
|
|
15517
15574
|
if (isNaN(pos)) continue;
|
|
15518
15575
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15519
|
-
|
|
15520
|
-
if (
|
|
15576
|
+
pos += __props.layout.t;
|
|
15577
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15521
15578
|
result.push({
|
|
15522
|
-
key: "major-" +
|
|
15579
|
+
key: "major-" + b.value,
|
|
15523
15580
|
x1: 0,
|
|
15524
15581
|
x2: width.value,
|
|
15525
|
-
y1:
|
|
15526
|
-
y2:
|
|
15527
|
-
"stroke":
|
|
15528
|
-
"stroke-width":
|
|
15582
|
+
y1: pos,
|
|
15583
|
+
y2: pos,
|
|
15584
|
+
"stroke": b.theme.grid_color_major,
|
|
15585
|
+
"stroke-width": b.theme.grid_width_major ?? 0,
|
|
15529
15586
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15530
15587
|
style: { transition: __props.transition }
|
|
15531
15588
|
});
|
|
@@ -15534,21 +15591,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
15534
15591
|
});
|
|
15535
15592
|
const minorLines = vue.computed(() => {
|
|
15536
15593
|
let result = [];
|
|
15537
|
-
for (let
|
|
15538
|
-
if (
|
|
15539
|
-
let pos = __props.coord2pos({ v:
|
|
15594
|
+
for (let b of __props.breaks) {
|
|
15595
|
+
if (b.type != "minor") continue;
|
|
15596
|
+
let pos = __props.coord2pos({ v: b.value }).v;
|
|
15540
15597
|
if (isNaN(pos)) continue;
|
|
15541
15598
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15542
|
-
|
|
15543
|
-
if (
|
|
15599
|
+
pos += __props.layout.t;
|
|
15600
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15544
15601
|
result.push({
|
|
15545
|
-
key: "minor-" +
|
|
15602
|
+
key: "minor-" + b.value,
|
|
15546
15603
|
x1: 0,
|
|
15547
15604
|
x2: width.value,
|
|
15548
|
-
y1:
|
|
15549
|
-
y2:
|
|
15550
|
-
"stroke":
|
|
15551
|
-
"stroke-width":
|
|
15605
|
+
y1: pos,
|
|
15606
|
+
y2: pos,
|
|
15607
|
+
"stroke": b.theme.grid_color_minor,
|
|
15608
|
+
"stroke-width": b.theme.grid_width_minor ?? 0,
|
|
15552
15609
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15553
15610
|
style: { transition: __props.transition }
|
|
15554
15611
|
});
|
|
@@ -15567,15 +15624,13 @@ var VVPlot = (function(exports, vue) {
|
|
|
15567
15624
|
};
|
|
15568
15625
|
}
|
|
15569
15626
|
};
|
|
15570
|
-
const _sfc_main$
|
|
15627
|
+
const _sfc_main$_ = {
|
|
15571
15628
|
__name: "CoreGridV",
|
|
15572
15629
|
props: {
|
|
15573
|
-
|
|
15574
|
-
minorBreaks: { type: Array, default: () => [] },
|
|
15630
|
+
breaks: { type: Array, default: () => [] },
|
|
15575
15631
|
coord2pos: Function,
|
|
15576
15632
|
pos2coord: Function,
|
|
15577
15633
|
layout: Object,
|
|
15578
|
-
theme: { type: Object, default: () => ({}) },
|
|
15579
15634
|
action: { type: Object, default: () => ({}) },
|
|
15580
15635
|
activeTransform: Object,
|
|
15581
15636
|
transition: String
|
|
@@ -15585,20 +15640,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
15585
15640
|
const height = vue.computed(() => __props.layout.height + __props.layout.t + __props.layout.b);
|
|
15586
15641
|
const majorLines = vue.computed(() => {
|
|
15587
15642
|
let result = [];
|
|
15588
|
-
for (let
|
|
15589
|
-
|
|
15643
|
+
for (let b of __props.breaks) {
|
|
15644
|
+
if (b.type != "major") continue;
|
|
15645
|
+
let pos = __props.coord2pos({ h: b.value }).h;
|
|
15590
15646
|
if (isNaN(pos)) continue;
|
|
15591
15647
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
15592
|
-
|
|
15593
|
-
if (
|
|
15648
|
+
pos += __props.layout.l;
|
|
15649
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
15594
15650
|
result.push({
|
|
15595
|
-
key: "major-" +
|
|
15651
|
+
key: "major-" + b.value,
|
|
15596
15652
|
y1: 0,
|
|
15597
15653
|
y2: height.value,
|
|
15598
|
-
x1:
|
|
15599
|
-
x2:
|
|
15600
|
-
"stroke":
|
|
15601
|
-
"stroke-width":
|
|
15654
|
+
x1: pos,
|
|
15655
|
+
x2: pos,
|
|
15656
|
+
"stroke": b.theme.grid_color_major,
|
|
15657
|
+
"stroke-width": b.theme.grid_width_major ?? 0,
|
|
15602
15658
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
15603
15659
|
style: { transition: __props.transition }
|
|
15604
15660
|
});
|
|
@@ -15607,21 +15663,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
15607
15663
|
});
|
|
15608
15664
|
const minorLines = vue.computed(() => {
|
|
15609
15665
|
let result = [];
|
|
15610
|
-
for (let
|
|
15611
|
-
if (
|
|
15612
|
-
let pos = __props.coord2pos({ h:
|
|
15666
|
+
for (let b of __props.breaks) {
|
|
15667
|
+
if (b.type != "minor") continue;
|
|
15668
|
+
let pos = __props.coord2pos({ h: b.value }).h;
|
|
15613
15669
|
if (isNaN(pos)) continue;
|
|
15614
15670
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
15615
|
-
|
|
15616
|
-
if (
|
|
15671
|
+
pos += __props.layout.l;
|
|
15672
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
15617
15673
|
result.push({
|
|
15618
|
-
key: "minor-" +
|
|
15674
|
+
key: "minor-" + b.value,
|
|
15619
15675
|
y1: 0,
|
|
15620
15676
|
y2: height.value,
|
|
15621
|
-
x1:
|
|
15622
|
-
x2:
|
|
15623
|
-
"stroke":
|
|
15624
|
-
"stroke-width":
|
|
15677
|
+
x1: pos,
|
|
15678
|
+
x2: pos,
|
|
15679
|
+
"stroke": b.theme.grid_color_minor,
|
|
15680
|
+
"stroke-width": b.theme.grid_width_minor ?? 0,
|
|
15625
15681
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
15626
15682
|
style: { transition: __props.transition }
|
|
15627
15683
|
});
|
|
@@ -15640,7 +15696,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15640
15696
|
};
|
|
15641
15697
|
}
|
|
15642
15698
|
};
|
|
15643
|
-
const _sfc_main$
|
|
15699
|
+
const _sfc_main$Z = {
|
|
15644
15700
|
__name: "CoreCanvasBoxplot",
|
|
15645
15701
|
props: {
|
|
15646
15702
|
extendX: { type: Number, default: 0 },
|
|
@@ -15787,7 +15843,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15787
15843
|
};
|
|
15788
15844
|
}
|
|
15789
15845
|
};
|
|
15790
|
-
const _sfc_main$
|
|
15846
|
+
const _sfc_main$Y = {
|
|
15791
15847
|
__name: "CoreCanvasCurve",
|
|
15792
15848
|
props: {
|
|
15793
15849
|
extendX: { type: Number, default: 0 },
|
|
@@ -15893,7 +15949,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15893
15949
|
};
|
|
15894
15950
|
}
|
|
15895
15951
|
};
|
|
15896
|
-
const _sfc_main$
|
|
15952
|
+
const _sfc_main$X = {
|
|
15897
15953
|
__name: "CoreCanvasEllipse",
|
|
15898
15954
|
props: {
|
|
15899
15955
|
extendX: { type: Number, default: 0 },
|
|
@@ -15945,14 +16001,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
15945
16001
|
} of group) {
|
|
15946
16002
|
let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
|
|
15947
16003
|
const { h: ch, v: cv } = __props.coord2pos({ x: cx, y: cy });
|
|
15948
|
-
let {
|
|
15949
|
-
let scaleX = (
|
|
16004
|
+
let { h: h1, v: v1 } = __props.coord2pos({ x: cx - dx, y: cy - dy }), { h: h2, v: v2 } = __props.coord2pos({ x: cx + dx, y: cy + dy });
|
|
16005
|
+
let scaleX = (h2 - h1) / (2 * dx), scaleY = (v2 - v1) / (2 * dy);
|
|
15950
16006
|
A /= scaleX * scaleX;
|
|
15951
16007
|
B /= scaleX * scaleY;
|
|
15952
16008
|
C /= scaleY * scaleY;
|
|
15953
16009
|
const tr = A + C, det = A * C - B * B;
|
|
15954
16010
|
const disc = Math.sqrt(Math.max(0, tr * tr / 4 - det));
|
|
15955
|
-
let rx2 = 1 / Math.sqrt(tr / 2 + disc), ry = 1 / Math.sqrt(tr / 2 - disc), angle2 =
|
|
16011
|
+
let rx2 = 1 / Math.sqrt(tr / 2 + disc), ry = 1 / Math.sqrt(tr / 2 - disc), angle2 = Math.atan2(2 * B, A - C) / 2;
|
|
15956
16012
|
const path2d = new Path2D();
|
|
15957
16013
|
path2d.ellipse(ch + translateX, cv + translateY, rx2, ry, angle2, 0, 2 * Math.PI);
|
|
15958
16014
|
_path_data.set(path2d, $raw);
|
|
@@ -15998,7 +16054,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
15998
16054
|
};
|
|
15999
16055
|
}
|
|
16000
16056
|
};
|
|
16001
|
-
const _sfc_main$
|
|
16057
|
+
const _sfc_main$W = {
|
|
16002
16058
|
__name: "CoreCanvasLine",
|
|
16003
16059
|
props: {
|
|
16004
16060
|
extendX: { type: Number, default: 0 },
|
|
@@ -16091,7 +16147,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16091
16147
|
};
|
|
16092
16148
|
}
|
|
16093
16149
|
};
|
|
16094
|
-
const _sfc_main$
|
|
16150
|
+
const _sfc_main$V = {
|
|
16095
16151
|
__name: "CoreCanvasPoint",
|
|
16096
16152
|
props: {
|
|
16097
16153
|
extendX: { type: Number, default: 0 },
|
|
@@ -16111,7 +16167,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
16111
16167
|
diamond: (s) => `M0-${s * 0.707}L${s * 0.707},0L0,${s * 0.707}L-${s * 0.707},0Z`,
|
|
16112
16168
|
square: (s) => `M-${s / 2}-${s / 2}H${s / 2}V${s / 2}H-${s / 2}Z`,
|
|
16113
16169
|
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`,
|
|
16114
|
-
|
|
16170
|
+
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`,
|
|
16171
|
+
arrowhead: (s) => `M0,0L${s},${-s * 0.38}V${s * 0.38}Z`
|
|
16115
16172
|
};
|
|
16116
16173
|
const vBind = vue.computed(() => ({
|
|
16117
16174
|
width: __props.layout.fullWidth * (1 + __props.extendX * 2),
|
|
@@ -16145,19 +16202,25 @@ var VVPlot = (function(exports, vue) {
|
|
|
16145
16202
|
alpha: alpha2,
|
|
16146
16203
|
"translate-x": translateX = 0,
|
|
16147
16204
|
"translate-y": translateY = 0,
|
|
16205
|
+
angle: angle2 = 0,
|
|
16148
16206
|
$raw
|
|
16149
16207
|
} of group) {
|
|
16150
16208
|
const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
|
|
16209
|
+
if (typeof angle2 == "object") {
|
|
16210
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16211
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16212
|
+
angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
|
|
16213
|
+
}
|
|
16151
16214
|
const path2d = new Path2D();
|
|
16152
16215
|
if (String(shape).startsWith("path:")) {
|
|
16153
16216
|
path2d.addPath(
|
|
16154
16217
|
new Path2D(shape.slice(5)),
|
|
16155
|
-
new DOMMatrix().translateSelf(cx + translateX, cy + translateY)
|
|
16218
|
+
new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
|
|
16156
16219
|
);
|
|
16157
16220
|
} else if (shape in paths) {
|
|
16158
16221
|
path2d.addPath(
|
|
16159
16222
|
new Path2D(paths[shape](size)),
|
|
16160
|
-
new DOMMatrix().translate(cx + translateX, cy + translateY)
|
|
16223
|
+
new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
|
|
16161
16224
|
);
|
|
16162
16225
|
} else {
|
|
16163
16226
|
path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
|
|
@@ -16206,7 +16269,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16206
16269
|
};
|
|
16207
16270
|
}
|
|
16208
16271
|
};
|
|
16209
|
-
const _sfc_main$
|
|
16272
|
+
const _sfc_main$U = {
|
|
16210
16273
|
__name: "CoreCanvasPolygon",
|
|
16211
16274
|
props: {
|
|
16212
16275
|
extendX: { type: Number, default: 0 },
|
|
@@ -16303,7 +16366,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16303
16366
|
};
|
|
16304
16367
|
}
|
|
16305
16368
|
};
|
|
16306
|
-
const _sfc_main$
|
|
16369
|
+
const _sfc_main$T = {
|
|
16307
16370
|
__name: "CoreCanvasRect",
|
|
16308
16371
|
props: {
|
|
16309
16372
|
extendX: { type: Number, default: 0 },
|
|
@@ -16398,7 +16461,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16398
16461
|
};
|
|
16399
16462
|
}
|
|
16400
16463
|
};
|
|
16401
|
-
const _sfc_main$
|
|
16464
|
+
const _sfc_main$S = {
|
|
16402
16465
|
__name: "CoreCanvasText",
|
|
16403
16466
|
props: {
|
|
16404
16467
|
extendX: { type: Number, default: 0 },
|
|
@@ -16472,6 +16535,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
16472
16535
|
} else if (textLength != null) {
|
|
16473
16536
|
width = textLength;
|
|
16474
16537
|
}
|
|
16538
|
+
if (typeof angle2 == "object") {
|
|
16539
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16540
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16541
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
16542
|
+
}
|
|
16475
16543
|
if (dockX != null || dockY != null) {
|
|
16476
16544
|
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);
|
|
16477
16545
|
if (isNaN(alnX)) alnX = 0.5;
|
|
@@ -16528,7 +16596,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16528
16596
|
};
|
|
16529
16597
|
}
|
|
16530
16598
|
};
|
|
16531
|
-
const _sfc_main$
|
|
16599
|
+
const _sfc_main$R = {
|
|
16532
16600
|
__name: "CoreCanvasTextsegment",
|
|
16533
16601
|
props: {
|
|
16534
16602
|
extendX: { type: Number, default: 0 },
|
|
@@ -16702,19 +16770,19 @@ var VVPlot = (function(exports, vue) {
|
|
|
16702
16770
|
};
|
|
16703
16771
|
const canvas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16704
16772
|
__proto__: null,
|
|
16705
|
-
boxplot: _sfc_main$
|
|
16706
|
-
curve: _sfc_main$
|
|
16707
|
-
ellipse: _sfc_main$
|
|
16708
|
-
line: _sfc_main$
|
|
16709
|
-
point: _sfc_main$
|
|
16710
|
-
polygon: _sfc_main$
|
|
16711
|
-
rect: _sfc_main$
|
|
16712
|
-
stick: _sfc_main$
|
|
16713
|
-
text: _sfc_main$
|
|
16714
|
-
textsegment: _sfc_main$
|
|
16715
|
-
tile: _sfc_main$
|
|
16773
|
+
boxplot: _sfc_main$Z,
|
|
16774
|
+
curve: _sfc_main$Y,
|
|
16775
|
+
ellipse: _sfc_main$X,
|
|
16776
|
+
line: _sfc_main$W,
|
|
16777
|
+
point: _sfc_main$V,
|
|
16778
|
+
polygon: _sfc_main$U,
|
|
16779
|
+
rect: _sfc_main$T,
|
|
16780
|
+
stick: _sfc_main$W,
|
|
16781
|
+
text: _sfc_main$S,
|
|
16782
|
+
textsegment: _sfc_main$R,
|
|
16783
|
+
tile: _sfc_main$T
|
|
16716
16784
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16717
|
-
const _sfc_main$
|
|
16785
|
+
const _sfc_main$Q = {
|
|
16718
16786
|
__name: "CoreSvgBlank",
|
|
16719
16787
|
props: {
|
|
16720
16788
|
extendX: { type: Number, default: 0 },
|
|
@@ -16734,7 +16802,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16734
16802
|
}
|
|
16735
16803
|
};
|
|
16736
16804
|
const _hoisted_1$a = { key: 0 };
|
|
16737
|
-
const _sfc_main$
|
|
16805
|
+
const _sfc_main$P = {
|
|
16738
16806
|
__name: "CoreTile",
|
|
16739
16807
|
props: {
|
|
16740
16808
|
x: { type: Number, default: 0 },
|
|
@@ -16776,7 +16844,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16776
16844
|
};
|
|
16777
16845
|
const _hoisted_1$9 = { key: 0 };
|
|
16778
16846
|
const _hoisted_2$4 = { key: 0 };
|
|
16779
|
-
const _sfc_main$
|
|
16847
|
+
const _sfc_main$O = {
|
|
16780
16848
|
__name: "CorePoint",
|
|
16781
16849
|
props: {
|
|
16782
16850
|
x: { type: Number, default: 0 },
|
|
@@ -16785,7 +16853,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16785
16853
|
size: { type: Number, default: 6 },
|
|
16786
16854
|
color: String,
|
|
16787
16855
|
stroke: String,
|
|
16788
|
-
linewidth: Number,
|
|
16856
|
+
linewidth: { type: Number, default: 1 },
|
|
16789
16857
|
linetype: String,
|
|
16790
16858
|
alpha: { type: Number, default: 1 },
|
|
16791
16859
|
title: String,
|
|
@@ -16800,7 +16868,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
16800
16868
|
triangle: "M0-0.667L0.577,0.333L-0.577,0.333Z",
|
|
16801
16869
|
diamond: "M0-0.707L0.707,0L0,0.707L-0.707,0Z",
|
|
16802
16870
|
plus: "M-0.1-0.5V-0.1H-0.5V0.1H-0.1V0.5H0.1V0.1H0.5V-0.1H0.1V-0.5H-0.1Z",
|
|
16803
|
-
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"
|
|
16871
|
+
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",
|
|
16872
|
+
arrowhead: "M0,0L1,0.38V-0.38Z"
|
|
16804
16873
|
};
|
|
16805
16874
|
const binds = vue.computed(() => {
|
|
16806
16875
|
let d = __props.shape?.startsWith?.("path:") ? __props.shape?.slice?.(5) : paths[__props.shape];
|
|
@@ -16809,7 +16878,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
16809
16878
|
fill: __props.color || null,
|
|
16810
16879
|
"fill-opacity": __props.alpha == 1 ? null : __props.alpha,
|
|
16811
16880
|
stroke: __props.stroke || null,
|
|
16812
|
-
"stroke-width": __props.linewidth,
|
|
16813
16881
|
"stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
|
|
16814
16882
|
"stroke-dasharray": parseLinetype(__props.linetype).join(" ") || null
|
|
16815
16883
|
};
|
|
@@ -16818,10 +16886,10 @@ var VVPlot = (function(exports, vue) {
|
|
|
16818
16886
|
if (tslX !== 0 || tslY !== 0) transform.push(`translate(${tslX},${tslY})`);
|
|
16819
16887
|
if (__props.size != 1) transform.push(`scale(${__props.size})`);
|
|
16820
16888
|
if (__props.angle) transform.push(`rotate(${__props.angle})`);
|
|
16821
|
-
Object.assign(result, { d, transform: transform.join(" ") || null });
|
|
16889
|
+
Object.assign(result, { d, transform: transform.join(" ") || null, "stroke-width": __props.linewidth / __props.size });
|
|
16822
16890
|
} else {
|
|
16823
16891
|
let transform = __props.translateX || __props.translateY ? `translate(${__props.translateX}, ${__props.translateY})` : null;
|
|
16824
|
-
Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform });
|
|
16892
|
+
Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform, "stroke-width": __props.linewidth });
|
|
16825
16893
|
}
|
|
16826
16894
|
return result;
|
|
16827
16895
|
});
|
|
@@ -16835,7 +16903,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16835
16903
|
}
|
|
16836
16904
|
};
|
|
16837
16905
|
const _hoisted_1$8 = { key: 0 };
|
|
16838
|
-
const _sfc_main$
|
|
16906
|
+
const _sfc_main$N = {
|
|
16839
16907
|
__name: "CoreLine",
|
|
16840
16908
|
props: {
|
|
16841
16909
|
x1: { type: Number, default: 0 },
|
|
@@ -16873,7 +16941,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
16873
16941
|
};
|
|
16874
16942
|
}
|
|
16875
16943
|
};
|
|
16876
|
-
const _sfc_main$
|
|
16944
|
+
const _sfc_main$M = {
|
|
16877
16945
|
__name: "CoreSvgBoxplot",
|
|
16878
16946
|
props: {
|
|
16879
16947
|
extendX: { type: Number, default: 0 },
|
|
@@ -17036,18 +17104,18 @@ var VVPlot = (function(exports, vue) {
|
|
|
17036
17104
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17037
17105
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbinds, von]) => {
|
|
17038
17106
|
return vue.openBlock(), vue.createElementBlock("g", null, [
|
|
17039
|
-
vue.createVNode(_sfc_main$
|
|
17107
|
+
vue.createVNode(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
|
|
17040
17108
|
_cache[0] || (_cache[0] = vue.createTextVNode()),
|
|
17041
|
-
vue.createVNode(_sfc_main$
|
|
17109
|
+
vue.createVNode(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbinds.rect, vue.toHandlers(von)), null, 16),
|
|
17042
17110
|
_cache[1] || (_cache[1] = vue.createTextVNode()),
|
|
17043
|
-
vue.createVNode(_sfc_main$
|
|
17111
|
+
vue.createVNode(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbinds.midline), null, 16),
|
|
17044
17112
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
17045
|
-
vue.createVNode(_sfc_main$
|
|
17113
|
+
vue.createVNode(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
|
|
17046
17114
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
17047
|
-
vue.createVNode(_sfc_main$
|
|
17115
|
+
vue.createVNode(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
|
|
17048
17116
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
17049
17117
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vbinds.outliers, ([vbind, von2]) => {
|
|
17050
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17118
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von2)), null, 16);
|
|
17051
17119
|
}), 256))
|
|
17052
17120
|
]);
|
|
17053
17121
|
}), 256))
|
|
@@ -17058,7 +17126,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17058
17126
|
}
|
|
17059
17127
|
};
|
|
17060
17128
|
const _hoisted_1$7 = { key: 0 };
|
|
17061
|
-
const _sfc_main$
|
|
17129
|
+
const _sfc_main$L = {
|
|
17062
17130
|
__name: "CoreCurve",
|
|
17063
17131
|
props: {
|
|
17064
17132
|
points: { type: Array, default: () => [] },
|
|
@@ -17101,7 +17169,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17101
17169
|
};
|
|
17102
17170
|
}
|
|
17103
17171
|
};
|
|
17104
|
-
const _sfc_main$
|
|
17172
|
+
const _sfc_main$K = {
|
|
17105
17173
|
__name: "CoreSvgCurve",
|
|
17106
17174
|
props: {
|
|
17107
17175
|
extendX: { type: Number, default: 0 },
|
|
@@ -17129,6 +17197,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
17129
17197
|
title,
|
|
17130
17198
|
"translate-x": translateX = 0,
|
|
17131
17199
|
"translate-y": translateY = 0,
|
|
17200
|
+
"marker-start": markerStart,
|
|
17201
|
+
"marker-end": markerEnd,
|
|
17132
17202
|
class: className,
|
|
17133
17203
|
style,
|
|
17134
17204
|
$raw,
|
|
@@ -17146,6 +17216,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
17146
17216
|
title,
|
|
17147
17217
|
translateX,
|
|
17148
17218
|
translateY,
|
|
17219
|
+
"marker-start": markerStart,
|
|
17220
|
+
"marker-end": markerEnd,
|
|
17149
17221
|
class: className,
|
|
17150
17222
|
style,
|
|
17151
17223
|
interpolate: interpolate2
|
|
@@ -17161,7 +17233,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17161
17233
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17162
17234
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17163
17235
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17164
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17236
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$L, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17165
17237
|
}), 256))
|
|
17166
17238
|
], 16);
|
|
17167
17239
|
}), 256))
|
|
@@ -17170,7 +17242,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17170
17242
|
}
|
|
17171
17243
|
};
|
|
17172
17244
|
const _hoisted_1$6 = { key: 0 };
|
|
17173
|
-
const _sfc_main$
|
|
17245
|
+
const _sfc_main$J = {
|
|
17174
17246
|
__name: "CoreEllipse",
|
|
17175
17247
|
props: {
|
|
17176
17248
|
cx: { type: Number, default: 0 },
|
|
@@ -17215,7 +17287,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17215
17287
|
};
|
|
17216
17288
|
}
|
|
17217
17289
|
};
|
|
17218
|
-
const _sfc_main$
|
|
17290
|
+
const _sfc_main$I = {
|
|
17219
17291
|
__name: "CoreSvgEllipse",
|
|
17220
17292
|
props: {
|
|
17221
17293
|
extendX: { type: Number, default: 0 },
|
|
@@ -17253,9 +17325,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
17253
17325
|
}) => {
|
|
17254
17326
|
let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
|
|
17255
17327
|
const { h: ch, v: cv } = __props.coord2pos({ x: cx, y: cy });
|
|
17256
|
-
let {
|
|
17257
|
-
if (
|
|
17258
|
-
let scaleX = (
|
|
17328
|
+
let { h: h1, v: v1 } = __props.coord2pos({ x: cx - dx, y: cy - dy }), { h: h2, v: v2 } = __props.coord2pos({ x: cx + dx, y: cy + dy });
|
|
17329
|
+
if (h1 < xlim_min && h2 < xlim_min || h2 > xlim_max && h1 > xlim_max || v1 < ylim_min && v2 < ylim_min || v2 > ylim_max && v1 > ylim_max) return null;
|
|
17330
|
+
let scaleX = (h2 - h1) / (2 * dx), scaleY = (v2 - v1) / (2 * dy);
|
|
17259
17331
|
A /= scaleX * scaleX;
|
|
17260
17332
|
B /= scaleX * scaleY;
|
|
17261
17333
|
C /= scaleY * scaleY;
|
|
@@ -17266,7 +17338,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17266
17338
|
cy: cv,
|
|
17267
17339
|
rx: 1 / Math.sqrt(tr / 2 + disc) || 0,
|
|
17268
17340
|
ry: 1 / Math.sqrt(tr / 2 - disc) || 0,
|
|
17269
|
-
angle:
|
|
17341
|
+
angle: Math.atan2(2 * B, A - C) / 2 * 180 / Math.PI || 0,
|
|
17270
17342
|
fill,
|
|
17271
17343
|
color: color2,
|
|
17272
17344
|
linetype,
|
|
@@ -17289,7 +17361,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17289
17361
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17290
17362
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17291
17363
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17292
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17364
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$J, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17293
17365
|
}), 256))
|
|
17294
17366
|
], 16);
|
|
17295
17367
|
}), 256))
|
|
@@ -17297,7 +17369,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17297
17369
|
};
|
|
17298
17370
|
}
|
|
17299
17371
|
};
|
|
17300
|
-
const _sfc_main$
|
|
17372
|
+
const _sfc_main$H = {
|
|
17301
17373
|
__name: "CoreSvgLine",
|
|
17302
17374
|
props: {
|
|
17303
17375
|
extendX: { type: Number, default: 0 },
|
|
@@ -17327,6 +17399,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
17327
17399
|
title,
|
|
17328
17400
|
"translate-x": translateX = 0,
|
|
17329
17401
|
"translate-y": translateY = 0,
|
|
17402
|
+
"marker-start": markerStart,
|
|
17403
|
+
"marker-end": markerEnd,
|
|
17330
17404
|
class: className,
|
|
17331
17405
|
style,
|
|
17332
17406
|
$raw
|
|
@@ -17346,6 +17420,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
17346
17420
|
title,
|
|
17347
17421
|
translateX,
|
|
17348
17422
|
translateY,
|
|
17423
|
+
"marker-start": markerStart,
|
|
17424
|
+
"marker-end": markerEnd,
|
|
17349
17425
|
class: className,
|
|
17350
17426
|
style
|
|
17351
17427
|
};
|
|
@@ -17360,7 +17436,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17360
17436
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17361
17437
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17362
17438
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17363
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17439
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17364
17440
|
}), 256))
|
|
17365
17441
|
], 16);
|
|
17366
17442
|
}), 256))
|
|
@@ -17368,7 +17444,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17368
17444
|
};
|
|
17369
17445
|
}
|
|
17370
17446
|
};
|
|
17371
|
-
const _sfc_main$
|
|
17447
|
+
const _sfc_main$G = {
|
|
17372
17448
|
__name: "CoreSvgMarkdown",
|
|
17373
17449
|
props: {
|
|
17374
17450
|
extendX: { type: Number, default: 0 },
|
|
@@ -17419,6 +17495,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
17419
17495
|
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 });
|
|
17420
17496
|
textLength = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
|
|
17421
17497
|
}
|
|
17498
|
+
if (typeof angle2 == "object") {
|
|
17499
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
17500
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
17501
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
17502
|
+
}
|
|
17422
17503
|
let vbind = {
|
|
17423
17504
|
x: tx,
|
|
17424
17505
|
y: ty,
|
|
@@ -17454,7 +17535,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17454
17535
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17455
17536
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17456
17537
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17457
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17538
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$14, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17458
17539
|
}), 256))
|
|
17459
17540
|
], 16);
|
|
17460
17541
|
}), 256))
|
|
@@ -17462,7 +17543,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17462
17543
|
};
|
|
17463
17544
|
}
|
|
17464
17545
|
};
|
|
17465
|
-
const _sfc_main$
|
|
17546
|
+
const _sfc_main$F = {
|
|
17466
17547
|
__name: "CoreSvgMarkdownsegment",
|
|
17467
17548
|
props: {
|
|
17468
17549
|
extendX: { type: Number, default: 0 },
|
|
@@ -17495,6 +17576,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
17495
17576
|
alpha: alpha2,
|
|
17496
17577
|
"translate-x": translateX = 0,
|
|
17497
17578
|
"translate-y": translateY = 0,
|
|
17579
|
+
"anchor-x": anchorX,
|
|
17580
|
+
"anchor-y": anchorY = 0.5,
|
|
17498
17581
|
"font-family": fontFamily = "sans-serif",
|
|
17499
17582
|
"text-align": textAlign = "start",
|
|
17500
17583
|
inset = 0,
|
|
@@ -17508,140 +17591,72 @@ var VVPlot = (function(exports, vue) {
|
|
|
17508
17591
|
if (x1 < xlim_min && x22 < xlim_min || x1 > xlim_max && x22 > xlim_max || y1 < ylim_min && y22 < ylim_min || y1 > ylim_max && y22 > ylim_max) return null;
|
|
17509
17592
|
let radian = Math.atan2(y22 - y1, x22 - x1);
|
|
17510
17593
|
let vbind = {
|
|
17511
|
-
|
|
17512
|
-
|
|
17513
|
-
|
|
17514
|
-
|
|
17515
|
-
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
|
|
17594
|
+
text: String(label),
|
|
17595
|
+
title: String(title ?? label),
|
|
17596
|
+
color: color2,
|
|
17597
|
+
alpha: alpha2,
|
|
17598
|
+
size,
|
|
17599
|
+
stroke,
|
|
17600
|
+
linewidth,
|
|
17601
|
+
linetype,
|
|
17602
|
+
fontFamily,
|
|
17520
17603
|
class: className,
|
|
17521
17604
|
style
|
|
17522
17605
|
};
|
|
17523
17606
|
let von = Object.fromEntries(
|
|
17524
17607
|
events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
|
|
17525
17608
|
);
|
|
17526
|
-
let tx, ty
|
|
17609
|
+
let tx, ty;
|
|
17527
17610
|
switch (textAlign) {
|
|
17528
17611
|
case "stretch":
|
|
17529
17612
|
tx = (x1 + x22) / 2;
|
|
17530
17613
|
ty = (y1 + y22) / 2;
|
|
17531
|
-
|
|
17614
|
+
anchorX = 0.5;
|
|
17532
17615
|
vbind.textLength = Math.hypot(x22 - x1 || 0, y22 - y1 || 0);
|
|
17533
|
-
vbind.lengthAdjust = "spacingAndGlyphs";
|
|
17534
17616
|
break;
|
|
17535
17617
|
case "center":
|
|
17536
17618
|
tx = (x1 + x22) / 2;
|
|
17537
17619
|
ty = (y1 + y22) / 2;
|
|
17538
|
-
|
|
17620
|
+
anchorX ??= 0.5;
|
|
17539
17621
|
break;
|
|
17540
17622
|
case "pre":
|
|
17541
17623
|
tx = x1;
|
|
17542
17624
|
ty = y1;
|
|
17543
17625
|
translateX -= Math.cos(radian) * inset;
|
|
17544
17626
|
translateY -= Math.sin(radian) * inset;
|
|
17545
|
-
|
|
17627
|
+
anchorX ??= 1;
|
|
17546
17628
|
break;
|
|
17547
17629
|
case "end":
|
|
17548
17630
|
tx = x22;
|
|
17549
17631
|
ty = y22;
|
|
17550
17632
|
translateX -= Math.cos(radian) * inset;
|
|
17551
17633
|
translateY -= Math.sin(radian) * inset;
|
|
17552
|
-
|
|
17634
|
+
anchorX ??= 1;
|
|
17553
17635
|
break;
|
|
17554
17636
|
case "post":
|
|
17555
17637
|
tx = x22;
|
|
17556
17638
|
ty = y22;
|
|
17557
17639
|
translateX += Math.cos(radian) * inset;
|
|
17558
17640
|
translateY += Math.sin(radian) * inset;
|
|
17559
|
-
|
|
17641
|
+
anchorX ??= 0;
|
|
17560
17642
|
break;
|
|
17561
17643
|
default:
|
|
17562
17644
|
tx = x1;
|
|
17563
17645
|
ty = y1;
|
|
17564
17646
|
translateX += Math.cos(radian) * inset;
|
|
17565
17647
|
translateY += Math.sin(radian) * inset;
|
|
17566
|
-
|
|
17648
|
+
anchorX ??= 0;
|
|
17567
17649
|
}
|
|
17568
|
-
|
|
17569
|
-
|
|
17570
|
-
if (radian) transform.push(`rotate(${radian * 180 / Math.PI})`);
|
|
17571
|
-
Object.assign(vbind, {
|
|
17572
|
-
x: tx,
|
|
17573
|
-
y: ty,
|
|
17574
|
-
"dominant-baseline": "central",
|
|
17575
|
-
"transform-origin": `${tx} ${ty}`,
|
|
17576
|
-
transform: transform.join(" ") || null
|
|
17577
|
-
});
|
|
17578
|
-
return [vbind, von, content, String(title ?? String(label).replace(/\x01|\x02/g, ""))];
|
|
17650
|
+
Object.assign(vbind, { x: tx, y: ty, translateX, translateY, anchorX, anchorY, angle: radian * 180 / Math.PI });
|
|
17651
|
+
return [vbind, von];
|
|
17579
17652
|
}).filter((x2) => x2 != null));
|
|
17580
17653
|
});
|
|
17581
|
-
const parser = new Parser();
|
|
17582
|
-
function parseMarkdownInline(markdown2) {
|
|
17583
|
-
const walker = parser.parse(markdown2).walker();
|
|
17584
|
-
const fragments = [];
|
|
17585
|
-
let stack2 = [], scales = [1], offset = 0;
|
|
17586
|
-
let ev;
|
|
17587
|
-
while (ev = walker.next()) {
|
|
17588
|
-
let { node: { type, literal }, entering } = ev;
|
|
17589
|
-
let scale = scales.at(-1);
|
|
17590
|
-
if (entering) {
|
|
17591
|
-
if (type === "text" || type === "code") {
|
|
17592
|
-
const vbind = Object.assign({
|
|
17593
|
-
dy: str_c(offset || null, "em")
|
|
17594
|
-
}, ...stack2, {
|
|
17595
|
-
"font-family": type === "code" ? "monospace" : null,
|
|
17596
|
-
"font-size": scale === 1 ? null : `${scale}em`
|
|
17597
|
-
});
|
|
17598
|
-
offset = 0;
|
|
17599
|
-
fragments.push({ text: literal, vbind });
|
|
17600
|
-
} else if (type === "strong") {
|
|
17601
|
-
stack2.push({ "font-weight": "bold" });
|
|
17602
|
-
} else if (type === "emph") {
|
|
17603
|
-
stack2.push({ "font-style": "italic" });
|
|
17604
|
-
} else if (type === "softbreak" || type === "paragraph") {
|
|
17605
|
-
fragments.push({ text: " " });
|
|
17606
|
-
} else if (type === "html_inline") {
|
|
17607
|
-
const tag2 = literal;
|
|
17608
|
-
if (tag2.includes("color=")) {
|
|
17609
|
-
const fill = tag2.match(/color=(['"])(.*?)\1/i)?.[2] ?? tag2.match(/color=(\S*)/)?.[1];
|
|
17610
|
-
if (fill) stack2.push({ fill });
|
|
17611
|
-
} else if (tag2.includes("</font>")) {
|
|
17612
|
-
stack2.pop();
|
|
17613
|
-
} else if (tag2.includes("<sup>")) {
|
|
17614
|
-
offset -= 0.4 * scale;
|
|
17615
|
-
scales.push(scale * 0.7);
|
|
17616
|
-
} else if (tag2.includes("</sup>")) {
|
|
17617
|
-
offset += 0.4 * scales.at(-1);
|
|
17618
|
-
scales.pop();
|
|
17619
|
-
} else if (tag2.includes("<sub>")) {
|
|
17620
|
-
offset += 0.25 * scale;
|
|
17621
|
-
scales.push(scale * 0.7);
|
|
17622
|
-
} else if (tag2.includes("</sub>")) {
|
|
17623
|
-
offset -= 0.25 * scales.at(-1);
|
|
17624
|
-
scales.pop();
|
|
17625
|
-
}
|
|
17626
|
-
}
|
|
17627
|
-
} else {
|
|
17628
|
-
if (["strong", "emph"].includes(type)) stack2.pop();
|
|
17629
|
-
}
|
|
17630
|
-
}
|
|
17631
|
-
return fragments;
|
|
17632
|
-
}
|
|
17633
17654
|
return (_ctx, _cache) => {
|
|
17634
17655
|
return vue.openBlock(), vue.createElementBlock("g", null, [
|
|
17635
17656
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17636
17657
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17637
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von
|
|
17638
|
-
return vue.openBlock(), vue.
|
|
17639
|
-
vue.createElementVNode("title", null, vue.toDisplayString(title), 1),
|
|
17640
|
-
_cache[0] || (_cache[0] = vue.createTextVNode()),
|
|
17641
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(textFragments, (tspan) => {
|
|
17642
|
-
return vue.openBlock(), vue.createElementBlock("tspan", vue.mergeProps({ ref_for: true }, tspan.vbind), vue.toDisplayString(tspan.text), 17);
|
|
17643
|
-
}), 256))
|
|
17644
|
-
], 16);
|
|
17658
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17659
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$14, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17645
17660
|
}), 256))
|
|
17646
17661
|
], 16);
|
|
17647
17662
|
}), 256))
|
|
@@ -17649,7 +17664,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17649
17664
|
};
|
|
17650
17665
|
}
|
|
17651
17666
|
};
|
|
17652
|
-
const _sfc_main$
|
|
17667
|
+
const _sfc_main$E = {
|
|
17653
17668
|
__name: "CoreSvgPoint",
|
|
17654
17669
|
props: {
|
|
17655
17670
|
extendX: { type: Number, default: 0 },
|
|
@@ -17687,6 +17702,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
17687
17702
|
}) => {
|
|
17688
17703
|
const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
|
|
17689
17704
|
if (cx < xlim_min || cx > xlim_max || cy < ylim_min || cy > ylim_max) return null;
|
|
17705
|
+
if (typeof angle2 == "object") {
|
|
17706
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
17707
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
17708
|
+
angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
|
|
17709
|
+
}
|
|
17690
17710
|
let vbind = {
|
|
17691
17711
|
x: cx,
|
|
17692
17712
|
y: cy,
|
|
@@ -17715,7 +17735,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17715
17735
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17716
17736
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17717
17737
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17718
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17738
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17719
17739
|
}), 256))
|
|
17720
17740
|
], 16);
|
|
17721
17741
|
}), 256))
|
|
@@ -17724,7 +17744,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17724
17744
|
}
|
|
17725
17745
|
};
|
|
17726
17746
|
const _hoisted_1$5 = { key: 0 };
|
|
17727
|
-
const _sfc_main$
|
|
17747
|
+
const _sfc_main$D = {
|
|
17728
17748
|
__name: "CorePolygon",
|
|
17729
17749
|
props: {
|
|
17730
17750
|
points: { type: Array, default: () => [] },
|
|
@@ -17758,7 +17778,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17758
17778
|
};
|
|
17759
17779
|
}
|
|
17760
17780
|
};
|
|
17761
|
-
const _sfc_main$
|
|
17781
|
+
const _sfc_main$C = {
|
|
17762
17782
|
__name: "CoreSvgPolygon",
|
|
17763
17783
|
props: {
|
|
17764
17784
|
extendX: { type: Number, default: 0 },
|
|
@@ -17786,6 +17806,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
17786
17806
|
title,
|
|
17787
17807
|
"translate-x": translateX = 0,
|
|
17788
17808
|
"translate-y": translateY = 0,
|
|
17809
|
+
"marker-start": markerStart,
|
|
17810
|
+
"marker-mid": markerMid,
|
|
17811
|
+
"marker-end": markerEnd,
|
|
17789
17812
|
class: className,
|
|
17790
17813
|
style,
|
|
17791
17814
|
$raw
|
|
@@ -17802,6 +17825,9 @@ var VVPlot = (function(exports, vue) {
|
|
|
17802
17825
|
title,
|
|
17803
17826
|
translateX,
|
|
17804
17827
|
translateY,
|
|
17828
|
+
"marker-start": markerStart,
|
|
17829
|
+
"marker-mid": markerMid,
|
|
17830
|
+
"marker-end": markerEnd,
|
|
17805
17831
|
class: className,
|
|
17806
17832
|
style
|
|
17807
17833
|
};
|
|
@@ -17816,7 +17842,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17816
17842
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17817
17843
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17818
17844
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17819
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17845
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$D, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17820
17846
|
}), 256))
|
|
17821
17847
|
], 16);
|
|
17822
17848
|
}), 256))
|
|
@@ -17824,7 +17850,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17824
17850
|
};
|
|
17825
17851
|
}
|
|
17826
17852
|
};
|
|
17827
|
-
const _sfc_main$
|
|
17853
|
+
const _sfc_main$B = {
|
|
17828
17854
|
__name: "CoreSvgRect",
|
|
17829
17855
|
props: {
|
|
17830
17856
|
extendX: { type: Number, default: 0 },
|
|
@@ -17888,7 +17914,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17888
17914
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17889
17915
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17890
17916
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17891
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
17917
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$P, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17892
17918
|
}), 256))
|
|
17893
17919
|
], 16);
|
|
17894
17920
|
}), 256))
|
|
@@ -17896,7 +17922,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17896
17922
|
};
|
|
17897
17923
|
}
|
|
17898
17924
|
};
|
|
17899
|
-
const _sfc_main$
|
|
17925
|
+
const _sfc_main$A = {
|
|
17900
17926
|
__name: "CoreSvgText",
|
|
17901
17927
|
props: {
|
|
17902
17928
|
extendX: { type: Number, default: 0 },
|
|
@@ -17947,6 +17973,11 @@ var VVPlot = (function(exports, vue) {
|
|
|
17947
17973
|
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 });
|
|
17948
17974
|
textLength = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
|
|
17949
17975
|
}
|
|
17976
|
+
if (typeof angle2 == "object") {
|
|
17977
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
17978
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
17979
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
17980
|
+
}
|
|
17950
17981
|
let vbind = {
|
|
17951
17982
|
x: tx,
|
|
17952
17983
|
y: ty,
|
|
@@ -17982,7 +18013,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17982
18013
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
|
|
17983
18014
|
return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17984
18015
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
|
|
17985
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18016
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$15, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
|
|
17986
18017
|
}), 256))
|
|
17987
18018
|
], 16);
|
|
17988
18019
|
}), 256))
|
|
@@ -17990,7 +18021,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
17990
18021
|
};
|
|
17991
18022
|
}
|
|
17992
18023
|
};
|
|
17993
|
-
const _sfc_main$
|
|
18024
|
+
const _sfc_main$z = {
|
|
17994
18025
|
__name: "CoreSvgTextsegment",
|
|
17995
18026
|
props: {
|
|
17996
18027
|
extendX: { type: Number, default: 0 },
|
|
@@ -18169,22 +18200,22 @@ var VVPlot = (function(exports, vue) {
|
|
|
18169
18200
|
};
|
|
18170
18201
|
const svg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18171
18202
|
__proto__: null,
|
|
18172
|
-
blank: _sfc_main$
|
|
18173
|
-
boxplot: _sfc_main$
|
|
18174
|
-
curve: _sfc_main$
|
|
18175
|
-
ellipse: _sfc_main$
|
|
18176
|
-
line: _sfc_main$
|
|
18177
|
-
markdown: _sfc_main$
|
|
18178
|
-
markdownsegment: _sfc_main$
|
|
18179
|
-
point: _sfc_main$
|
|
18180
|
-
polygon: _sfc_main$
|
|
18181
|
-
rect: _sfc_main$
|
|
18182
|
-
stick: _sfc_main$
|
|
18183
|
-
text: _sfc_main$
|
|
18184
|
-
textsegment: _sfc_main$
|
|
18185
|
-
tile: _sfc_main$
|
|
18203
|
+
blank: _sfc_main$Q,
|
|
18204
|
+
boxplot: _sfc_main$M,
|
|
18205
|
+
curve: _sfc_main$K,
|
|
18206
|
+
ellipse: _sfc_main$I,
|
|
18207
|
+
line: _sfc_main$H,
|
|
18208
|
+
markdown: _sfc_main$G,
|
|
18209
|
+
markdownsegment: _sfc_main$F,
|
|
18210
|
+
point: _sfc_main$E,
|
|
18211
|
+
polygon: _sfc_main$C,
|
|
18212
|
+
rect: _sfc_main$B,
|
|
18213
|
+
stick: _sfc_main$H,
|
|
18214
|
+
text: _sfc_main$A,
|
|
18215
|
+
textsegment: _sfc_main$z,
|
|
18216
|
+
tile: _sfc_main$B
|
|
18186
18217
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18187
|
-
const _sfc_main$
|
|
18218
|
+
const _sfc_main$y = {
|
|
18188
18219
|
__name: "CoreLayer",
|
|
18189
18220
|
props: {
|
|
18190
18221
|
data: Object,
|
|
@@ -18225,7 +18256,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18225
18256
|
};
|
|
18226
18257
|
const _hoisted_1$4 = { key: 0 };
|
|
18227
18258
|
const _hoisted_2$3 = ["onPointerdown"];
|
|
18228
|
-
const _sfc_main$
|
|
18259
|
+
const _sfc_main$x = {
|
|
18229
18260
|
__name: "CoreSelection",
|
|
18230
18261
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
18231
18262
|
coord2pos: Function,
|
|
@@ -18325,7 +18356,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18325
18356
|
if (pos.hmax == null) hmax += linewidth / 2;
|
|
18326
18357
|
if (pos.vmin == null) vmin -= linewidth / 2;
|
|
18327
18358
|
if (pos.vmax == null) vmax += linewidth / 2;
|
|
18328
|
-
let width = hmax - hmin, height = vmax - vmin;
|
|
18359
|
+
let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
|
|
18329
18360
|
return {
|
|
18330
18361
|
x: hmin,
|
|
18331
18362
|
y: vmin,
|
|
@@ -18344,7 +18375,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18344
18375
|
if (!position.value || translating.value) return null;
|
|
18345
18376
|
let size = 10;
|
|
18346
18377
|
let { hmin, hmax, vmin, vmax, pos } = position.value;
|
|
18347
|
-
let width = hmax - hmin, height = vmax - vmin;
|
|
18378
|
+
let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
|
|
18348
18379
|
let binds = {};
|
|
18349
18380
|
if (config.move) binds.tblr = {
|
|
18350
18381
|
x: hmin,
|
|
@@ -18482,7 +18513,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18482
18513
|
const _hoisted_1$3 = ["height", "width"];
|
|
18483
18514
|
const _hoisted_2$2 = ["y1", "y2"];
|
|
18484
18515
|
const _hoisted_3$2 = ["y"];
|
|
18485
|
-
const _sfc_main$
|
|
18516
|
+
const _sfc_main$w = {
|
|
18486
18517
|
__name: "CoreGuideGradientbar",
|
|
18487
18518
|
props: {
|
|
18488
18519
|
scales: Array,
|
|
@@ -18522,7 +18553,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18522
18553
|
ref: "svg"
|
|
18523
18554
|
}, [
|
|
18524
18555
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(gradient_values.value, (v, i) => {
|
|
18525
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18556
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$P, vue.mergeProps({
|
|
18526
18557
|
width: 10,
|
|
18527
18558
|
height: 3.1,
|
|
18528
18559
|
x: 10,
|
|
@@ -18554,12 +18585,12 @@ var VVPlot = (function(exports, vue) {
|
|
|
18554
18585
|
};
|
|
18555
18586
|
const element = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18556
18587
|
__proto__: null,
|
|
18557
|
-
curve: _sfc_main$
|
|
18558
|
-
line: _sfc_main$
|
|
18559
|
-
point: _sfc_main$
|
|
18560
|
-
polygon: _sfc_main$
|
|
18561
|
-
text: _sfc_main$
|
|
18562
|
-
tile: _sfc_main$
|
|
18588
|
+
curve: _sfc_main$L,
|
|
18589
|
+
line: _sfc_main$N,
|
|
18590
|
+
point: _sfc_main$O,
|
|
18591
|
+
polygon: _sfc_main$D,
|
|
18592
|
+
text: _sfc_main$15,
|
|
18593
|
+
tile: _sfc_main$P
|
|
18563
18594
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18564
18595
|
const _hoisted_1$2 = ["height", "width"];
|
|
18565
18596
|
const _hoisted_2$1 = ["transform"];
|
|
@@ -18569,7 +18600,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18569
18600
|
y: "10",
|
|
18570
18601
|
"alignment-baseline": "central"
|
|
18571
18602
|
};
|
|
18572
|
-
const _sfc_main$
|
|
18603
|
+
const _sfc_main$v = {
|
|
18573
18604
|
__name: "CoreGuideLegendkey",
|
|
18574
18605
|
props: {
|
|
18575
18606
|
scales: Array,
|
|
@@ -18636,7 +18667,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18636
18667
|
};
|
|
18637
18668
|
}
|
|
18638
18669
|
};
|
|
18639
|
-
const _sfc_main$
|
|
18670
|
+
const _sfc_main$u = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
18640
18671
|
__name: "CoreGuide",
|
|
18641
18672
|
props: {
|
|
18642
18673
|
scales: Array,
|
|
@@ -18644,8 +18675,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
18644
18675
|
},
|
|
18645
18676
|
setup(__props) {
|
|
18646
18677
|
const guide = {
|
|
18647
|
-
legendkey: _sfc_main$
|
|
18648
|
-
gradientbar: _sfc_main$
|
|
18678
|
+
legendkey: _sfc_main$v,
|
|
18679
|
+
gradientbar: _sfc_main$w
|
|
18649
18680
|
};
|
|
18650
18681
|
const title = vue.computed(() => {
|
|
18651
18682
|
return __props.scales.reduce((v, [s]) => v ?? s.title, null) ?? __props.scales.reduce((v, [s]) => v ?? s._title, null);
|
|
@@ -18689,7 +18720,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18689
18720
|
};
|
|
18690
18721
|
}
|
|
18691
18722
|
});
|
|
18692
|
-
const _sfc_main$
|
|
18723
|
+
const _sfc_main$t = {
|
|
18693
18724
|
__name: "CoreLegend",
|
|
18694
18725
|
props: {
|
|
18695
18726
|
theme: { type: Object, default: () => ({}) },
|
|
@@ -18723,7 +18754,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18723
18754
|
style: vue.normalizeStyle({ gap: __props.theme.spacing + "px" })
|
|
18724
18755
|
}, [
|
|
18725
18756
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(guides.value, ([[key, type], scales]) => {
|
|
18726
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
18757
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$u, {
|
|
18727
18758
|
key,
|
|
18728
18759
|
type,
|
|
18729
18760
|
scales
|
|
@@ -18741,7 +18772,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
18741
18772
|
const _hoisted_6 = ["transform"];
|
|
18742
18773
|
const _hoisted_7 = ["clip-path"];
|
|
18743
18774
|
const _hoisted_8 = { key: 1 };
|
|
18744
|
-
const _sfc_main$
|
|
18775
|
+
const _sfc_main$s = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
18745
18776
|
__name: "CorePlot",
|
|
18746
18777
|
props: /* @__PURE__ */ vue.mergeModels({
|
|
18747
18778
|
schema: Object,
|
|
@@ -19354,37 +19385,39 @@ var VVPlot = (function(exports, vue) {
|
|
|
19354
19385
|
etc
|
|
19355
19386
|
}));
|
|
19356
19387
|
});
|
|
19388
|
+
function grid_theme_normalize(theme2) {
|
|
19389
|
+
let {
|
|
19390
|
+
grid_color,
|
|
19391
|
+
grid_color_major = grid_color,
|
|
19392
|
+
grid_color_minor = grid_color,
|
|
19393
|
+
grid_width,
|
|
19394
|
+
grid_width_major = grid_width,
|
|
19395
|
+
grid_width_minor = grid_width,
|
|
19396
|
+
...result
|
|
19397
|
+
} = theme2;
|
|
19398
|
+
if (grid_color_major) result.grid_color_major = grid_color_major;
|
|
19399
|
+
if (grid_color_minor) result.grid_color_minor = grid_color_minor;
|
|
19400
|
+
if (grid_width_major) result.grid_width_major = grid_width_major;
|
|
19401
|
+
if (grid_width_minor) result.grid_width_minor = grid_width_minor;
|
|
19402
|
+
return result;
|
|
19403
|
+
}
|
|
19357
19404
|
const vaxes = vue.computed(() => gaxes.value.map(({ coord, axis, etc }) => {
|
|
19358
|
-
let {
|
|
19359
|
-
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
return {
|
|
19364
|
-
majorBreaks,
|
|
19365
|
-
minorBreaks,
|
|
19366
|
-
ticks: ticks2,
|
|
19367
|
-
showGrid,
|
|
19368
|
-
coord,
|
|
19369
|
-
orientation,
|
|
19370
|
-
bind
|
|
19371
|
-
};
|
|
19405
|
+
let { showGrid, breakSlot, orientation, ...bind } = etc;
|
|
19406
|
+
let gtheme = grid_theme_normalize(__props.theme.axis[orientation] ?? {}), atheme = grid_theme_normalize(bind.theme);
|
|
19407
|
+
let breaks = axis.getBreaks({ range: axisRange[coord], expandMult: __props.expandMult[coord], breakSlot });
|
|
19408
|
+
for (let b of breaks)
|
|
19409
|
+
b.theme = Object.assign({}, gtheme, atheme, grid_theme_normalize(b.theme ?? {}));
|
|
19410
|
+
return { breaks, showGrid, coord, orientation, bind };
|
|
19372
19411
|
}));
|
|
19373
19412
|
const gridBreaks = vue.computed(() => {
|
|
19374
19413
|
let hAxes = vaxes.value.filter((a) => a.showGrid && a.orientation == "v"), vAxes = vaxes.value.filter((a) => a.showGrid && a.orientation == "h");
|
|
19375
19414
|
return {
|
|
19376
|
-
h:
|
|
19377
|
-
|
|
19378
|
-
minorBreaks: unique(hAxes.flatMap((a) => a.minorBreaks), (x2) => x2.position)
|
|
19379
|
-
},
|
|
19380
|
-
v: {
|
|
19381
|
-
majorBreaks: unique(vAxes.flatMap((a) => a.majorBreaks), (x2) => x2.position),
|
|
19382
|
-
minorBreaks: unique(vAxes.flatMap((a) => a.minorBreaks), (x2) => x2.position)
|
|
19383
|
-
}
|
|
19415
|
+
h: unique(hAxes.flatMap((a) => a.breaks), (x2) => x2.value, (a, b) => [a, b].find((x2) => x2.type == "major") ?? a),
|
|
19416
|
+
v: unique(vAxes.flatMap((a) => a.breaks), (x2) => x2.value, (a, b) => [a, b].find((x2) => x2.type == "major") ?? a)
|
|
19384
19417
|
};
|
|
19385
19418
|
});
|
|
19386
19419
|
const axes = vue.computed(() => {
|
|
19387
|
-
return vaxes.value.map(({ orientation, coord, bind,
|
|
19420
|
+
return vaxes.value.map(({ orientation, coord, bind, breaks }) => {
|
|
19388
19421
|
let {
|
|
19389
19422
|
onMove: move = (...args) => emit("move", ...args),
|
|
19390
19423
|
onZoom: zoom = (...args) => emit("zoom", ...args),
|
|
@@ -19397,7 +19430,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19397
19430
|
bind: {
|
|
19398
19431
|
coord,
|
|
19399
19432
|
orientation,
|
|
19400
|
-
ticks:
|
|
19433
|
+
ticks: breaks.filter((x2) => x2.type == "major"),
|
|
19401
19434
|
layout: innerRect,
|
|
19402
19435
|
coord2pos,
|
|
19403
19436
|
pos2coord,
|
|
@@ -19438,21 +19471,21 @@ var VVPlot = (function(exports, vue) {
|
|
|
19438
19471
|
transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`,
|
|
19439
19472
|
style: { "pointer-events": "none" }
|
|
19440
19473
|
}, [
|
|
19441
|
-
|
|
19474
|
+
vue.createVNode(_sfc_main$$, {
|
|
19475
|
+
breaks: gridBreaks.value.h,
|
|
19442
19476
|
layout: vue.unref(innerRect),
|
|
19443
|
-
theme: __props.theme.grid.h,
|
|
19444
19477
|
activeTransform: activeTransform.value,
|
|
19445
19478
|
coord2pos,
|
|
19446
19479
|
transition: transition.value
|
|
19447
|
-
}
|
|
19480
|
+
}, null, 8, ["breaks", "layout", "activeTransform", "transition"]),
|
|
19448
19481
|
_cache[2] || (_cache[2] = vue.createTextVNode()),
|
|
19449
|
-
|
|
19482
|
+
vue.createVNode(_sfc_main$_, {
|
|
19483
|
+
breaks: gridBreaks.value.v,
|
|
19450
19484
|
layout: vue.unref(innerRect),
|
|
19451
|
-
theme: __props.theme.grid.v,
|
|
19452
19485
|
activeTransform: activeTransform.value,
|
|
19453
19486
|
coord2pos,
|
|
19454
19487
|
transition: transition.value
|
|
19455
|
-
}
|
|
19488
|
+
}, null, 8, ["breaks", "layout", "activeTransform", "transition"])
|
|
19456
19489
|
], 8, _hoisted_4),
|
|
19457
19490
|
_cache[8] || (_cache[8] = vue.createTextVNode()),
|
|
19458
19491
|
vue.createElementVNode("g", {
|
|
@@ -19463,7 +19496,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19463
19496
|
style: { transition: transition.value }
|
|
19464
19497
|
}), [
|
|
19465
19498
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vplot.value.layers, (layer) => {
|
|
19466
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19499
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$y, vue.mergeProps({
|
|
19467
19500
|
ref_for: true,
|
|
19468
19501
|
ref_key: "layers",
|
|
19469
19502
|
ref: layers,
|
|
@@ -19480,7 +19513,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19480
19513
|
], 16),
|
|
19481
19514
|
_cache[3] || (_cache[3] = vue.createTextVNode()),
|
|
19482
19515
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.selections, (sel) => {
|
|
19483
|
-
return vue.openBlock(), vue.createBlock(_sfc_main$
|
|
19516
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$x, vue.mergeProps({
|
|
19484
19517
|
coord2pos,
|
|
19485
19518
|
pos2coord,
|
|
19486
19519
|
layout: vue.unref(innerRect),
|
|
@@ -19491,7 +19524,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19491
19524
|
}, { ref_for: true }, sel, { flip: __props.flip }), null, 16, ["layout", "transition", "activeTransform", "flip"]);
|
|
19492
19525
|
}), 256)),
|
|
19493
19526
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
19494
|
-
vue.createVNode(_sfc_main$
|
|
19527
|
+
vue.createVNode(_sfc_main$x, {
|
|
19495
19528
|
coord2pos,
|
|
19496
19529
|
pos2coord,
|
|
19497
19530
|
layout: vue.unref(innerRect),
|
|
@@ -19507,7 +19540,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19507
19540
|
transform: `translate(${vue.unref(panel).left}, ${vue.unref(panel).top})`
|
|
19508
19541
|
}, [
|
|
19509
19542
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position !== "number"), (axis) => {
|
|
19510
|
-
return vue.openBlock(), vue.createBlock(_sfc_main
|
|
19543
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$10, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
|
|
19511
19544
|
transition: transition.value,
|
|
19512
19545
|
"onUpdate:transition": _cache[0] || (_cache[0] = ($event) => transition.value = $event),
|
|
19513
19546
|
activeTransform: activeTransform.value
|
|
@@ -19518,7 +19551,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19518
19551
|
"clip-path": props.clip ? `url(#${vue.unref(vid)}-plot-clip)` : null
|
|
19519
19552
|
}, [
|
|
19520
19553
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(axes.value.filter((a) => typeof a.bind.position === "number"), (axis) => {
|
|
19521
|
-
return vue.openBlock(), vue.createBlock(_sfc_main
|
|
19554
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$10, vue.mergeProps({ ref_for: true }, axis.bind, vue.toHandlers(axis.on), {
|
|
19522
19555
|
transition: transition.value,
|
|
19523
19556
|
"onUpdate:transition": _cache[1] || (_cache[1] = ($event) => transition.value = $event),
|
|
19524
19557
|
activeTransform: activeTransform.value
|
|
@@ -19527,12 +19560,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
19527
19560
|
], 8, _hoisted_7)
|
|
19528
19561
|
], 8, _hoisted_6),
|
|
19529
19562
|
_cache[10] || (_cache[10] = vue.createTextVNode()),
|
|
19563
|
+
vue.renderSlot(_ctx.$slots, "default"),
|
|
19564
|
+
_cache[11] || (_cache[11] = vue.createTextVNode()),
|
|
19530
19565
|
props.legendTeleport ? (vue.openBlock(), vue.createElementBlock("foreignObject", _hoisted_8, [
|
|
19531
19566
|
(vue.openBlock(), vue.createBlock(vue.Teleport, {
|
|
19532
19567
|
defer: "",
|
|
19533
19568
|
to: props.legendTeleport
|
|
19534
19569
|
}, [
|
|
19535
|
-
vue.createVNode(_sfc_main$
|
|
19570
|
+
vue.createVNode(_sfc_main$t, {
|
|
19536
19571
|
scales: vplot.value?.scales,
|
|
19537
19572
|
theme: __props.theme.legend
|
|
19538
19573
|
}, null, 8, ["scales", "theme"])
|
|
@@ -19542,35 +19577,36 @@ var VVPlot = (function(exports, vue) {
|
|
|
19542
19577
|
};
|
|
19543
19578
|
}
|
|
19544
19579
|
});
|
|
19545
|
-
const _sfc_main$
|
|
19580
|
+
const _sfc_main$r = {
|
|
19546
19581
|
$_type: "action",
|
|
19547
19582
|
$_props: {}
|
|
19548
19583
|
};
|
|
19549
|
-
const _sfc_main$
|
|
19584
|
+
const _sfc_main$q = {
|
|
19550
19585
|
$_type: "layer"
|
|
19551
19586
|
};
|
|
19552
|
-
const _sfc_main$
|
|
19587
|
+
const _sfc_main$p = {
|
|
19553
19588
|
$_props: {
|
|
19554
19589
|
geom: "tile",
|
|
19555
19590
|
stat: "bar"
|
|
19556
19591
|
},
|
|
19557
|
-
$_type: "layer"
|
|
19592
|
+
$_type: "layer",
|
|
19593
|
+
$_argnames: ["width", "height", "position"]
|
|
19558
19594
|
};
|
|
19559
|
-
const _sfc_main$
|
|
19595
|
+
const _sfc_main$o = {
|
|
19560
19596
|
$_props: {
|
|
19561
19597
|
geom: "blank",
|
|
19562
19598
|
stat: "identity"
|
|
19563
19599
|
},
|
|
19564
19600
|
$_type: "layer"
|
|
19565
19601
|
};
|
|
19566
|
-
const _sfc_main$
|
|
19602
|
+
const _sfc_main$n = {
|
|
19567
19603
|
$_props: {
|
|
19568
19604
|
geom: "boxplot",
|
|
19569
19605
|
stat: "boxplot"
|
|
19570
19606
|
},
|
|
19571
19607
|
$_type: "layer"
|
|
19572
19608
|
};
|
|
19573
|
-
const _sfc_main$
|
|
19609
|
+
const _sfc_main$m = {
|
|
19574
19610
|
$_props: {
|
|
19575
19611
|
geom: "curve",
|
|
19576
19612
|
stat: "curve"
|
|
@@ -19578,7 +19614,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19578
19614
|
$_type: "layer",
|
|
19579
19615
|
$_attrnames: ["interpolate"]
|
|
19580
19616
|
};
|
|
19581
|
-
const _sfc_main$
|
|
19617
|
+
const _sfc_main$l = {
|
|
19582
19618
|
$_props: {
|
|
19583
19619
|
geom: "curve",
|
|
19584
19620
|
stat: "density"
|
|
@@ -19586,7 +19622,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19586
19622
|
$_type: "layer",
|
|
19587
19623
|
$_argnames: ["n", "kernel"]
|
|
19588
19624
|
};
|
|
19589
|
-
const _sfc_main$
|
|
19625
|
+
const _sfc_main$k = {
|
|
19590
19626
|
$_props: {
|
|
19591
19627
|
geom: "ellipse",
|
|
19592
19628
|
stat: "ellipse"
|
|
@@ -19594,7 +19630,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19594
19630
|
$_type: "layer",
|
|
19595
19631
|
$_argnames: ["CI"]
|
|
19596
19632
|
};
|
|
19597
|
-
const _sfc_main$
|
|
19633
|
+
const _sfc_main$j = {
|
|
19598
19634
|
$_props: {
|
|
19599
19635
|
geom: "rect",
|
|
19600
19636
|
stat: "histogram"
|
|
@@ -19602,7 +19638,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
19602
19638
|
$_type: "layer",
|
|
19603
19639
|
$_argnames: ["bins", "binwidth", "breaks"]
|
|
19604
19640
|
};
|
|
19605
|
-
const _sfc_main$
|
|
19641
|
+
const _sfc_main$i = {
|
|
19606
19642
|
$_props: {
|
|
19607
19643
|
geom: "line",
|
|
19608
19644
|
stat: "line"
|
|
@@ -19610,84 +19646,84 @@ var VVPlot = (function(exports, vue) {
|
|
|
19610
19646
|
$_type: "layer",
|
|
19611
19647
|
$_argnames: ["orientation"]
|
|
19612
19648
|
};
|
|
19613
|
-
const _sfc_main$
|
|
19649
|
+
const _sfc_main$h = {
|
|
19614
19650
|
$_props: {
|
|
19615
19651
|
geom: "line",
|
|
19616
19652
|
stat: "linerange"
|
|
19617
19653
|
},
|
|
19618
19654
|
$_type: "layer"
|
|
19619
19655
|
};
|
|
19620
|
-
const _sfc_main$
|
|
19656
|
+
const _sfc_main$g = {
|
|
19621
19657
|
$_props: {
|
|
19622
19658
|
geom: "markdown",
|
|
19623
19659
|
stat: "text"
|
|
19624
19660
|
},
|
|
19625
19661
|
$_type: "layer"
|
|
19626
19662
|
};
|
|
19627
|
-
const _sfc_main$
|
|
19663
|
+
const _sfc_main$f = {
|
|
19628
19664
|
$_props: {
|
|
19629
19665
|
geom: "markdownsegment",
|
|
19630
19666
|
stat: "textsegment"
|
|
19631
19667
|
},
|
|
19632
19668
|
$_type: "layer"
|
|
19633
19669
|
};
|
|
19634
|
-
const _sfc_main$
|
|
19670
|
+
const _sfc_main$e = {
|
|
19635
19671
|
$_props: {
|
|
19636
19672
|
geom: "line",
|
|
19637
19673
|
stat: "path"
|
|
19638
19674
|
},
|
|
19639
19675
|
$_type: "layer"
|
|
19640
19676
|
};
|
|
19641
|
-
const _sfc_main$
|
|
19677
|
+
const _sfc_main$d = {
|
|
19642
19678
|
$_props: {
|
|
19643
19679
|
geom: "point",
|
|
19644
19680
|
stat: "point"
|
|
19645
19681
|
},
|
|
19646
19682
|
$_type: "layer"
|
|
19647
19683
|
};
|
|
19648
|
-
const _sfc_main$
|
|
19684
|
+
const _sfc_main$c = {
|
|
19649
19685
|
$_props: {
|
|
19650
19686
|
geom: "polygon",
|
|
19651
19687
|
stat: "polygon"
|
|
19652
19688
|
},
|
|
19653
19689
|
$_type: "layer"
|
|
19654
19690
|
};
|
|
19655
|
-
const _sfc_main$
|
|
19691
|
+
const _sfc_main$b = {
|
|
19656
19692
|
$_props: {
|
|
19657
19693
|
geom: "rect",
|
|
19658
19694
|
stat: "rect"
|
|
19659
19695
|
},
|
|
19660
19696
|
$_type: "layer"
|
|
19661
19697
|
};
|
|
19662
|
-
const _sfc_main$
|
|
19698
|
+
const _sfc_main$a = {
|
|
19663
19699
|
$_props: {
|
|
19664
19700
|
geom: "line",
|
|
19665
19701
|
stat: "segment"
|
|
19666
19702
|
},
|
|
19667
19703
|
$_type: "layer"
|
|
19668
19704
|
};
|
|
19669
|
-
const _sfc_main$
|
|
19705
|
+
const _sfc_main$9 = {
|
|
19670
19706
|
$_props: {
|
|
19671
19707
|
geom: "stick",
|
|
19672
19708
|
stat: "stick"
|
|
19673
19709
|
},
|
|
19674
19710
|
$_type: "layer"
|
|
19675
19711
|
};
|
|
19676
|
-
const _sfc_main$
|
|
19712
|
+
const _sfc_main$8 = {
|
|
19677
19713
|
$_props: {
|
|
19678
19714
|
geom: "text",
|
|
19679
19715
|
stat: "text"
|
|
19680
19716
|
},
|
|
19681
19717
|
$_type: "layer"
|
|
19682
19718
|
};
|
|
19683
|
-
const _sfc_main$
|
|
19719
|
+
const _sfc_main$7 = {
|
|
19684
19720
|
$_props: {
|
|
19685
19721
|
geom: "textsegment",
|
|
19686
19722
|
stat: "textsegment"
|
|
19687
19723
|
},
|
|
19688
19724
|
$_type: "layer"
|
|
19689
19725
|
};
|
|
19690
|
-
const _sfc_main$
|
|
19726
|
+
const _sfc_main$6 = {
|
|
19691
19727
|
$_props: {
|
|
19692
19728
|
geom: "tile",
|
|
19693
19729
|
stat: "tile"
|
|
@@ -19696,45 +19732,50 @@ var VVPlot = (function(exports, vue) {
|
|
|
19696
19732
|
};
|
|
19697
19733
|
const geom_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19698
19734
|
__proto__: null,
|
|
19699
|
-
VVGeom: _sfc_main$
|
|
19700
|
-
VVGeomBar: _sfc_main$
|
|
19701
|
-
VVGeomBlank: _sfc_main$
|
|
19702
|
-
VVGeomBoxplot: _sfc_main$
|
|
19703
|
-
VVGeomCurve: _sfc_main$
|
|
19704
|
-
VVGeomDensity: _sfc_main$
|
|
19705
|
-
VVGeomEllipse: _sfc_main$
|
|
19706
|
-
VVGeomHistogram: _sfc_main$
|
|
19707
|
-
VVGeomLine: _sfc_main$
|
|
19708
|
-
VVGeomLinerange: _sfc_main$
|
|
19709
|
-
VVGeomMarkdown: _sfc_main$
|
|
19710
|
-
VVGeomMarkdownsegment: _sfc_main$
|
|
19711
|
-
VVGeomPath: _sfc_main$
|
|
19712
|
-
VVGeomPoint: _sfc_main$
|
|
19713
|
-
VVGeomPolygon: _sfc_main$
|
|
19714
|
-
VVGeomRect: _sfc_main$
|
|
19715
|
-
VVGeomSegment: _sfc_main$
|
|
19716
|
-
VVGeomStick: _sfc_main$
|
|
19717
|
-
VVGeomText: _sfc_main$
|
|
19718
|
-
VVGeomTextsegment: _sfc_main$
|
|
19719
|
-
VVGeomTile: _sfc_main$
|
|
19735
|
+
VVGeom: _sfc_main$q,
|
|
19736
|
+
VVGeomBar: _sfc_main$p,
|
|
19737
|
+
VVGeomBlank: _sfc_main$o,
|
|
19738
|
+
VVGeomBoxplot: _sfc_main$n,
|
|
19739
|
+
VVGeomCurve: _sfc_main$m,
|
|
19740
|
+
VVGeomDensity: _sfc_main$l,
|
|
19741
|
+
VVGeomEllipse: _sfc_main$k,
|
|
19742
|
+
VVGeomHistogram: _sfc_main$j,
|
|
19743
|
+
VVGeomLine: _sfc_main$i,
|
|
19744
|
+
VVGeomLinerange: _sfc_main$h,
|
|
19745
|
+
VVGeomMarkdown: _sfc_main$g,
|
|
19746
|
+
VVGeomMarkdownsegment: _sfc_main$f,
|
|
19747
|
+
VVGeomPath: _sfc_main$e,
|
|
19748
|
+
VVGeomPoint: _sfc_main$d,
|
|
19749
|
+
VVGeomPolygon: _sfc_main$c,
|
|
19750
|
+
VVGeomRect: _sfc_main$b,
|
|
19751
|
+
VVGeomSegment: _sfc_main$a,
|
|
19752
|
+
VVGeomStick: _sfc_main$9,
|
|
19753
|
+
VVGeomText: _sfc_main$8,
|
|
19754
|
+
VVGeomTextsegment: _sfc_main$7,
|
|
19755
|
+
VVGeomTile: _sfc_main$6
|
|
19720
19756
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19721
|
-
const _sfc_main$
|
|
19757
|
+
const _sfc_main$5 = {
|
|
19722
19758
|
$_type: "axis",
|
|
19723
19759
|
$_props: {}
|
|
19724
19760
|
};
|
|
19725
|
-
const _sfc_main$
|
|
19761
|
+
const _sfc_main$4 = {
|
|
19726
19762
|
$_type: "axis",
|
|
19727
19763
|
$_props: { coord: "x" }
|
|
19728
19764
|
};
|
|
19729
|
-
const _sfc_main$
|
|
19765
|
+
const _sfc_main$3 = {
|
|
19730
19766
|
$_type: "axis",
|
|
19731
19767
|
$_props: { coord: "y" }
|
|
19732
19768
|
};
|
|
19769
|
+
const _sfc_main$2 = {
|
|
19770
|
+
$_type: "axis-break",
|
|
19771
|
+
$_props: { type: "major" }
|
|
19772
|
+
};
|
|
19733
19773
|
const axis_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19734
19774
|
__proto__: null,
|
|
19735
|
-
VVAxis: _sfc_main$
|
|
19736
|
-
|
|
19737
|
-
|
|
19775
|
+
VVAxis: _sfc_main$5,
|
|
19776
|
+
VVAxisBreak: _sfc_main$2,
|
|
19777
|
+
VVAxisX: _sfc_main$4,
|
|
19778
|
+
VVAxisY: _sfc_main$3
|
|
19738
19779
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19739
19780
|
const _hoisted_1 = {
|
|
19740
19781
|
key: 0,
|
|
@@ -19781,8 +19822,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
19781
19822
|
const components = {
|
|
19782
19823
|
...geom_components,
|
|
19783
19824
|
...axis_components,
|
|
19784
|
-
VVAction: _sfc_main$
|
|
19785
|
-
VVSelection: _sfc_main$
|
|
19825
|
+
VVAction: _sfc_main$r,
|
|
19826
|
+
VVSelection: _sfc_main$r
|
|
19786
19827
|
};
|
|
19787
19828
|
const opponents = {
|
|
19788
19829
|
x: "y",
|
|
@@ -19802,20 +19843,6 @@ var VVPlot = (function(exports, vue) {
|
|
|
19802
19843
|
const selectionPreview = vue.useModel(__props, "selectionPreview");
|
|
19803
19844
|
const selectionPreviewTheme = vue.useModel(__props, "selectionPreviewTheme");
|
|
19804
19845
|
const transition = vue.useModel(__props, "transition");
|
|
19805
|
-
function expandFragment(componentList) {
|
|
19806
|
-
if (componentList == null) return [];
|
|
19807
|
-
return componentList.flatMap((layer) => {
|
|
19808
|
-
if (layer.type == vue.Fragment) {
|
|
19809
|
-
return expandFragment(layer.children);
|
|
19810
|
-
} else if (layer.type == "template") {
|
|
19811
|
-
return expandFragment(layer.children).map((c) => {
|
|
19812
|
-
c.props = { ...c.props, ...layer.props };
|
|
19813
|
-
return c;
|
|
19814
|
-
});
|
|
19815
|
-
}
|
|
19816
|
-
return layer;
|
|
19817
|
-
});
|
|
19818
|
-
}
|
|
19819
19846
|
function resolveComponent(ast2) {
|
|
19820
19847
|
let result = {
|
|
19821
19848
|
props: Object.fromEntries(ast2.props.map((p) => {
|
|
@@ -19863,6 +19890,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
19863
19890
|
const vaction = vue.computed(() => Object.values(vnodes.action).flat());
|
|
19864
19891
|
const vselection = vue.computed(() => Object.values(vnodes.selection).flat());
|
|
19865
19892
|
const vdom = vue.computed(() => Object.keys(vnodes.dom).flatMap((k) => k == "panel" ? [] : vnodes.dom[k]));
|
|
19893
|
+
const vdom_svg = vue.computed(() => vdom.value.filter((v) => isSVGTag(v.type)));
|
|
19894
|
+
const vdom_etc = vue.computed(() => vdom.value.filter((v) => !isSVGTag(v.type)));
|
|
19866
19895
|
const vBind = vue.computed(() => {
|
|
19867
19896
|
let plot = {};
|
|
19868
19897
|
let wrapper = {};
|
|
@@ -20083,7 +20112,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20083
20112
|
const buttonsMap = { left: 1, right: 2, middle: 4, X1: 8, X2: 16 };
|
|
20084
20113
|
const axes = vue.computed(() => {
|
|
20085
20114
|
let ori = __props.flip ? { x: "v", y: "h" } : { x: "h", y: "v" };
|
|
20086
|
-
let allAxes = vaxis.value.map((c) => ({ ...c.type.$_props, ...c.props, $_children: c.children })).concat(__props.axes ?? []);
|
|
20115
|
+
let allAxes = vaxis.value.map((c) => ({ ...c.type.$_props, ...c.props, $_children: c.children ?? {} })).concat(__props.axes ?? []);
|
|
20087
20116
|
if (allAxes.every((ax) => ax?.coord != "x")) allAxes.push({ coord: "x" });
|
|
20088
20117
|
if (allAxes.every((ax) => ax?.coord != "y")) allAxes.push({ coord: "y" });
|
|
20089
20118
|
return allAxes.map(({
|
|
@@ -20110,7 +20139,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20110
20139
|
max,
|
|
20111
20140
|
"onUpdate:min": oum,
|
|
20112
20141
|
"onUpdate:max": ouM,
|
|
20113
|
-
$_children,
|
|
20142
|
+
$_children = {},
|
|
20114
20143
|
...etc
|
|
20115
20144
|
}) => {
|
|
20116
20145
|
let orientation = ori[coord];
|
|
@@ -20122,7 +20151,8 @@ var VVPlot = (function(exports, vue) {
|
|
|
20122
20151
|
position = { h: "top", v: "right" }[orientation];
|
|
20123
20152
|
if (reverse[opponents[coord]]) position = opponents[position];
|
|
20124
20153
|
}
|
|
20125
|
-
let
|
|
20154
|
+
let breakSlot = $_children.breaks;
|
|
20155
|
+
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) => {
|
|
20126
20156
|
let res = [];
|
|
20127
20157
|
for (let a of ["move", "nudge", "zoom", "rescale"]) {
|
|
20128
20158
|
let act = props[a];
|
|
@@ -20152,6 +20182,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20152
20182
|
labels,
|
|
20153
20183
|
titles,
|
|
20154
20184
|
minorBreaks,
|
|
20185
|
+
breakSlot,
|
|
20155
20186
|
showGrid: _isPropTruthy(showGrid) ?? position !== "none",
|
|
20156
20187
|
extend: extend2 ?? primaryAxisConfig.extend[coord],
|
|
20157
20188
|
theme: Object.assign({}, ...[theme2.value?.axis?.[position] ?? theme2.value?.axis?.[orientation]].concat($$theme)),
|
|
@@ -20309,7 +20340,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20309
20340
|
class: "vvplot",
|
|
20310
20341
|
style: wrapperStyle.value
|
|
20311
20342
|
}, vBind.value.wrapper), [
|
|
20312
|
-
vue.createVNode(_sfc_main$
|
|
20343
|
+
vue.createVNode(_sfc_main$s, vue.mergeProps({
|
|
20313
20344
|
ref: "plot",
|
|
20314
20345
|
paddings,
|
|
20315
20346
|
schema: schema.value,
|
|
@@ -20338,7 +20369,14 @@ var VVPlot = (function(exports, vue) {
|
|
|
20338
20369
|
dpi: __props.dpi ?? 96 * vue.unref(pixelRatio),
|
|
20339
20370
|
legendTeleport: __props.legendTeleport,
|
|
20340
20371
|
onSelect: _cache[3] || (_cache[3] = (d, e) => emit("select", d, e))
|
|
20341
|
-
}),
|
|
20372
|
+
}), {
|
|
20373
|
+
default: vue.withCtx(() => [
|
|
20374
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vdom_svg.value, (c) => {
|
|
20375
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(c));
|
|
20376
|
+
}), 256))
|
|
20377
|
+
]),
|
|
20378
|
+
_: 1
|
|
20379
|
+
}, 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"]),
|
|
20342
20380
|
_cache[4] || (_cache[4] = vue.createTextVNode()),
|
|
20343
20381
|
vue.createElementVNode("div", {
|
|
20344
20382
|
class: "vvplot-panel-container",
|
|
@@ -20351,7 +20389,7 @@ var VVPlot = (function(exports, vue) {
|
|
|
20351
20389
|
])) : vue.createCommentVNode("", true)
|
|
20352
20390
|
], 4),
|
|
20353
20391
|
_cache[5] || (_cache[5] = vue.createTextVNode()),
|
|
20354
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
20392
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vdom_etc.value, (c) => {
|
|
20355
20393
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(c));
|
|
20356
20394
|
}), 256))
|
|
20357
20395
|
], 16);
|
|
@@ -20364,67 +20402,71 @@ var VVPlot = (function(exports, vue) {
|
|
|
20364
20402
|
};
|
|
20365
20403
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20366
20404
|
__proto__: null,
|
|
20367
|
-
VVAction: _sfc_main$
|
|
20368
|
-
VVAxis: _sfc_main$
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
|
|
20374
|
-
|
|
20375
|
-
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20381
|
-
|
|
20382
|
-
|
|
20383
|
-
|
|
20384
|
-
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
-
|
|
20405
|
+
VVAction: _sfc_main$r,
|
|
20406
|
+
VVAxis: _sfc_main$5,
|
|
20407
|
+
VVAxisBreak: _sfc_main$2,
|
|
20408
|
+
VVAxisX: _sfc_main$4,
|
|
20409
|
+
VVAxisY: _sfc_main$3,
|
|
20410
|
+
VVGeom: _sfc_main$q,
|
|
20411
|
+
VVGeomBar: _sfc_main$p,
|
|
20412
|
+
VVGeomBlank: _sfc_main$o,
|
|
20413
|
+
VVGeomBoxplot: _sfc_main$n,
|
|
20414
|
+
VVGeomCurve: _sfc_main$m,
|
|
20415
|
+
VVGeomDensity: _sfc_main$l,
|
|
20416
|
+
VVGeomEllipse: _sfc_main$k,
|
|
20417
|
+
VVGeomHistogram: _sfc_main$j,
|
|
20418
|
+
VVGeomLine: _sfc_main$i,
|
|
20419
|
+
VVGeomLinerange: _sfc_main$h,
|
|
20420
|
+
VVGeomMarkdown: _sfc_main$g,
|
|
20421
|
+
VVGeomMarkdownsegment: _sfc_main$f,
|
|
20422
|
+
VVGeomPath: _sfc_main$e,
|
|
20423
|
+
VVGeomPoint: _sfc_main$d,
|
|
20424
|
+
VVGeomPolygon: _sfc_main$c,
|
|
20425
|
+
VVGeomRect: _sfc_main$b,
|
|
20426
|
+
VVGeomSegment: _sfc_main$a,
|
|
20427
|
+
VVGeomStick: _sfc_main$9,
|
|
20428
|
+
VVGeomText: _sfc_main$8,
|
|
20429
|
+
VVGeomTextsegment: _sfc_main$7,
|
|
20430
|
+
VVGeomTile: _sfc_main$6,
|
|
20392
20431
|
VVPlot: _sfc_main$1,
|
|
20393
20432
|
VVSelection: _sfc_main
|
|
20394
20433
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
20395
|
-
exports.VVAction = _sfc_main$
|
|
20396
|
-
exports.VVAxis = _sfc_main$
|
|
20397
|
-
exports.
|
|
20398
|
-
exports.
|
|
20399
|
-
exports.
|
|
20400
|
-
exports.
|
|
20401
|
-
exports.
|
|
20402
|
-
exports.
|
|
20403
|
-
exports.
|
|
20404
|
-
exports.
|
|
20405
|
-
exports.
|
|
20406
|
-
exports.
|
|
20407
|
-
exports.
|
|
20408
|
-
exports.
|
|
20409
|
-
exports.
|
|
20410
|
-
exports.
|
|
20411
|
-
exports.
|
|
20412
|
-
exports.
|
|
20413
|
-
exports.
|
|
20414
|
-
exports.
|
|
20415
|
-
exports.
|
|
20416
|
-
exports.
|
|
20417
|
-
exports.
|
|
20418
|
-
exports.
|
|
20419
|
-
exports.
|
|
20434
|
+
exports.VVAction = _sfc_main$r;
|
|
20435
|
+
exports.VVAxis = _sfc_main$5;
|
|
20436
|
+
exports.VVAxisBreak = _sfc_main$2;
|
|
20437
|
+
exports.VVAxisX = _sfc_main$4;
|
|
20438
|
+
exports.VVAxisY = _sfc_main$3;
|
|
20439
|
+
exports.VVGeom = _sfc_main$q;
|
|
20440
|
+
exports.VVGeomBar = _sfc_main$p;
|
|
20441
|
+
exports.VVGeomBlank = _sfc_main$o;
|
|
20442
|
+
exports.VVGeomBoxplot = _sfc_main$n;
|
|
20443
|
+
exports.VVGeomCurve = _sfc_main$m;
|
|
20444
|
+
exports.VVGeomDensity = _sfc_main$l;
|
|
20445
|
+
exports.VVGeomEllipse = _sfc_main$k;
|
|
20446
|
+
exports.VVGeomHistogram = _sfc_main$j;
|
|
20447
|
+
exports.VVGeomLine = _sfc_main$i;
|
|
20448
|
+
exports.VVGeomLinerange = _sfc_main$h;
|
|
20449
|
+
exports.VVGeomMarkdown = _sfc_main$g;
|
|
20450
|
+
exports.VVGeomMarkdownsegment = _sfc_main$f;
|
|
20451
|
+
exports.VVGeomPath = _sfc_main$e;
|
|
20452
|
+
exports.VVGeomPoint = _sfc_main$d;
|
|
20453
|
+
exports.VVGeomPolygon = _sfc_main$c;
|
|
20454
|
+
exports.VVGeomRect = _sfc_main$b;
|
|
20455
|
+
exports.VVGeomSegment = _sfc_main$a;
|
|
20456
|
+
exports.VVGeomStick = _sfc_main$9;
|
|
20457
|
+
exports.VVGeomText = _sfc_main$8;
|
|
20458
|
+
exports.VVGeomTextsegment = _sfc_main$7;
|
|
20459
|
+
exports.VVGeomTile = _sfc_main$6;
|
|
20420
20460
|
exports.VVPlot = _sfc_main$1;
|
|
20421
20461
|
exports.VVSelection = _sfc_main;
|
|
20422
20462
|
exports.components = index;
|
|
20423
20463
|
exports.number_cut = number_cut;
|
|
20424
20464
|
exports.oob = oob;
|
|
20425
20465
|
exports.vvbreak = vvbreak;
|
|
20466
|
+
exports.vvgeom = vvgeom;
|
|
20426
20467
|
exports.vvlabel = vvlabel;
|
|
20427
20468
|
exports.vvscale = vvscale;
|
|
20469
|
+
exports.vvstat = vvstat;
|
|
20428
20470
|
exports.vvtheme = theme;
|
|
20429
20471
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
20430
20472
|
return exports;
|