vvplot 0.4.5 → 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 +649 -537
- package/dist/vvplot.esm.min.js +18 -18
- package/dist/vvplot.global.js +648 -536
- package/dist/vvplot.global.min.js +18 -18
- package/package.json +1 -1
package/dist/vvplot.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, isRef, reactive, unref, getCurrentScope, onScopeDispose, watch, getCurrentInstance, hasInjectionContext, inject, toValue, shallowRef, readonly, watchEffect, onMounted, useTemplateRef, nextTick, openBlock, createElementBlock, mergeProps, renderSlot, toDisplayString, createCommentVNode, createTextVNode,
|
|
1
|
+
import { computed, isRef, reactive, unref, getCurrentScope, onScopeDispose, watch, getCurrentInstance, hasInjectionContext, inject, toValue, shallowRef, readonly, watchEffect, onMounted, Fragment, useTemplateRef, nextTick, openBlock, createElementBlock, mergeProps, renderSlot, toDisplayString, createCommentVNode, createTextVNode, renderList, createBlock, toHandlers, normalizeStyle, createVNode, createElementVNode, normalizeProps, resolveDynamicComponent, guardReactiveProps, useModel, createPropsRestProxy, mergeModels, ref, useId, Teleport, useSlots, useAttrs, provide, withCtx } from "vue";
|
|
2
2
|
function tryOnScopeDispose(fn) {
|
|
3
3
|
if (getCurrentScope()) {
|
|
4
4
|
onScopeDispose(fn);
|
|
@@ -242,8 +242,16 @@ function useResizeObserver(target2, callback, options = {}) {
|
|
|
242
242
|
stop
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
+
// @__NO_SIDE_EFFECTS__
|
|
246
|
+
function makeMap(str) {
|
|
247
|
+
const map2 = /* @__PURE__ */ Object.create(null);
|
|
248
|
+
for (const key of str.split(",")) map2[key] = 1;
|
|
249
|
+
return (val) => val in map2;
|
|
250
|
+
}
|
|
245
251
|
const NO = () => false;
|
|
246
252
|
const extend$1 = Object.assign;
|
|
253
|
+
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";
|
|
254
|
+
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
247
255
|
const TELEPORT = /* @__PURE__ */ Symbol(``);
|
|
248
256
|
const SUSPENSE = /* @__PURE__ */ Symbol(``);
|
|
249
257
|
const KEEP_ALIVE = /* @__PURE__ */ Symbol(``);
|
|
@@ -1407,7 +1415,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
1407
1415
|
}
|
|
1408
1416
|
},
|
|
1409
1417
|
oncdata(start2, end) {
|
|
1410
|
-
if (stack[0].ns !== 0) {
|
|
1418
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) {
|
|
1411
1419
|
onText(getSlice(start2, end), start2, end);
|
|
1412
1420
|
} else {
|
|
1413
1421
|
emitError(1, start2 - 9);
|
|
@@ -1796,6 +1804,20 @@ function baseParse(input, options) {
|
|
|
1796
1804
|
new RegExp(
|
|
1797
1805
|
"\\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"
|
|
1798
1806
|
);
|
|
1807
|
+
function expandFragment(componentList) {
|
|
1808
|
+
if (componentList == null) return [];
|
|
1809
|
+
return componentList.flatMap((layer) => {
|
|
1810
|
+
if (layer.type == Fragment) {
|
|
1811
|
+
return expandFragment(layer.children);
|
|
1812
|
+
} else if (layer.type == "template") {
|
|
1813
|
+
return expandFragment(layer.children).map((c) => {
|
|
1814
|
+
c.props = { ...c.props, ...layer.props };
|
|
1815
|
+
return c;
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
return layer;
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1799
1821
|
class AsisString extends String {
|
|
1800
1822
|
static #cache = /* @__PURE__ */ new Map();
|
|
1801
1823
|
constructor(str) {
|
|
@@ -1980,7 +2002,7 @@ const vecutils = {
|
|
|
1980
2002
|
let length = values[0].length;
|
|
1981
2003
|
if (values.some((v) => v.length != length))
|
|
1982
2004
|
throw new Error("Arrays must have the same length");
|
|
1983
|
-
return Array.from({ length }, (_, i) => values.reduce((s, a) => +a[i] + s, nums));
|
|
2005
|
+
return Array.from({ length }, (_, i) => values.reduce((s, a) => +(a[i] ?? 0) + s, nums));
|
|
1984
2006
|
},
|
|
1985
2007
|
/* vectorized opposite of numbers */
|
|
1986
2008
|
opposite(value) {
|
|
@@ -2023,8 +2045,7 @@ function obj_merge(...arr) {
|
|
|
2023
2045
|
if (arr.length == 0) return null;
|
|
2024
2046
|
return arr.reduce((a, c) => {
|
|
2025
2047
|
for (let k in c) {
|
|
2026
|
-
if (c[k]
|
|
2027
|
-
if (c[k] != void 0) a[k] = c[k];
|
|
2048
|
+
if (c[k] !== void 0) a[k] = c[k];
|
|
2028
2049
|
}
|
|
2029
2050
|
return a;
|
|
2030
2051
|
}, {});
|
|
@@ -2034,11 +2055,12 @@ function str_c(...args) {
|
|
|
2034
2055
|
if (args.some((x2) => x2 === null)) return null;
|
|
2035
2056
|
return args.join("");
|
|
2036
2057
|
}
|
|
2037
|
-
function unique(arr,
|
|
2058
|
+
function unique(arr, key = null, priority = null) {
|
|
2038
2059
|
let map2 = /* @__PURE__ */ new Map();
|
|
2039
2060
|
for (let i in arr) {
|
|
2040
|
-
let
|
|
2041
|
-
if (!map2.has(
|
|
2061
|
+
let k = key ? key(arr[i]) : arr[i];
|
|
2062
|
+
if (!map2.has(k)) map2.set(k, arr[i]);
|
|
2063
|
+
else if (priority) map2.set(k, priority(map2.get(k), arr[i]));
|
|
2042
2064
|
}
|
|
2043
2065
|
return Array.from(map2.values());
|
|
2044
2066
|
}
|
|
@@ -2207,7 +2229,7 @@ function serializeSVG(svgElement, { unit: unit2 = "mm" } = {}) {
|
|
|
2207
2229
|
img.setAttribute("height", foreignElement.getAttribute("height"));
|
|
2208
2230
|
foreignClone.parentNode.replaceChild(img, foreignClone);
|
|
2209
2231
|
}
|
|
2210
|
-
for (let node of svgClone.querySelectorAll(".vvplot-interactive")) node.remove();
|
|
2232
|
+
for (let node of svgClone.querySelectorAll(".vvplot-interactive,foreignObject")) node.remove();
|
|
2211
2233
|
removeComments(svgClone);
|
|
2212
2234
|
svgClone.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
2213
2235
|
svgClone.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
|
|
@@ -2225,7 +2247,9 @@ const theme_base = {
|
|
|
2225
2247
|
tick_width: 1,
|
|
2226
2248
|
tick_length: 5,
|
|
2227
2249
|
label_size: 12,
|
|
2228
|
-
title_size: 18
|
|
2250
|
+
title_size: 18,
|
|
2251
|
+
grid_width: 1,
|
|
2252
|
+
grid_width_major: 2
|
|
2229
2253
|
},
|
|
2230
2254
|
axis_h: {
|
|
2231
2255
|
title_offset: 20
|
|
@@ -2250,10 +2274,6 @@ const theme_base = {
|
|
|
2250
2274
|
tick_position: "bottom",
|
|
2251
2275
|
title_position: "bottom"
|
|
2252
2276
|
},
|
|
2253
|
-
grid: {
|
|
2254
|
-
line_width: 1,
|
|
2255
|
-
line_width_major: 2
|
|
2256
|
-
},
|
|
2257
2277
|
plot: {
|
|
2258
2278
|
margin: 20,
|
|
2259
2279
|
padding_h: 50,
|
|
@@ -2271,10 +2291,8 @@ const theme_default = {
|
|
|
2271
2291
|
line_color: "black",
|
|
2272
2292
|
tick_color: "black",
|
|
2273
2293
|
label_color: "black",
|
|
2274
|
-
title_color: "black"
|
|
2275
|
-
|
|
2276
|
-
grid: {
|
|
2277
|
-
line_color: "#eeeeee"
|
|
2294
|
+
title_color: "black",
|
|
2295
|
+
grid_color: "#eeeeee"
|
|
2278
2296
|
}
|
|
2279
2297
|
};
|
|
2280
2298
|
const theme_light = {
|
|
@@ -2282,20 +2300,16 @@ const theme_light = {
|
|
|
2282
2300
|
line_color: "gray",
|
|
2283
2301
|
tick_color: "gray",
|
|
2284
2302
|
label_color: "gray",
|
|
2285
|
-
title_color: "gray"
|
|
2286
|
-
|
|
2287
|
-
grid: {
|
|
2288
|
-
line_color: "#eeeeee"
|
|
2303
|
+
title_color: "gray",
|
|
2304
|
+
grid_color: "#eeeeee"
|
|
2289
2305
|
}
|
|
2290
2306
|
};
|
|
2291
2307
|
const theme_gray = {
|
|
2292
2308
|
axis: {
|
|
2293
2309
|
tick_color: "black",
|
|
2294
2310
|
label_color: "black",
|
|
2295
|
-
title_color: "black"
|
|
2296
|
-
|
|
2297
|
-
grid: {
|
|
2298
|
-
line_color: "white"
|
|
2311
|
+
title_color: "black",
|
|
2312
|
+
grid_color: "white"
|
|
2299
2313
|
},
|
|
2300
2314
|
plot: {
|
|
2301
2315
|
background: "#eeeeee"
|
|
@@ -2305,10 +2319,8 @@ const theme_dark = {
|
|
|
2305
2319
|
axis: {
|
|
2306
2320
|
tick_color: "#333333",
|
|
2307
2321
|
label_color: "#555555",
|
|
2308
|
-
title_color: "black"
|
|
2309
|
-
|
|
2310
|
-
grid: {
|
|
2311
|
-
line_color: "#666666"
|
|
2322
|
+
title_color: "black",
|
|
2323
|
+
grid_color: "#666666"
|
|
2312
2324
|
},
|
|
2313
2325
|
plot: {
|
|
2314
2326
|
background: "#888888"
|
|
@@ -2319,12 +2331,10 @@ const theme_linedraw = {
|
|
|
2319
2331
|
line_color: "black",
|
|
2320
2332
|
tick_color: "black",
|
|
2321
2333
|
label_color: "black",
|
|
2322
|
-
title_color: "black"
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
line_width_major: 1,
|
|
2327
|
-
line_width_minor: 0.5
|
|
2334
|
+
title_color: "black",
|
|
2335
|
+
grid_color: "black",
|
|
2336
|
+
grid_width: 0.5,
|
|
2337
|
+
grid_width_major: 1
|
|
2328
2338
|
}
|
|
2329
2339
|
};
|
|
2330
2340
|
const theme_classic = {
|
|
@@ -2333,12 +2343,10 @@ const theme_classic = {
|
|
|
2333
2343
|
tick_color: "black",
|
|
2334
2344
|
label_color: "black",
|
|
2335
2345
|
title_color: "black"
|
|
2336
|
-
}
|
|
2337
|
-
grid: null
|
|
2346
|
+
}
|
|
2338
2347
|
};
|
|
2339
2348
|
const theme_void = {
|
|
2340
|
-
axis: null
|
|
2341
|
-
grid: null
|
|
2349
|
+
axis: null
|
|
2342
2350
|
};
|
|
2343
2351
|
function themeMerge(...themes) {
|
|
2344
2352
|
return themes.reduce((acc, t) => {
|
|
@@ -2358,10 +2366,6 @@ function themePreprocess(theme2, flip = false) {
|
|
|
2358
2366
|
axis_v,
|
|
2359
2367
|
axis_x,
|
|
2360
2368
|
axis_y,
|
|
2361
|
-
grid_h,
|
|
2362
|
-
grid_v,
|
|
2363
|
-
grid_x,
|
|
2364
|
-
grid_y,
|
|
2365
2369
|
plot: {
|
|
2366
2370
|
margin_x,
|
|
2367
2371
|
margin_y,
|
|
@@ -2378,8 +2382,6 @@ function themePreprocess(theme2, flip = false) {
|
|
|
2378
2382
|
if (flip) {
|
|
2379
2383
|
axis_h = obj_merge(axis_h, axis_y);
|
|
2380
2384
|
axis_v = obj_merge(axis_v, axis_x);
|
|
2381
|
-
grid_h = obj_merge(grid_h, grid_x);
|
|
2382
|
-
grid_v = obj_merge(grid_v, grid_y);
|
|
2383
2385
|
plot.margin_h = margin_y === void 0 ? margin_h : margin_y;
|
|
2384
2386
|
plot.margin_v = margin_x === void 0 ? margin_v : margin_x;
|
|
2385
2387
|
plot.padding_h = padding_y === void 0 ? padding_h : padding_y;
|
|
@@ -2387,8 +2389,6 @@ function themePreprocess(theme2, flip = false) {
|
|
|
2387
2389
|
} else {
|
|
2388
2390
|
axis_h = obj_merge(axis_h, axis_x);
|
|
2389
2391
|
axis_v = obj_merge(axis_v, axis_y);
|
|
2390
|
-
grid_h = obj_merge(grid_h, grid_y);
|
|
2391
|
-
grid_v = obj_merge(grid_v, grid_x);
|
|
2392
2392
|
plot.margin_h = margin_x === void 0 ? margin_h : margin_x;
|
|
2393
2393
|
plot.margin_v = margin_y === void 0 ? margin_v : margin_y;
|
|
2394
2394
|
plot.padding_h = padding_x === void 0 ? padding_h : padding_x;
|
|
@@ -2397,21 +2397,11 @@ function themePreprocess(theme2, flip = false) {
|
|
|
2397
2397
|
return {
|
|
2398
2398
|
axis_h,
|
|
2399
2399
|
axis_v,
|
|
2400
|
-
grid_h,
|
|
2401
|
-
grid_v,
|
|
2402
2400
|
plot,
|
|
2403
2401
|
...rest
|
|
2404
2402
|
};
|
|
2405
2403
|
}
|
|
2406
2404
|
function themeBuild(theme2) {
|
|
2407
|
-
function _grid_build(grid_theme) {
|
|
2408
|
-
return {
|
|
2409
|
-
line_color_major: ["line_color", "line_color_major"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
|
|
2410
|
-
line_color_minor: ["line_color", "line_color_minor"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
|
|
2411
|
-
line_width_major: ["line_width", "line_width_major"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0),
|
|
2412
|
-
line_width_minor: ["line_width", "line_width_minor"].map((k) => grid_theme?.[k]).findLast((x2) => x2 !== void 0)
|
|
2413
|
-
};
|
|
2414
|
-
}
|
|
2415
2405
|
return {
|
|
2416
2406
|
axis: {
|
|
2417
2407
|
h: obj_merge(...["axis", "axis_h"].map((k) => theme2?.[k])),
|
|
@@ -2429,10 +2419,6 @@ function themeBuild(theme2) {
|
|
|
2429
2419
|
...["axis", "axis_h", "axis_bottom"].map((k) => theme2?.[k])
|
|
2430
2420
|
)
|
|
2431
2421
|
},
|
|
2432
|
-
grid: {
|
|
2433
|
-
h: _grid_build(obj_merge(...["grid", "grid_h"].map((k) => theme2?.[k]))),
|
|
2434
|
-
v: _grid_build(obj_merge(...["grid", "grid_v"].map((k) => theme2?.[k])))
|
|
2435
|
-
},
|
|
2436
2422
|
plot: {
|
|
2437
2423
|
margin: {
|
|
2438
2424
|
left: ["margin", "margin_h", "margin_left"].map((k) => theme2?.plot?.[k]).findLast((x2) => x2 !== void 0) ?? 0,
|
|
@@ -2778,7 +2764,7 @@ const vvgeom = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
2778
2764
|
textsegment: textsegment$1,
|
|
2779
2765
|
tile: tile$1
|
|
2780
2766
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2781
|
-
const bar = Object.assign(function(data) {
|
|
2767
|
+
const bar = Object.assign(function(data, { position = "stack", width = 1, height = 1 }) {
|
|
2782
2768
|
if (data.x != null && data.y != null)
|
|
2783
2769
|
throw new Error(`"StatBar" only supports "x" or "y", not both`);
|
|
2784
2770
|
let values = data.x ?? data.y;
|
|
@@ -2793,18 +2779,45 @@ const bar = Object.assign(function(data) {
|
|
|
2793
2779
|
let $raw = Array.from(groups.values()), cates = Array.from(groups.keys());
|
|
2794
2780
|
let result = {
|
|
2795
2781
|
$raw,
|
|
2796
|
-
|
|
2797
|
-
$group: cates.map((x2) => x2.group),
|
|
2798
|
-
value: cates.map((x2) => x2.value)
|
|
2782
|
+
$group: cates.map((x2) => x2.group)
|
|
2799
2783
|
};
|
|
2800
2784
|
for (let key of keys) {
|
|
2801
2785
|
result[key] = cates.map((x2) => x2.group).map((i) => group.categories[i][key]);
|
|
2802
2786
|
}
|
|
2803
2787
|
if (data.x) {
|
|
2804
|
-
|
|
2788
|
+
result.x = cates.map((v) => v.value);
|
|
2789
|
+
result.height = $raw.map((v) => v.length);
|
|
2805
2790
|
} else {
|
|
2806
|
-
|
|
2791
|
+
result.y = cates.map((v) => v.value);
|
|
2792
|
+
result.width = $raw.map((v) => v.length);
|
|
2793
|
+
}
|
|
2794
|
+
if (position == "dodge") {
|
|
2795
|
+
if (data.x) {
|
|
2796
|
+
result.y = result.height.map((v) => v / 2);
|
|
2797
|
+
result.width = cates.map((_, i) => width / group.categories.length);
|
|
2798
|
+
result.xnudge = result.$group.map((v, i) => (result.xnudge?.[i] ?? 0) + ((v + 0.5) / group.categories.length - 0.5) * width);
|
|
2799
|
+
} else {
|
|
2800
|
+
result.x = result.width.map((v) => v / 2);
|
|
2801
|
+
result.height = cates.map((_, i) => height / group.categories.length);
|
|
2802
|
+
result.ynudge = result.$group.map((v, i) => (result.ynudge?.[i] ?? 0) + ((v + 0.5) / group.categories.length - 0.5) * height);
|
|
2803
|
+
}
|
|
2804
|
+
} else {
|
|
2805
|
+
let tmp = Object.fromEntries(Array.from(new Set(values)).map((v) => [v, 0]));
|
|
2806
|
+
let offset = cates.map((_) => 0);
|
|
2807
|
+
let indices = cates.map((cate, i) => [cate, i]).sort(([{ group: a }], [{ group: b }]) => a - b);
|
|
2808
|
+
for (let [cate, i] of indices) {
|
|
2809
|
+
offset[i] = tmp[cate.value];
|
|
2810
|
+
tmp[cate.value] += $raw[i].length;
|
|
2811
|
+
}
|
|
2812
|
+
if (data.x) {
|
|
2813
|
+
result.y = result.height.map((v, i) => offset[i] + v / 2);
|
|
2814
|
+
result.width = cates.map((_) => width);
|
|
2815
|
+
} else {
|
|
2816
|
+
result.x = result.width.map((v, i) => offset[i] + v / 2);
|
|
2817
|
+
result.height = cates.map((_) => height);
|
|
2818
|
+
}
|
|
2807
2819
|
}
|
|
2820
|
+
return result;
|
|
2808
2821
|
}, { core_attrs: ["x", "y", "xnudge", "ynudge"] });
|
|
2809
2822
|
const boxplot = Object.assign(function(data, {}) {
|
|
2810
2823
|
let missingAes = ["x", "y"].filter((a) => data[a] == null);
|
|
@@ -7185,42 +7198,39 @@ class GAxis {
|
|
|
7185
7198
|
this.titles = titles ?? vvlabel.asis();
|
|
7186
7199
|
this.minorBreaks = minorBreaks ?? breaks ?? scale.minorBreaks ?? scale.breaks;
|
|
7187
7200
|
}
|
|
7188
|
-
|
|
7201
|
+
getBreaks({ range: range2, expandMult, breakSlot } = {}) {
|
|
7189
7202
|
let majorBreaks = this.breaks, minorBreaks = this.minorBreaks, labels = this.labels, titles = this.titles;
|
|
7190
7203
|
let min = range2?.min ?? this?.range?.min, max = range2?.max ?? this?.range?.max, interval2 = max - min || 0;
|
|
7191
7204
|
min = min == null ? min : plus$1(min, -(expandMult?.min ?? 0) * interval2);
|
|
7192
7205
|
max = max == null ? max : plus$1(max, +(expandMult?.max ?? 0) * interval2);
|
|
7193
|
-
function normalizeBreaks(val) {
|
|
7194
|
-
if (val.position != null) return val;
|
|
7195
|
-
return { position: val };
|
|
7196
|
-
}
|
|
7197
7206
|
if (typeof majorBreaks == "function") majorBreaks = majorBreaks({ min, max });
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
if (typeof minorBreaks == "function") minorBreaks = minorBreaks({ min, max, minor: true });
|
|
7201
|
-
minorBreaks = Array.isArray(minorBreaks) ? minorBreaks.map(normalizeBreaks) : [];
|
|
7202
|
-
if (typeof labels === "function") labels = breaks.map(labels);
|
|
7207
|
+
if (!Array.isArray(majorBreaks)) majorBreaks = [];
|
|
7208
|
+
if (typeof labels === "function") labels = majorBreaks.map(labels);
|
|
7203
7209
|
if (!Array.isArray(labels)) {
|
|
7204
7210
|
labels = [];
|
|
7205
|
-
} else if (labels.length !=
|
|
7211
|
+
} else if (labels.length != majorBreaks.length) {
|
|
7206
7212
|
throw new Error("Length of labels must be the same as breaks");
|
|
7207
7213
|
}
|
|
7208
|
-
if (typeof titles === "function") titles =
|
|
7214
|
+
if (typeof titles === "function") titles = majorBreaks.map(titles);
|
|
7209
7215
|
if (!Array.isArray(titles)) {
|
|
7210
7216
|
titles = [];
|
|
7211
|
-
} else if (titles.length !=
|
|
7217
|
+
} else if (titles.length != majorBreaks.length) {
|
|
7212
7218
|
throw new Error("Length of titles must be the same as breaks");
|
|
7213
7219
|
}
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7220
|
+
if (typeof minorBreaks == "function") minorBreaks = minorBreaks({ min, max, minor: true });
|
|
7221
|
+
if (!Array.isArray(minorBreaks)) minorBreaks = [];
|
|
7222
|
+
majorBreaks = majorBreaks.map((value, i) => ({ type: "major", value, label: labels[i], title: titles[i] }));
|
|
7223
|
+
minorBreaks = minorBreaks.map((x2) => ({ type: "minor", value: x2 }));
|
|
7224
|
+
let breaks = majorBreaks.concat(minorBreaks);
|
|
7225
|
+
if (breakSlot instanceof Function) {
|
|
7226
|
+
breaks = expandFragment(breakSlot({ breaks, majorBreaks, minorBreaks, min, max })).filter((c) => c.type.$_type == "axis-break").map((c) => ({ ...c.type.$_props, ...c.props }));
|
|
7227
|
+
}
|
|
7228
|
+
return breaks;
|
|
7219
7229
|
}
|
|
7220
7230
|
}
|
|
7221
7231
|
const _hoisted_1$e = ["font-size"];
|
|
7222
7232
|
const _hoisted_2$8 = { key: 0 };
|
|
7223
|
-
const _sfc_main$
|
|
7233
|
+
const _sfc_main$15 = {
|
|
7224
7234
|
__name: "CoreText",
|
|
7225
7235
|
props: {
|
|
7226
7236
|
x: { type: Number, default: 0 },
|
|
@@ -7305,7 +7315,7 @@ const _sfc_main$13 = {
|
|
|
7305
7315
|
}), [
|
|
7306
7316
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
7307
7317
|
__props.title ? (openBlock(), createElementBlock("title", _hoisted_2$8, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
7308
|
-
createTextVNode(" " + toDisplayString(__props.text
|
|
7318
|
+
createTextVNode(" " + toDisplayString(__props.text?.replace(/ /g, " ")), 1)
|
|
7309
7319
|
])
|
|
7310
7320
|
], 16, _hoisted_1$e);
|
|
7311
7321
|
};
|
|
@@ -7746,16 +7756,16 @@ var hasRequiredDecode;
|
|
|
7746
7756
|
function requireDecode() {
|
|
7747
7757
|
if (hasRequiredDecode) return decode;
|
|
7748
7758
|
hasRequiredDecode = 1;
|
|
7749
|
-
(function(exports
|
|
7759
|
+
(function(exports) {
|
|
7750
7760
|
var __importDefault = decode && decode.__importDefault || function(mod) {
|
|
7751
7761
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
7752
7762
|
};
|
|
7753
|
-
Object.defineProperty(exports
|
|
7754
|
-
exports
|
|
7763
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7764
|
+
exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTML = exports.determineBranch = exports.JUMP_OFFSET_BASE = exports.BinTrieFlags = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
|
|
7755
7765
|
var decode_data_html_1 = __importDefault(/* @__PURE__ */ requireDecodeDataHtml());
|
|
7756
|
-
exports
|
|
7766
|
+
exports.htmlDecodeTree = decode_data_html_1.default;
|
|
7757
7767
|
var decode_data_xml_1 = __importDefault(/* @__PURE__ */ requireDecodeDataXml());
|
|
7758
|
-
exports
|
|
7768
|
+
exports.xmlDecodeTree = decode_data_xml_1.default;
|
|
7759
7769
|
var decode_codepoint_1 = __importDefault(/* @__PURE__ */ requireDecode_codepoint());
|
|
7760
7770
|
var BinTrieFlags;
|
|
7761
7771
|
(function(BinTrieFlags2) {
|
|
@@ -7763,8 +7773,8 @@ function requireDecode() {
|
|
|
7763
7773
|
BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 32512] = "BRANCH_LENGTH";
|
|
7764
7774
|
BinTrieFlags2[BinTrieFlags2["MULTI_BYTE"] = 128] = "MULTI_BYTE";
|
|
7765
7775
|
BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE";
|
|
7766
|
-
})(BinTrieFlags = exports
|
|
7767
|
-
exports
|
|
7776
|
+
})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
|
|
7777
|
+
exports.JUMP_OFFSET_BASE = 48 - 1;
|
|
7768
7778
|
function getDecoder(decodeTree) {
|
|
7769
7779
|
return function decodeHTMLBinary(str, strict) {
|
|
7770
7780
|
var ret = "";
|
|
@@ -7837,7 +7847,7 @@ function requireDecode() {
|
|
|
7837
7847
|
}
|
|
7838
7848
|
var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
|
|
7839
7849
|
if (jumpOffset) {
|
|
7840
|
-
var value = char - exports
|
|
7850
|
+
var value = char - exports.JUMP_OFFSET_BASE - jumpOffset;
|
|
7841
7851
|
return value < 0 || value > branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
|
|
7842
7852
|
}
|
|
7843
7853
|
var lo = nodeIdx;
|
|
@@ -7855,21 +7865,21 @@ function requireDecode() {
|
|
|
7855
7865
|
}
|
|
7856
7866
|
return -1;
|
|
7857
7867
|
}
|
|
7858
|
-
exports
|
|
7868
|
+
exports.determineBranch = determineBranch;
|
|
7859
7869
|
var htmlDecoder = getDecoder(decode_data_html_1.default);
|
|
7860
7870
|
var xmlDecoder = getDecoder(decode_data_xml_1.default);
|
|
7861
7871
|
function decodeHTML(str) {
|
|
7862
7872
|
return htmlDecoder(str, false);
|
|
7863
7873
|
}
|
|
7864
|
-
exports
|
|
7874
|
+
exports.decodeHTML = decodeHTML;
|
|
7865
7875
|
function decodeHTMLStrict(str) {
|
|
7866
7876
|
return htmlDecoder(str, true);
|
|
7867
7877
|
}
|
|
7868
|
-
exports
|
|
7878
|
+
exports.decodeHTMLStrict = decodeHTMLStrict;
|
|
7869
7879
|
function decodeXML(str) {
|
|
7870
7880
|
return xmlDecoder(str, true);
|
|
7871
7881
|
}
|
|
7872
|
-
exports
|
|
7882
|
+
exports.decodeXML = decodeXML;
|
|
7873
7883
|
})(decode);
|
|
7874
7884
|
return decode;
|
|
7875
7885
|
}
|
|
@@ -12141,17 +12151,17 @@ var hasRequiredEncodeTrie;
|
|
|
12141
12151
|
function requireEncodeTrie() {
|
|
12142
12152
|
if (hasRequiredEncodeTrie) return encodeTrie;
|
|
12143
12153
|
hasRequiredEncodeTrie = 1;
|
|
12144
|
-
(function(exports
|
|
12154
|
+
(function(exports) {
|
|
12145
12155
|
var __importDefault = encodeTrie && encodeTrie.__importDefault || function(mod) {
|
|
12146
12156
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
12147
12157
|
};
|
|
12148
|
-
Object.defineProperty(exports
|
|
12149
|
-
exports
|
|
12158
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12159
|
+
exports.getTrie = exports.encodeHTMLTrieRe = exports.getCodePoint = void 0;
|
|
12150
12160
|
var entities_json_1 = __importDefault(require$$2);
|
|
12151
12161
|
function isHighSurrugate(c) {
|
|
12152
12162
|
return (c & 64512) === 55296;
|
|
12153
12163
|
}
|
|
12154
|
-
exports
|
|
12164
|
+
exports.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
12155
12165
|
String.prototype.codePointAt != null ? function(str, index2) {
|
|
12156
12166
|
return str.codePointAt(index2);
|
|
12157
12167
|
} : (
|
|
@@ -12183,13 +12193,13 @@ function requireEncodeTrie() {
|
|
|
12183
12193
|
ret += str.substring(lastIdx, i) + next2.value;
|
|
12184
12194
|
lastIdx = i + 1;
|
|
12185
12195
|
} else {
|
|
12186
|
-
ret += str.substring(lastIdx, i) + "&#x" + exports
|
|
12196
|
+
ret += str.substring(lastIdx, i) + "&#x" + exports.getCodePoint(str, i).toString(16) + ";";
|
|
12187
12197
|
lastIdx = regExp.lastIndex += Number(isHighSurrugate(char));
|
|
12188
12198
|
}
|
|
12189
12199
|
}
|
|
12190
12200
|
return ret + str.substr(lastIdx);
|
|
12191
12201
|
}
|
|
12192
|
-
exports
|
|
12202
|
+
exports.encodeHTMLTrieRe = encodeHTMLTrieRe;
|
|
12193
12203
|
function getTrie(map2) {
|
|
12194
12204
|
var _a, _b, _c, _d;
|
|
12195
12205
|
var trie2 = /* @__PURE__ */ new Map();
|
|
@@ -12209,7 +12219,7 @@ function requireEncodeTrie() {
|
|
|
12209
12219
|
}
|
|
12210
12220
|
return trie2;
|
|
12211
12221
|
}
|
|
12212
|
-
exports
|
|
12222
|
+
exports.getTrie = getTrie;
|
|
12213
12223
|
})(encodeTrie);
|
|
12214
12224
|
return encodeTrie;
|
|
12215
12225
|
}
|
|
@@ -12304,27 +12314,27 @@ var hasRequiredLib;
|
|
|
12304
12314
|
function requireLib() {
|
|
12305
12315
|
if (hasRequiredLib) return lib;
|
|
12306
12316
|
hasRequiredLib = 1;
|
|
12307
|
-
(function(exports
|
|
12308
|
-
Object.defineProperty(exports
|
|
12309
|
-
exports
|
|
12317
|
+
(function(exports) {
|
|
12318
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12319
|
+
exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.DecodingMode = exports.EntityLevel = void 0;
|
|
12310
12320
|
var decode_1 = /* @__PURE__ */ requireDecode();
|
|
12311
12321
|
var encode_12 = /* @__PURE__ */ requireEncode();
|
|
12312
12322
|
var EntityLevel;
|
|
12313
12323
|
(function(EntityLevel2) {
|
|
12314
12324
|
EntityLevel2[EntityLevel2["XML"] = 0] = "XML";
|
|
12315
12325
|
EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML";
|
|
12316
|
-
})(EntityLevel = exports
|
|
12326
|
+
})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {}));
|
|
12317
12327
|
var DecodingMode;
|
|
12318
12328
|
(function(DecodingMode2) {
|
|
12319
12329
|
DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy";
|
|
12320
12330
|
DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict";
|
|
12321
|
-
})(DecodingMode = exports
|
|
12331
|
+
})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
|
|
12322
12332
|
var EncodingMode;
|
|
12323
12333
|
(function(EncodingMode2) {
|
|
12324
12334
|
EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8";
|
|
12325
12335
|
EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII";
|
|
12326
12336
|
EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive";
|
|
12327
|
-
})(EncodingMode = exports
|
|
12337
|
+
})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {}));
|
|
12328
12338
|
function decode2(data, options) {
|
|
12329
12339
|
if (options === void 0) {
|
|
12330
12340
|
options = EntityLevel.XML;
|
|
@@ -12338,7 +12348,7 @@ function requireLib() {
|
|
|
12338
12348
|
}
|
|
12339
12349
|
return decode_1.decodeXML(data);
|
|
12340
12350
|
}
|
|
12341
|
-
exports
|
|
12351
|
+
exports.decode = decode2;
|
|
12342
12352
|
function decodeStrict(data, options) {
|
|
12343
12353
|
if (options === void 0) {
|
|
12344
12354
|
options = EntityLevel.XML;
|
|
@@ -12352,7 +12362,7 @@ function requireLib() {
|
|
|
12352
12362
|
}
|
|
12353
12363
|
return decode_1.decodeXML(data);
|
|
12354
12364
|
}
|
|
12355
|
-
exports
|
|
12365
|
+
exports.decodeStrict = decodeStrict;
|
|
12356
12366
|
function encode2(data, options) {
|
|
12357
12367
|
if (options === void 0) {
|
|
12358
12368
|
options = EntityLevel.XML;
|
|
@@ -12368,52 +12378,52 @@ function requireLib() {
|
|
|
12368
12378
|
}
|
|
12369
12379
|
return encode_12.encodeXML(data);
|
|
12370
12380
|
}
|
|
12371
|
-
exports
|
|
12381
|
+
exports.encode = encode2;
|
|
12372
12382
|
var encode_2 = /* @__PURE__ */ requireEncode();
|
|
12373
|
-
Object.defineProperty(exports
|
|
12383
|
+
Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function() {
|
|
12374
12384
|
return encode_2.encodeXML;
|
|
12375
12385
|
} });
|
|
12376
|
-
Object.defineProperty(exports
|
|
12386
|
+
Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function() {
|
|
12377
12387
|
return encode_2.encodeHTML;
|
|
12378
12388
|
} });
|
|
12379
|
-
Object.defineProperty(exports
|
|
12389
|
+
Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function() {
|
|
12380
12390
|
return encode_2.encodeNonAsciiHTML;
|
|
12381
12391
|
} });
|
|
12382
|
-
Object.defineProperty(exports
|
|
12392
|
+
Object.defineProperty(exports, "escape", { enumerable: true, get: function() {
|
|
12383
12393
|
return encode_2.escape;
|
|
12384
12394
|
} });
|
|
12385
|
-
Object.defineProperty(exports
|
|
12395
|
+
Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function() {
|
|
12386
12396
|
return encode_2.escapeUTF8;
|
|
12387
12397
|
} });
|
|
12388
|
-
Object.defineProperty(exports
|
|
12398
|
+
Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function() {
|
|
12389
12399
|
return encode_2.encodeHTML;
|
|
12390
12400
|
} });
|
|
12391
|
-
Object.defineProperty(exports
|
|
12401
|
+
Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function() {
|
|
12392
12402
|
return encode_2.encodeHTML;
|
|
12393
12403
|
} });
|
|
12394
12404
|
var decode_2 = /* @__PURE__ */ requireDecode();
|
|
12395
|
-
Object.defineProperty(exports
|
|
12405
|
+
Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function() {
|
|
12396
12406
|
return decode_2.decodeXML;
|
|
12397
12407
|
} });
|
|
12398
|
-
Object.defineProperty(exports
|
|
12408
|
+
Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function() {
|
|
12399
12409
|
return decode_2.decodeHTML;
|
|
12400
12410
|
} });
|
|
12401
|
-
Object.defineProperty(exports
|
|
12411
|
+
Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function() {
|
|
12402
12412
|
return decode_2.decodeHTMLStrict;
|
|
12403
12413
|
} });
|
|
12404
|
-
Object.defineProperty(exports
|
|
12414
|
+
Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function() {
|
|
12405
12415
|
return decode_2.decodeHTML;
|
|
12406
12416
|
} });
|
|
12407
|
-
Object.defineProperty(exports
|
|
12417
|
+
Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function() {
|
|
12408
12418
|
return decode_2.decodeHTML;
|
|
12409
12419
|
} });
|
|
12410
|
-
Object.defineProperty(exports
|
|
12420
|
+
Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function() {
|
|
12411
12421
|
return decode_2.decodeHTMLStrict;
|
|
12412
12422
|
} });
|
|
12413
|
-
Object.defineProperty(exports
|
|
12423
|
+
Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function() {
|
|
12414
12424
|
return decode_2.decodeHTMLStrict;
|
|
12415
12425
|
} });
|
|
12416
|
-
Object.defineProperty(exports
|
|
12426
|
+
Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function() {
|
|
12417
12427
|
return decode_2.decodeXML;
|
|
12418
12428
|
} });
|
|
12419
12429
|
})(lib);
|
|
@@ -14471,7 +14481,7 @@ XmlRenderer.prototype.tag = tag;
|
|
|
14471
14481
|
XmlRenderer.prototype.esc = escapeXml;
|
|
14472
14482
|
const _hoisted_1$d = ["text-anchor", "font-size"];
|
|
14473
14483
|
const _hoisted_2$7 = { key: 0 };
|
|
14474
|
-
const _sfc_main$
|
|
14484
|
+
const _sfc_main$14 = {
|
|
14475
14485
|
__name: "CoreMarkdown",
|
|
14476
14486
|
props: {
|
|
14477
14487
|
x: { type: Number, default: 0 },
|
|
@@ -14618,6 +14628,72 @@ const _sfc_main$12 = {
|
|
|
14618
14628
|
};
|
|
14619
14629
|
}
|
|
14620
14630
|
};
|
|
14631
|
+
const _sfc_main$13 = {
|
|
14632
|
+
__name: "CoreAxisLabel",
|
|
14633
|
+
props: {
|
|
14634
|
+
type: String,
|
|
14635
|
+
value: null,
|
|
14636
|
+
getPosition: Function
|
|
14637
|
+
},
|
|
14638
|
+
emits: [
|
|
14639
|
+
"click",
|
|
14640
|
+
"dblclick",
|
|
14641
|
+
"contextmenu",
|
|
14642
|
+
"pointerdown",
|
|
14643
|
+
"pointerup",
|
|
14644
|
+
"pointerover",
|
|
14645
|
+
"pointerout",
|
|
14646
|
+
"pointerenter",
|
|
14647
|
+
"pointerleave",
|
|
14648
|
+
"pointermove",
|
|
14649
|
+
"wheel",
|
|
14650
|
+
"singleclick"
|
|
14651
|
+
],
|
|
14652
|
+
setup(__props, { emit: __emit }) {
|
|
14653
|
+
const emit = __emit;
|
|
14654
|
+
const vOn = {
|
|
14655
|
+
pointerdown(e) {
|
|
14656
|
+
emit("pointerdown", e, __props.getPosition(e), __props.value);
|
|
14657
|
+
},
|
|
14658
|
+
pointerup(e) {
|
|
14659
|
+
emit("pointerup", e, __props.getPosition(e), __props.value);
|
|
14660
|
+
},
|
|
14661
|
+
pointerover(e) {
|
|
14662
|
+
emit("pointerover", e, __props.getPosition(e), __props.value);
|
|
14663
|
+
},
|
|
14664
|
+
pointerout(e) {
|
|
14665
|
+
emit("pointerout", e, __props.getPosition(e), __props.value);
|
|
14666
|
+
},
|
|
14667
|
+
pointerenter(e) {
|
|
14668
|
+
emit("pointerenter", e, __props.getPosition(e), __props.value);
|
|
14669
|
+
},
|
|
14670
|
+
pointerleave(e) {
|
|
14671
|
+
emit("pointerleave", e, __props.getPosition(e), __props.value);
|
|
14672
|
+
},
|
|
14673
|
+
dblclick(e) {
|
|
14674
|
+
emit("dblclick", e, __props.getPosition(e), __props.value);
|
|
14675
|
+
},
|
|
14676
|
+
click(e) {
|
|
14677
|
+
emit("click", e, __props.getPosition(e), __props.value);
|
|
14678
|
+
},
|
|
14679
|
+
singleclick(e) {
|
|
14680
|
+
emit("singleclick", e, __props.getPosition(e), __props.value);
|
|
14681
|
+
},
|
|
14682
|
+
contextmenu(e) {
|
|
14683
|
+
emit("contextmenu", e, __props.getPosition(e), __props.value);
|
|
14684
|
+
},
|
|
14685
|
+
pointermove(e) {
|
|
14686
|
+
emit("pointermove", e, __props.getPosition(e), __props.value);
|
|
14687
|
+
},
|
|
14688
|
+
wheel(e) {
|
|
14689
|
+
emit("wheel", e, __props.getPosition(e), __props.value);
|
|
14690
|
+
}
|
|
14691
|
+
};
|
|
14692
|
+
return (_ctx, _cache) => {
|
|
14693
|
+
return __props.type == "markdown" ? (openBlock(), createBlock(_sfc_main$14, mergeProps({ key: 0 }, toHandlers(vOn)), null, 16)) : (openBlock(), createBlock(_sfc_main$15, mergeProps({ key: 1 }, toHandlers(vOn)), null, 16));
|
|
14694
|
+
};
|
|
14695
|
+
}
|
|
14696
|
+
};
|
|
14621
14697
|
const _hoisted_1$c = ["transform"];
|
|
14622
14698
|
const _hoisted_2$6 = ["x2"];
|
|
14623
14699
|
const _hoisted_3$4 = {
|
|
@@ -14626,12 +14702,12 @@ const _hoisted_3$4 = {
|
|
|
14626
14702
|
};
|
|
14627
14703
|
const _hoisted_4$3 = ["width", "cursor"];
|
|
14628
14704
|
const _hoisted_5$2 = {
|
|
14629
|
-
key:
|
|
14705
|
+
key: 1,
|
|
14630
14706
|
class: "vvplot-interactive",
|
|
14631
14707
|
fill: "transparent"
|
|
14632
14708
|
};
|
|
14633
14709
|
const _hoisted_6$2 = ["x"];
|
|
14634
|
-
const _sfc_main$
|
|
14710
|
+
const _sfc_main$12 = {
|
|
14635
14711
|
__name: "CoreAxisH",
|
|
14636
14712
|
props: {
|
|
14637
14713
|
coord: String,
|
|
@@ -14712,20 +14788,20 @@ const _sfc_main$11 = {
|
|
|
14712
14788
|
const tickLines = computed(() => {
|
|
14713
14789
|
let result = [];
|
|
14714
14790
|
for (let tick of __props.ticks) {
|
|
14715
|
-
|
|
14716
|
-
let pos = __props.coord2pos({ h:
|
|
14791
|
+
let { value, theme: $theme } = tick;
|
|
14792
|
+
let pos = __props.coord2pos({ h: value }).h;
|
|
14717
14793
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
14718
|
-
|
|
14719
|
-
if (
|
|
14720
|
-
let offset = (
|
|
14794
|
+
pos += __props.layout.l;
|
|
14795
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
14796
|
+
let offset = ($theme.tick_position == "top" ? -1 : 1) * $theme.tick_length;
|
|
14721
14797
|
result.push({
|
|
14722
|
-
key: "line-" +
|
|
14798
|
+
key: "line-" + value,
|
|
14723
14799
|
y1: 0,
|
|
14724
14800
|
y2: offset,
|
|
14725
|
-
x1:
|
|
14726
|
-
x2:
|
|
14727
|
-
"stroke":
|
|
14728
|
-
"stroke-width":
|
|
14801
|
+
x1: pos,
|
|
14802
|
+
x2: pos,
|
|
14803
|
+
"stroke": $theme.tick_color,
|
|
14804
|
+
"stroke-width": $theme.tick_width,
|
|
14729
14805
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
14730
14806
|
style: { transition: __props.transition }
|
|
14731
14807
|
});
|
|
@@ -14733,43 +14809,45 @@ const _sfc_main$11 = {
|
|
|
14733
14809
|
return result.filter((t) => t.stroke != null).sort((a, b) => a.x1 - b.x1);
|
|
14734
14810
|
});
|
|
14735
14811
|
const tickTexts = computed(() => {
|
|
14736
|
-
let isTop = (__props.theme.label_position ?? __props.theme.tick_position) == "top";
|
|
14737
14812
|
let result = [];
|
|
14738
14813
|
for (let tick of __props.ticks) {
|
|
14739
|
-
|
|
14740
|
-
let
|
|
14814
|
+
let { type, value, label, title, theme: $theme, ...etc } = tick;
|
|
14815
|
+
let isTop = ($theme.label_position ?? $theme.tick_position) == "top";
|
|
14816
|
+
let pos = __props.coord2pos({ h: value }).h;
|
|
14741
14817
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
14742
|
-
|
|
14743
|
-
if (
|
|
14744
|
-
let offset = (isTop ? -1 : 1) * (
|
|
14818
|
+
pos += __props.layout.l;
|
|
14819
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
14820
|
+
let offset = (isTop ? -1 : 1) * ($theme.label_offset ?? $theme.tick_length);
|
|
14745
14821
|
let anchorX, anchorY, dockX, dockY;
|
|
14746
|
-
if (
|
|
14747
|
-
anchorX =
|
|
14748
|
-
anchorY =
|
|
14822
|
+
if ($theme.label_anchor_x != null || $theme.label_anchor_y != null) {
|
|
14823
|
+
anchorX = $theme.label_anchor_x ?? 0.5;
|
|
14824
|
+
anchorY = $theme.label_anchor_y ?? (isTop ? 0 : 1);
|
|
14749
14825
|
} else {
|
|
14750
|
-
dockX =
|
|
14751
|
-
dockY =
|
|
14826
|
+
dockX = $theme.label_dock_x ?? 0.5;
|
|
14827
|
+
dockY = $theme.label_dock_y ?? (isTop ? 0 : 1);
|
|
14752
14828
|
}
|
|
14753
14829
|
result.push({
|
|
14754
14830
|
wrapper: {
|
|
14755
|
-
key: "text-" +
|
|
14831
|
+
key: "text-" + value,
|
|
14756
14832
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
14757
14833
|
style: { transition: __props.transition }
|
|
14758
14834
|
},
|
|
14759
14835
|
text: {
|
|
14760
|
-
x:
|
|
14836
|
+
x: pos,
|
|
14761
14837
|
y: offset,
|
|
14762
|
-
angle:
|
|
14838
|
+
angle: $theme.label_angle,
|
|
14763
14839
|
anchorX,
|
|
14764
14840
|
anchorY,
|
|
14765
14841
|
dockX,
|
|
14766
14842
|
dockY,
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14843
|
+
type: $theme.label_type,
|
|
14844
|
+
text: label,
|
|
14845
|
+
title: title ?? label,
|
|
14846
|
+
fontSize: $theme.label_size,
|
|
14847
|
+
fill: $theme.label_color,
|
|
14771
14848
|
"font-family": "sans-serif",
|
|
14772
|
-
|
|
14849
|
+
value,
|
|
14850
|
+
...etc
|
|
14773
14851
|
}
|
|
14774
14852
|
});
|
|
14775
14853
|
}
|
|
@@ -14800,13 +14878,6 @@ const _sfc_main$11 = {
|
|
|
14800
14878
|
}
|
|
14801
14879
|
}
|
|
14802
14880
|
e.target.addEventListener("pointermove", detectMove, { passive: true });
|
|
14803
|
-
e.target.addEventListener("pointerup", function(ev) {
|
|
14804
|
-
e.target.removeEventListener("pointermove", detectMove);
|
|
14805
|
-
if (!pointerMoved) {
|
|
14806
|
-
let position2 = getPosition(ev);
|
|
14807
|
-
emit("singleclick", new PointerEvent("singleclick", ev), position2);
|
|
14808
|
-
}
|
|
14809
|
-
}, { once: true });
|
|
14810
14881
|
let act = __props.action.find((a) => a.action == "move");
|
|
14811
14882
|
if (!act) return;
|
|
14812
14883
|
e.preventDefault();
|
|
@@ -14965,12 +15036,15 @@ const _sfc_main$11 = {
|
|
|
14965
15036
|
pointerleave(e) {
|
|
14966
15037
|
emit("pointerleave", e, getPosition(e));
|
|
14967
15038
|
},
|
|
14968
|
-
dblclick(e) {
|
|
14969
|
-
emit("dblclick", e, getPosition(e));
|
|
14970
|
-
},
|
|
14971
15039
|
click(e) {
|
|
14972
15040
|
emit("click", e, getPosition(e));
|
|
14973
15041
|
},
|
|
15042
|
+
singleclick(e) {
|
|
15043
|
+
emit("singleclick", e, getPosition(e));
|
|
15044
|
+
},
|
|
15045
|
+
dblclick(e) {
|
|
15046
|
+
emit("dblclick", e, getPosition(e));
|
|
15047
|
+
},
|
|
14974
15048
|
contextmenu(e) {
|
|
14975
15049
|
emit("contextmenu", e, getPosition(e));
|
|
14976
15050
|
},
|
|
@@ -14984,13 +15058,14 @@ const _sfc_main$11 = {
|
|
|
14984
15058
|
transform: transform.value,
|
|
14985
15059
|
style: normalizeStyle({ transition: __props.transition })
|
|
14986
15060
|
}, [
|
|
14987
|
-
|
|
15061
|
+
axisLine.value.stroke != null ? (openBlock(), createElementBlock("line", mergeProps({
|
|
15062
|
+
key: 0,
|
|
14988
15063
|
ref: "i",
|
|
14989
15064
|
x1: 0,
|
|
14990
15065
|
x2: width.value,
|
|
14991
15066
|
y1: 0,
|
|
14992
15067
|
y2: 0
|
|
14993
|
-
}, axisLine.value), null, 16, _hoisted_2$6),
|
|
15068
|
+
}, axisLine.value), null, 16, _hoisted_2$6)) : createCommentVNode("", true),
|
|
14994
15069
|
_cache[1] || (_cache[1] = createTextVNode()),
|
|
14995
15070
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tickLines.value, (tick) => {
|
|
14996
15071
|
return openBlock(), createElementBlock("line", mergeProps({ ref_for: true }, tick), null, 16);
|
|
@@ -14998,13 +15073,7 @@ const _sfc_main$11 = {
|
|
|
14998
15073
|
_cache[2] || (_cache[2] = createTextVNode()),
|
|
14999
15074
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tickTexts.value, (tick) => {
|
|
15000
15075
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, tick.wrapper), [
|
|
15001
|
-
|
|
15002
|
-
key: 0,
|
|
15003
|
-
ref_for: true
|
|
15004
|
-
}, tick.text), null, 16)) : (openBlock(), createBlock(_sfc_main$13, mergeProps({
|
|
15005
|
-
key: 1,
|
|
15006
|
-
ref_for: true
|
|
15007
|
-
}, tick.text), null, 16))
|
|
15076
|
+
createVNode(_sfc_main$13, mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
|
|
15008
15077
|
], 16);
|
|
15009
15078
|
}), 256)),
|
|
15010
15079
|
_cache[3] || (_cache[3] = createTextVNode()),
|
|
@@ -15036,8 +15105,8 @@ const _sfc_main$11 = {
|
|
|
15036
15105
|
}, toHandlers(axisVOn, true), { onPointerdown: axisRescaleRightPointerdown }), null, 16, _hoisted_6$2)
|
|
15037
15106
|
])) : createCommentVNode("", true),
|
|
15038
15107
|
_cache[5] || (_cache[5] = createTextVNode()),
|
|
15039
|
-
axisTitle.value.text ? (openBlock(), createElementBlock(Fragment, { key:
|
|
15040
|
-
__props.theme.title_type == "markdown" ? (openBlock(), createBlock(_sfc_main$
|
|
15108
|
+
axisTitle.value.text ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
15109
|
+
__props.theme.title_type == "markdown" ? (openBlock(), createBlock(_sfc_main$14, normalizeProps(mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (openBlock(), createBlock(_sfc_main$15, normalizeProps(mergeProps({ key: 1 }, axisTitle.value)), null, 16))
|
|
15041
15110
|
], 64)) : createCommentVNode("", true)
|
|
15042
15111
|
], 12, _hoisted_1$c);
|
|
15043
15112
|
};
|
|
@@ -15051,12 +15120,12 @@ const _hoisted_3$3 = {
|
|
|
15051
15120
|
};
|
|
15052
15121
|
const _hoisted_4$2 = ["height", "cursor"];
|
|
15053
15122
|
const _hoisted_5$1 = {
|
|
15054
|
-
key:
|
|
15123
|
+
key: 1,
|
|
15055
15124
|
class: "vvplot-interactive",
|
|
15056
15125
|
fill: "transparent"
|
|
15057
15126
|
};
|
|
15058
15127
|
const _hoisted_6$1 = ["y"];
|
|
15059
|
-
const _sfc_main$
|
|
15128
|
+
const _sfc_main$11 = {
|
|
15060
15129
|
__name: "CoreAxisV",
|
|
15061
15130
|
props: {
|
|
15062
15131
|
coord: String,
|
|
@@ -15137,20 +15206,20 @@ const _sfc_main$10 = {
|
|
|
15137
15206
|
const tickLines = computed(() => {
|
|
15138
15207
|
let result = [];
|
|
15139
15208
|
for (let tick of __props.ticks) {
|
|
15140
|
-
|
|
15141
|
-
let pos = __props.coord2pos({ v:
|
|
15209
|
+
let { value, theme: $theme } = tick;
|
|
15210
|
+
let pos = __props.coord2pos({ v: value }).v;
|
|
15142
15211
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15143
|
-
|
|
15144
|
-
if (
|
|
15145
|
-
let offset = (
|
|
15212
|
+
pos += __props.layout.t;
|
|
15213
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15214
|
+
let offset = ($theme.tick_position == "right" ? 1 : -1) * $theme.tick_length;
|
|
15146
15215
|
result.push({
|
|
15147
|
-
key: "line-" + tick.
|
|
15148
|
-
y1:
|
|
15149
|
-
y2:
|
|
15216
|
+
key: "line-" + tick.value,
|
|
15217
|
+
y1: pos,
|
|
15218
|
+
y2: pos,
|
|
15150
15219
|
x1: 0,
|
|
15151
15220
|
x2: offset,
|
|
15152
|
-
"stroke": tick.color ??
|
|
15153
|
-
"stroke-width": tick.width ??
|
|
15221
|
+
"stroke": tick.color ?? $theme.tick_color,
|
|
15222
|
+
"stroke-width": tick.width ?? $theme.tick_width,
|
|
15154
15223
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15155
15224
|
style: { transition: __props.transition }
|
|
15156
15225
|
});
|
|
@@ -15158,43 +15227,45 @@ const _sfc_main$10 = {
|
|
|
15158
15227
|
return result.filter((t) => t.stroke != null).sort((a, b) => a.y1 - b.y1);
|
|
15159
15228
|
});
|
|
15160
15229
|
const tickTexts = computed(() => {
|
|
15161
|
-
let isRight = (__props.theme.label_position ?? __props.theme.tick_position) == "right";
|
|
15162
15230
|
let result = [];
|
|
15163
15231
|
for (let tick of __props.ticks) {
|
|
15164
|
-
|
|
15165
|
-
let
|
|
15232
|
+
let { type, value, label, title, theme: $theme, ...etc } = tick;
|
|
15233
|
+
let isRight = ($theme.label_position ?? $theme.tick_position) == "right";
|
|
15234
|
+
let pos = __props.coord2pos({ v: value }).v;
|
|
15166
15235
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15167
|
-
|
|
15168
|
-
if (
|
|
15169
|
-
let offset = (isRight ? 1 : -1) * ((
|
|
15236
|
+
pos += __props.layout.t;
|
|
15237
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15238
|
+
let offset = (isRight ? 1 : -1) * (($theme.label_offset ?? $theme.tick_length) + 3);
|
|
15170
15239
|
let anchorX, anchorY, dockX, dockY;
|
|
15171
|
-
if (
|
|
15172
|
-
anchorX =
|
|
15173
|
-
anchorY =
|
|
15240
|
+
if ($theme.label_anchor_x != null || $theme.label_anchor_y != null) {
|
|
15241
|
+
anchorX = $theme.label_anchor_x ?? (isRight ? 0 : 1);
|
|
15242
|
+
anchorY = $theme.label_anchor_y ?? 0.5;
|
|
15174
15243
|
} else {
|
|
15175
|
-
dockX =
|
|
15176
|
-
dockY =
|
|
15244
|
+
dockX = $theme.label_dock_x ?? (isRight ? 0 : 1);
|
|
15245
|
+
dockY = $theme.label_dock_y ?? 0.5;
|
|
15177
15246
|
}
|
|
15178
15247
|
result.push({
|
|
15179
15248
|
wrapper: {
|
|
15180
|
-
key: "text-" +
|
|
15249
|
+
key: "text-" + value,
|
|
15181
15250
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15182
15251
|
style: { transition: __props.transition }
|
|
15183
15252
|
},
|
|
15184
15253
|
text: {
|
|
15185
|
-
y:
|
|
15254
|
+
y: pos,
|
|
15186
15255
|
x: offset,
|
|
15187
|
-
angle:
|
|
15256
|
+
angle: $theme.label_angle,
|
|
15188
15257
|
anchorX,
|
|
15189
15258
|
anchorY,
|
|
15190
15259
|
dockX,
|
|
15191
15260
|
dockY,
|
|
15192
|
-
|
|
15193
|
-
|
|
15194
|
-
|
|
15195
|
-
|
|
15261
|
+
type: $theme.label_type,
|
|
15262
|
+
text: label,
|
|
15263
|
+
title: title ?? label,
|
|
15264
|
+
fontSize: $theme.label_size,
|
|
15265
|
+
fill: $theme.label_color,
|
|
15196
15266
|
"font-family": "sans-serif",
|
|
15197
|
-
|
|
15267
|
+
value,
|
|
15268
|
+
...etc
|
|
15198
15269
|
}
|
|
15199
15270
|
});
|
|
15200
15271
|
}
|
|
@@ -15225,13 +15296,6 @@ const _sfc_main$10 = {
|
|
|
15225
15296
|
}
|
|
15226
15297
|
}
|
|
15227
15298
|
e.target.addEventListener("pointermove", detectMove, { passive: true });
|
|
15228
|
-
e.target.addEventListener("pointerup", function(ev) {
|
|
15229
|
-
e.target.removeEventListener("pointermove", detectMove);
|
|
15230
|
-
if (!pointerMoved) {
|
|
15231
|
-
let position2 = getPosition(ev);
|
|
15232
|
-
emit("singleclick", new PointerEvent("singleclick", ev), position2);
|
|
15233
|
-
}
|
|
15234
|
-
}, { once: true });
|
|
15235
15299
|
let act = __props.action.find((a) => a.action == "move");
|
|
15236
15300
|
if (!act) return;
|
|
15237
15301
|
e.preventDefault();
|
|
@@ -15390,12 +15454,15 @@ const _sfc_main$10 = {
|
|
|
15390
15454
|
pointerleave(e) {
|
|
15391
15455
|
emit("pointerleave", e, getPosition(e));
|
|
15392
15456
|
},
|
|
15393
|
-
dblclick(e) {
|
|
15394
|
-
emit("dblclick", e, getPosition(e));
|
|
15395
|
-
},
|
|
15396
15457
|
click(e) {
|
|
15397
15458
|
emit("click", e, getPosition(e));
|
|
15398
15459
|
},
|
|
15460
|
+
singleclick(e) {
|
|
15461
|
+
emit("singleclick", e, getPosition(e));
|
|
15462
|
+
},
|
|
15463
|
+
dblclick(e) {
|
|
15464
|
+
emit("dblclick", e, getPosition(e));
|
|
15465
|
+
},
|
|
15399
15466
|
contextmenu(e) {
|
|
15400
15467
|
emit("contextmenu", e, getPosition(e));
|
|
15401
15468
|
},
|
|
@@ -15409,13 +15476,14 @@ const _sfc_main$10 = {
|
|
|
15409
15476
|
transform: transform.value,
|
|
15410
15477
|
style: normalizeStyle({ transition: __props.transition })
|
|
15411
15478
|
}, [
|
|
15412
|
-
|
|
15479
|
+
axisLine.value.stroke != null ? (openBlock(), createElementBlock("line", mergeProps({
|
|
15480
|
+
key: 0,
|
|
15413
15481
|
ref: "i",
|
|
15414
15482
|
x1: 0,
|
|
15415
15483
|
x2: 0,
|
|
15416
15484
|
y1: 0,
|
|
15417
15485
|
y2: height.value
|
|
15418
|
-
}, axisLine.value), null, 16, _hoisted_2$5),
|
|
15486
|
+
}, axisLine.value), null, 16, _hoisted_2$5)) : createCommentVNode("", true),
|
|
15419
15487
|
_cache[1] || (_cache[1] = createTextVNode()),
|
|
15420
15488
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tickLines.value, (tick) => {
|
|
15421
15489
|
return openBlock(), createElementBlock("line", mergeProps({ ref_for: true }, tick), null, 16);
|
|
@@ -15423,13 +15491,7 @@ const _sfc_main$10 = {
|
|
|
15423
15491
|
_cache[2] || (_cache[2] = createTextVNode()),
|
|
15424
15492
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tickTexts.value, (tick) => {
|
|
15425
15493
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, tick.wrapper), [
|
|
15426
|
-
|
|
15427
|
-
key: 0,
|
|
15428
|
-
ref_for: true
|
|
15429
|
-
}, tick.text), null, 16)) : (openBlock(), createBlock(_sfc_main$13, mergeProps({
|
|
15430
|
-
key: 1,
|
|
15431
|
-
ref_for: true
|
|
15432
|
-
}, tick.text), null, 16))
|
|
15494
|
+
createVNode(_sfc_main$13, mergeProps({ ref_for: true }, tick.text, { getPosition }), null, 16)
|
|
15433
15495
|
], 16);
|
|
15434
15496
|
}), 256)),
|
|
15435
15497
|
_cache[3] || (_cache[3] = createTextVNode()),
|
|
@@ -15461,14 +15523,14 @@ const _sfc_main$10 = {
|
|
|
15461
15523
|
}, toHandlers(axisVOn, true), { onPointerdown: axisRescaleBottomPointerdown }), null, 16, _hoisted_6$1)
|
|
15462
15524
|
])) : createCommentVNode("", true),
|
|
15463
15525
|
_cache[5] || (_cache[5] = createTextVNode()),
|
|
15464
|
-
axisTitle.value.text ? (openBlock(), createElementBlock(Fragment, { key:
|
|
15465
|
-
__props.theme.title_type == "markdown" ? (openBlock(), createBlock(_sfc_main$
|
|
15526
|
+
axisTitle.value.text ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
15527
|
+
__props.theme.title_type == "markdown" ? (openBlock(), createBlock(_sfc_main$14, normalizeProps(mergeProps({ key: 0 }, axisTitle.value)), null, 16)) : (openBlock(), createBlock(_sfc_main$15, normalizeProps(mergeProps({ key: 1 }, axisTitle.value)), null, 16))
|
|
15466
15528
|
], 64)) : createCommentVNode("", true)
|
|
15467
15529
|
], 12, _hoisted_1$b);
|
|
15468
15530
|
};
|
|
15469
15531
|
}
|
|
15470
15532
|
};
|
|
15471
|
-
const _sfc_main
|
|
15533
|
+
const _sfc_main$10 = {
|
|
15472
15534
|
__name: "CoreAxis",
|
|
15473
15535
|
props: {
|
|
15474
15536
|
theme: { type: Object, default: () => ({}) },
|
|
@@ -15477,8 +15539,8 @@ const _sfc_main$$ = {
|
|
|
15477
15539
|
},
|
|
15478
15540
|
setup(__props) {
|
|
15479
15541
|
const axis = {
|
|
15480
|
-
h: _sfc_main$
|
|
15481
|
-
v: _sfc_main$
|
|
15542
|
+
h: _sfc_main$12,
|
|
15543
|
+
v: _sfc_main$11
|
|
15482
15544
|
};
|
|
15483
15545
|
return (_ctx, _cache) => {
|
|
15484
15546
|
return __props.position != "none" ? (openBlock(), createBlock(resolveDynamicComponent(axis[__props.orientation]), {
|
|
@@ -15489,15 +15551,13 @@ const _sfc_main$$ = {
|
|
|
15489
15551
|
};
|
|
15490
15552
|
}
|
|
15491
15553
|
};
|
|
15492
|
-
const _sfc_main
|
|
15554
|
+
const _sfc_main$$ = {
|
|
15493
15555
|
__name: "CoreGridH",
|
|
15494
15556
|
props: {
|
|
15495
|
-
|
|
15496
|
-
minorBreaks: { type: Array, default: () => [] },
|
|
15557
|
+
breaks: { type: Array, default: () => [] },
|
|
15497
15558
|
coord2pos: Function,
|
|
15498
15559
|
pos2coord: Function,
|
|
15499
15560
|
layout: Object,
|
|
15500
|
-
theme: { type: Object, default: () => ({}) },
|
|
15501
15561
|
action: { type: Object, default: () => ({}) },
|
|
15502
15562
|
activeTransform: Object,
|
|
15503
15563
|
transition: String
|
|
@@ -15507,20 +15567,21 @@ const _sfc_main$_ = {
|
|
|
15507
15567
|
const height = computed(() => __props.layout.height + __props.layout.t + __props.layout.b);
|
|
15508
15568
|
const majorLines = computed(() => {
|
|
15509
15569
|
let result = [];
|
|
15510
|
-
for (let
|
|
15511
|
-
|
|
15570
|
+
for (let b of __props.breaks) {
|
|
15571
|
+
if (b.type != "major") continue;
|
|
15572
|
+
let pos = __props.coord2pos({ v: b.value }).v;
|
|
15512
15573
|
if (isNaN(pos)) continue;
|
|
15513
15574
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15514
|
-
|
|
15515
|
-
if (
|
|
15575
|
+
pos += __props.layout.t;
|
|
15576
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15516
15577
|
result.push({
|
|
15517
|
-
key: "major-" +
|
|
15578
|
+
key: "major-" + b.value,
|
|
15518
15579
|
x1: 0,
|
|
15519
15580
|
x2: width.value,
|
|
15520
|
-
y1:
|
|
15521
|
-
y2:
|
|
15522
|
-
"stroke":
|
|
15523
|
-
"stroke-width":
|
|
15581
|
+
y1: pos,
|
|
15582
|
+
y2: pos,
|
|
15583
|
+
"stroke": b.theme.grid_color_major,
|
|
15584
|
+
"stroke-width": b.theme.grid_width_major ?? 0,
|
|
15524
15585
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15525
15586
|
style: { transition: __props.transition }
|
|
15526
15587
|
});
|
|
@@ -15529,21 +15590,21 @@ const _sfc_main$_ = {
|
|
|
15529
15590
|
});
|
|
15530
15591
|
const minorLines = computed(() => {
|
|
15531
15592
|
let result = [];
|
|
15532
|
-
for (let
|
|
15533
|
-
if (
|
|
15534
|
-
let pos = __props.coord2pos({ v:
|
|
15593
|
+
for (let b of __props.breaks) {
|
|
15594
|
+
if (b.type != "minor") continue;
|
|
15595
|
+
let pos = __props.coord2pos({ v: b.value }).v;
|
|
15535
15596
|
if (isNaN(pos)) continue;
|
|
15536
15597
|
let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
|
|
15537
|
-
|
|
15538
|
-
if (
|
|
15598
|
+
pos += __props.layout.t;
|
|
15599
|
+
if (pos + tsl < 0 || pos + tsl > height.value) continue;
|
|
15539
15600
|
result.push({
|
|
15540
|
-
key: "minor-" +
|
|
15601
|
+
key: "minor-" + b.value,
|
|
15541
15602
|
x1: 0,
|
|
15542
15603
|
x2: width.value,
|
|
15543
|
-
y1:
|
|
15544
|
-
y2:
|
|
15545
|
-
"stroke":
|
|
15546
|
-
"stroke-width":
|
|
15604
|
+
y1: pos,
|
|
15605
|
+
y2: pos,
|
|
15606
|
+
"stroke": b.theme.grid_color_minor,
|
|
15607
|
+
"stroke-width": b.theme.grid_width_minor ?? 0,
|
|
15547
15608
|
transform: tsl ? `translate(0,${tsl})` : null,
|
|
15548
15609
|
style: { transition: __props.transition }
|
|
15549
15610
|
});
|
|
@@ -15562,15 +15623,13 @@ const _sfc_main$_ = {
|
|
|
15562
15623
|
};
|
|
15563
15624
|
}
|
|
15564
15625
|
};
|
|
15565
|
-
const _sfc_main$
|
|
15626
|
+
const _sfc_main$_ = {
|
|
15566
15627
|
__name: "CoreGridV",
|
|
15567
15628
|
props: {
|
|
15568
|
-
|
|
15569
|
-
minorBreaks: { type: Array, default: () => [] },
|
|
15629
|
+
breaks: { type: Array, default: () => [] },
|
|
15570
15630
|
coord2pos: Function,
|
|
15571
15631
|
pos2coord: Function,
|
|
15572
15632
|
layout: Object,
|
|
15573
|
-
theme: { type: Object, default: () => ({}) },
|
|
15574
15633
|
action: { type: Object, default: () => ({}) },
|
|
15575
15634
|
activeTransform: Object,
|
|
15576
15635
|
transition: String
|
|
@@ -15580,20 +15639,21 @@ const _sfc_main$Z = {
|
|
|
15580
15639
|
const height = computed(() => __props.layout.height + __props.layout.t + __props.layout.b);
|
|
15581
15640
|
const majorLines = computed(() => {
|
|
15582
15641
|
let result = [];
|
|
15583
|
-
for (let
|
|
15584
|
-
|
|
15642
|
+
for (let b of __props.breaks) {
|
|
15643
|
+
if (b.type != "major") continue;
|
|
15644
|
+
let pos = __props.coord2pos({ h: b.value }).h;
|
|
15585
15645
|
if (isNaN(pos)) continue;
|
|
15586
15646
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
15587
|
-
|
|
15588
|
-
if (
|
|
15647
|
+
pos += __props.layout.l;
|
|
15648
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
15589
15649
|
result.push({
|
|
15590
|
-
key: "major-" +
|
|
15650
|
+
key: "major-" + b.value,
|
|
15591
15651
|
y1: 0,
|
|
15592
15652
|
y2: height.value,
|
|
15593
|
-
x1:
|
|
15594
|
-
x2:
|
|
15595
|
-
"stroke":
|
|
15596
|
-
"stroke-width":
|
|
15653
|
+
x1: pos,
|
|
15654
|
+
x2: pos,
|
|
15655
|
+
"stroke": b.theme.grid_color_major,
|
|
15656
|
+
"stroke-width": b.theme.grid_width_major ?? 0,
|
|
15597
15657
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
15598
15658
|
style: { transition: __props.transition }
|
|
15599
15659
|
});
|
|
@@ -15602,21 +15662,21 @@ const _sfc_main$Z = {
|
|
|
15602
15662
|
});
|
|
15603
15663
|
const minorLines = computed(() => {
|
|
15604
15664
|
let result = [];
|
|
15605
|
-
for (let
|
|
15606
|
-
if (
|
|
15607
|
-
let pos = __props.coord2pos({ h:
|
|
15665
|
+
for (let b of __props.breaks) {
|
|
15666
|
+
if (b.type != "minor") continue;
|
|
15667
|
+
let pos = __props.coord2pos({ h: b.value }).h;
|
|
15608
15668
|
if (isNaN(pos)) continue;
|
|
15609
15669
|
let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
|
|
15610
|
-
|
|
15611
|
-
if (
|
|
15670
|
+
pos += __props.layout.l;
|
|
15671
|
+
if (pos + tsl < 0 || pos + tsl > width.value) continue;
|
|
15612
15672
|
result.push({
|
|
15613
|
-
key: "minor-" +
|
|
15673
|
+
key: "minor-" + b.value,
|
|
15614
15674
|
y1: 0,
|
|
15615
15675
|
y2: height.value,
|
|
15616
|
-
x1:
|
|
15617
|
-
x2:
|
|
15618
|
-
"stroke":
|
|
15619
|
-
"stroke-width":
|
|
15676
|
+
x1: pos,
|
|
15677
|
+
x2: pos,
|
|
15678
|
+
"stroke": b.theme.grid_color_minor,
|
|
15679
|
+
"stroke-width": b.theme.grid_width_minor ?? 0,
|
|
15620
15680
|
transform: tsl ? `translate(${tsl},0)` : null,
|
|
15621
15681
|
style: { transition: __props.transition }
|
|
15622
15682
|
});
|
|
@@ -15635,7 +15695,7 @@ const _sfc_main$Z = {
|
|
|
15635
15695
|
};
|
|
15636
15696
|
}
|
|
15637
15697
|
};
|
|
15638
|
-
const _sfc_main$
|
|
15698
|
+
const _sfc_main$Z = {
|
|
15639
15699
|
__name: "CoreCanvasBoxplot",
|
|
15640
15700
|
props: {
|
|
15641
15701
|
extendX: { type: Number, default: 0 },
|
|
@@ -15782,7 +15842,7 @@ const _sfc_main$Y = {
|
|
|
15782
15842
|
};
|
|
15783
15843
|
}
|
|
15784
15844
|
};
|
|
15785
|
-
const _sfc_main$
|
|
15845
|
+
const _sfc_main$Y = {
|
|
15786
15846
|
__name: "CoreCanvasCurve",
|
|
15787
15847
|
props: {
|
|
15788
15848
|
extendX: { type: Number, default: 0 },
|
|
@@ -15888,7 +15948,7 @@ const _sfc_main$X = {
|
|
|
15888
15948
|
};
|
|
15889
15949
|
}
|
|
15890
15950
|
};
|
|
15891
|
-
const _sfc_main$
|
|
15951
|
+
const _sfc_main$X = {
|
|
15892
15952
|
__name: "CoreCanvasEllipse",
|
|
15893
15953
|
props: {
|
|
15894
15954
|
extendX: { type: Number, default: 0 },
|
|
@@ -15993,7 +16053,7 @@ const _sfc_main$W = {
|
|
|
15993
16053
|
};
|
|
15994
16054
|
}
|
|
15995
16055
|
};
|
|
15996
|
-
const _sfc_main$
|
|
16056
|
+
const _sfc_main$W = {
|
|
15997
16057
|
__name: "CoreCanvasLine",
|
|
15998
16058
|
props: {
|
|
15999
16059
|
extendX: { type: Number, default: 0 },
|
|
@@ -16086,7 +16146,7 @@ const _sfc_main$V = {
|
|
|
16086
16146
|
};
|
|
16087
16147
|
}
|
|
16088
16148
|
};
|
|
16089
|
-
const _sfc_main$
|
|
16149
|
+
const _sfc_main$V = {
|
|
16090
16150
|
__name: "CoreCanvasPoint",
|
|
16091
16151
|
props: {
|
|
16092
16152
|
extendX: { type: Number, default: 0 },
|
|
@@ -16106,7 +16166,8 @@ const _sfc_main$U = {
|
|
|
16106
16166
|
diamond: (s) => `M0-${s * 0.707}L${s * 0.707},0L0,${s * 0.707}L-${s * 0.707},0Z`,
|
|
16107
16167
|
square: (s) => `M-${s / 2}-${s / 2}H${s / 2}V${s / 2}H-${s / 2}Z`,
|
|
16108
16168
|
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`,
|
|
16109
|
-
|
|
16169
|
+
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`,
|
|
16170
|
+
arrowhead: (s) => `M0,0L${s},${-s * 0.38}V${s * 0.38}Z`
|
|
16110
16171
|
};
|
|
16111
16172
|
const vBind = computed(() => ({
|
|
16112
16173
|
width: __props.layout.fullWidth * (1 + __props.extendX * 2),
|
|
@@ -16140,19 +16201,25 @@ const _sfc_main$U = {
|
|
|
16140
16201
|
alpha: alpha2,
|
|
16141
16202
|
"translate-x": translateX = 0,
|
|
16142
16203
|
"translate-y": translateY = 0,
|
|
16204
|
+
angle: angle2 = 0,
|
|
16143
16205
|
$raw
|
|
16144
16206
|
} of group) {
|
|
16145
16207
|
const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
|
|
16208
|
+
if (typeof angle2 == "object") {
|
|
16209
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16210
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16211
|
+
angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
|
|
16212
|
+
}
|
|
16146
16213
|
const path2d = new Path2D();
|
|
16147
16214
|
if (String(shape).startsWith("path:")) {
|
|
16148
16215
|
path2d.addPath(
|
|
16149
16216
|
new Path2D(shape.slice(5)),
|
|
16150
|
-
new DOMMatrix().translateSelf(cx + translateX, cy + translateY)
|
|
16217
|
+
new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
|
|
16151
16218
|
);
|
|
16152
16219
|
} else if (shape in paths) {
|
|
16153
16220
|
path2d.addPath(
|
|
16154
16221
|
new Path2D(paths[shape](size)),
|
|
16155
|
-
new DOMMatrix().translate(cx + translateX, cy + translateY)
|
|
16222
|
+
new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
|
|
16156
16223
|
);
|
|
16157
16224
|
} else {
|
|
16158
16225
|
path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
|
|
@@ -16201,7 +16268,7 @@ const _sfc_main$U = {
|
|
|
16201
16268
|
};
|
|
16202
16269
|
}
|
|
16203
16270
|
};
|
|
16204
|
-
const _sfc_main$
|
|
16271
|
+
const _sfc_main$U = {
|
|
16205
16272
|
__name: "CoreCanvasPolygon",
|
|
16206
16273
|
props: {
|
|
16207
16274
|
extendX: { type: Number, default: 0 },
|
|
@@ -16298,7 +16365,7 @@ const _sfc_main$T = {
|
|
|
16298
16365
|
};
|
|
16299
16366
|
}
|
|
16300
16367
|
};
|
|
16301
|
-
const _sfc_main$
|
|
16368
|
+
const _sfc_main$T = {
|
|
16302
16369
|
__name: "CoreCanvasRect",
|
|
16303
16370
|
props: {
|
|
16304
16371
|
extendX: { type: Number, default: 0 },
|
|
@@ -16393,7 +16460,7 @@ const _sfc_main$S = {
|
|
|
16393
16460
|
};
|
|
16394
16461
|
}
|
|
16395
16462
|
};
|
|
16396
|
-
const _sfc_main$
|
|
16463
|
+
const _sfc_main$S = {
|
|
16397
16464
|
__name: "CoreCanvasText",
|
|
16398
16465
|
props: {
|
|
16399
16466
|
extendX: { type: Number, default: 0 },
|
|
@@ -16467,6 +16534,11 @@ const _sfc_main$R = {
|
|
|
16467
16534
|
} else if (textLength != null) {
|
|
16468
16535
|
width = textLength;
|
|
16469
16536
|
}
|
|
16537
|
+
if (typeof angle2 == "object") {
|
|
16538
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16539
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16540
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
16541
|
+
}
|
|
16470
16542
|
if (dockX != null || dockY != null) {
|
|
16471
16543
|
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);
|
|
16472
16544
|
if (isNaN(alnX)) alnX = 0.5;
|
|
@@ -16523,7 +16595,7 @@ const _sfc_main$R = {
|
|
|
16523
16595
|
};
|
|
16524
16596
|
}
|
|
16525
16597
|
};
|
|
16526
|
-
const _sfc_main$
|
|
16598
|
+
const _sfc_main$R = {
|
|
16527
16599
|
__name: "CoreCanvasTextsegment",
|
|
16528
16600
|
props: {
|
|
16529
16601
|
extendX: { type: Number, default: 0 },
|
|
@@ -16697,19 +16769,19 @@ const _sfc_main$Q = {
|
|
|
16697
16769
|
};
|
|
16698
16770
|
const canvas = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16699
16771
|
__proto__: null,
|
|
16700
|
-
boxplot: _sfc_main$
|
|
16701
|
-
curve: _sfc_main$
|
|
16702
|
-
ellipse: _sfc_main$
|
|
16703
|
-
line: _sfc_main$
|
|
16704
|
-
point: _sfc_main$
|
|
16705
|
-
polygon: _sfc_main$
|
|
16706
|
-
rect: _sfc_main$
|
|
16707
|
-
stick: _sfc_main$
|
|
16708
|
-
text: _sfc_main$
|
|
16709
|
-
textsegment: _sfc_main$
|
|
16710
|
-
tile: _sfc_main$
|
|
16772
|
+
boxplot: _sfc_main$Z,
|
|
16773
|
+
curve: _sfc_main$Y,
|
|
16774
|
+
ellipse: _sfc_main$X,
|
|
16775
|
+
line: _sfc_main$W,
|
|
16776
|
+
point: _sfc_main$V,
|
|
16777
|
+
polygon: _sfc_main$U,
|
|
16778
|
+
rect: _sfc_main$T,
|
|
16779
|
+
stick: _sfc_main$W,
|
|
16780
|
+
text: _sfc_main$S,
|
|
16781
|
+
textsegment: _sfc_main$R,
|
|
16782
|
+
tile: _sfc_main$T
|
|
16711
16783
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16712
|
-
const _sfc_main$
|
|
16784
|
+
const _sfc_main$Q = {
|
|
16713
16785
|
__name: "CoreSvgBlank",
|
|
16714
16786
|
props: {
|
|
16715
16787
|
extendX: { type: Number, default: 0 },
|
|
@@ -16729,7 +16801,7 @@ const _sfc_main$P = {
|
|
|
16729
16801
|
}
|
|
16730
16802
|
};
|
|
16731
16803
|
const _hoisted_1$a = { key: 0 };
|
|
16732
|
-
const _sfc_main$
|
|
16804
|
+
const _sfc_main$P = {
|
|
16733
16805
|
__name: "CoreTile",
|
|
16734
16806
|
props: {
|
|
16735
16807
|
x: { type: Number, default: 0 },
|
|
@@ -16771,7 +16843,7 @@ const _sfc_main$O = {
|
|
|
16771
16843
|
};
|
|
16772
16844
|
const _hoisted_1$9 = { key: 0 };
|
|
16773
16845
|
const _hoisted_2$4 = { key: 0 };
|
|
16774
|
-
const _sfc_main$
|
|
16846
|
+
const _sfc_main$O = {
|
|
16775
16847
|
__name: "CorePoint",
|
|
16776
16848
|
props: {
|
|
16777
16849
|
x: { type: Number, default: 0 },
|
|
@@ -16780,7 +16852,7 @@ const _sfc_main$N = {
|
|
|
16780
16852
|
size: { type: Number, default: 6 },
|
|
16781
16853
|
color: String,
|
|
16782
16854
|
stroke: String,
|
|
16783
|
-
linewidth: Number,
|
|
16855
|
+
linewidth: { type: Number, default: 1 },
|
|
16784
16856
|
linetype: String,
|
|
16785
16857
|
alpha: { type: Number, default: 1 },
|
|
16786
16858
|
title: String,
|
|
@@ -16795,7 +16867,8 @@ const _sfc_main$N = {
|
|
|
16795
16867
|
triangle: "M0-0.667L0.577,0.333L-0.577,0.333Z",
|
|
16796
16868
|
diamond: "M0-0.707L0.707,0L0,0.707L-0.707,0Z",
|
|
16797
16869
|
plus: "M-0.1-0.5V-0.1H-0.5V0.1H-0.1V0.5H0.1V0.1H0.5V-0.1H0.1V-0.5H-0.1Z",
|
|
16798
|
-
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"
|
|
16870
|
+
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
|
+
arrowhead: "M0,0L1,0.38V-0.38Z"
|
|
16799
16872
|
};
|
|
16800
16873
|
const binds = computed(() => {
|
|
16801
16874
|
let d = __props.shape?.startsWith?.("path:") ? __props.shape?.slice?.(5) : paths[__props.shape];
|
|
@@ -16804,7 +16877,6 @@ const _sfc_main$N = {
|
|
|
16804
16877
|
fill: __props.color || null,
|
|
16805
16878
|
"fill-opacity": __props.alpha == 1 ? null : __props.alpha,
|
|
16806
16879
|
stroke: __props.stroke || null,
|
|
16807
|
-
"stroke-width": __props.linewidth,
|
|
16808
16880
|
"stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
|
|
16809
16881
|
"stroke-dasharray": parseLinetype(__props.linetype).join(" ") || null
|
|
16810
16882
|
};
|
|
@@ -16813,10 +16885,10 @@ const _sfc_main$N = {
|
|
|
16813
16885
|
if (tslX !== 0 || tslY !== 0) transform.push(`translate(${tslX},${tslY})`);
|
|
16814
16886
|
if (__props.size != 1) transform.push(`scale(${__props.size})`);
|
|
16815
16887
|
if (__props.angle) transform.push(`rotate(${__props.angle})`);
|
|
16816
|
-
Object.assign(result, { d, transform: transform.join(" ") || null });
|
|
16888
|
+
Object.assign(result, { d, transform: transform.join(" ") || null, "stroke-width": __props.linewidth / __props.size });
|
|
16817
16889
|
} else {
|
|
16818
16890
|
let transform = __props.translateX || __props.translateY ? `translate(${__props.translateX}, ${__props.translateY})` : null;
|
|
16819
|
-
Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform });
|
|
16891
|
+
Object.assign(result, { cx: __props.x, cy: __props.y, r: __props.size / 2, transform, "stroke-width": __props.linewidth });
|
|
16820
16892
|
}
|
|
16821
16893
|
return result;
|
|
16822
16894
|
});
|
|
@@ -16830,7 +16902,7 @@ const _sfc_main$N = {
|
|
|
16830
16902
|
}
|
|
16831
16903
|
};
|
|
16832
16904
|
const _hoisted_1$8 = { key: 0 };
|
|
16833
|
-
const _sfc_main$
|
|
16905
|
+
const _sfc_main$N = {
|
|
16834
16906
|
__name: "CoreLine",
|
|
16835
16907
|
props: {
|
|
16836
16908
|
x1: { type: Number, default: 0 },
|
|
@@ -16868,7 +16940,7 @@ const _sfc_main$M = {
|
|
|
16868
16940
|
};
|
|
16869
16941
|
}
|
|
16870
16942
|
};
|
|
16871
|
-
const _sfc_main$
|
|
16943
|
+
const _sfc_main$M = {
|
|
16872
16944
|
__name: "CoreSvgBoxplot",
|
|
16873
16945
|
props: {
|
|
16874
16946
|
extendX: { type: Number, default: 0 },
|
|
@@ -17031,18 +17103,18 @@ const _sfc_main$L = {
|
|
|
17031
17103
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17032
17104
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbinds, von]) => {
|
|
17033
17105
|
return openBlock(), createElementBlock("g", null, [
|
|
17034
|
-
createVNode(_sfc_main$
|
|
17106
|
+
createVNode(_sfc_main$N, mergeProps({ ref_for: true }, vbinds.line), null, 16),
|
|
17035
17107
|
_cache[0] || (_cache[0] = createTextVNode()),
|
|
17036
|
-
createVNode(_sfc_main$
|
|
17108
|
+
createVNode(_sfc_main$P, mergeProps({ ref_for: true }, vbinds.rect, toHandlers(von)), null, 16),
|
|
17037
17109
|
_cache[1] || (_cache[1] = createTextVNode()),
|
|
17038
|
-
createVNode(_sfc_main$
|
|
17110
|
+
createVNode(_sfc_main$N, mergeProps({ ref_for: true }, vbinds.midline), null, 16),
|
|
17039
17111
|
_cache[2] || (_cache[2] = createTextVNode()),
|
|
17040
|
-
createVNode(_sfc_main$
|
|
17112
|
+
createVNode(_sfc_main$N, mergeProps({ ref_for: true }, vbinds.uwisker), null, 16),
|
|
17041
17113
|
_cache[3] || (_cache[3] = createTextVNode()),
|
|
17042
|
-
createVNode(_sfc_main$
|
|
17114
|
+
createVNode(_sfc_main$N, mergeProps({ ref_for: true }, vbinds.lwisker), null, 16),
|
|
17043
17115
|
_cache[4] || (_cache[4] = createTextVNode()),
|
|
17044
17116
|
(openBlock(true), createElementBlock(Fragment, null, renderList(vbinds.outliers, ([vbind, von2]) => {
|
|
17045
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17117
|
+
return openBlock(), createBlock(_sfc_main$O, mergeProps({ ref_for: true }, vbind, toHandlers(von2)), null, 16);
|
|
17046
17118
|
}), 256))
|
|
17047
17119
|
]);
|
|
17048
17120
|
}), 256))
|
|
@@ -17053,7 +17125,7 @@ const _sfc_main$L = {
|
|
|
17053
17125
|
}
|
|
17054
17126
|
};
|
|
17055
17127
|
const _hoisted_1$7 = { key: 0 };
|
|
17056
|
-
const _sfc_main$
|
|
17128
|
+
const _sfc_main$L = {
|
|
17057
17129
|
__name: "CoreCurve",
|
|
17058
17130
|
props: {
|
|
17059
17131
|
points: { type: Array, default: () => [] },
|
|
@@ -17096,7 +17168,7 @@ const _sfc_main$K = {
|
|
|
17096
17168
|
};
|
|
17097
17169
|
}
|
|
17098
17170
|
};
|
|
17099
|
-
const _sfc_main$
|
|
17171
|
+
const _sfc_main$K = {
|
|
17100
17172
|
__name: "CoreSvgCurve",
|
|
17101
17173
|
props: {
|
|
17102
17174
|
extendX: { type: Number, default: 0 },
|
|
@@ -17124,6 +17196,8 @@ const _sfc_main$J = {
|
|
|
17124
17196
|
title,
|
|
17125
17197
|
"translate-x": translateX = 0,
|
|
17126
17198
|
"translate-y": translateY = 0,
|
|
17199
|
+
"marker-start": markerStart,
|
|
17200
|
+
"marker-end": markerEnd,
|
|
17127
17201
|
class: className,
|
|
17128
17202
|
style,
|
|
17129
17203
|
$raw,
|
|
@@ -17141,6 +17215,8 @@ const _sfc_main$J = {
|
|
|
17141
17215
|
title,
|
|
17142
17216
|
translateX,
|
|
17143
17217
|
translateY,
|
|
17218
|
+
"marker-start": markerStart,
|
|
17219
|
+
"marker-end": markerEnd,
|
|
17144
17220
|
class: className,
|
|
17145
17221
|
style,
|
|
17146
17222
|
interpolate: interpolate2
|
|
@@ -17156,7 +17232,7 @@ const _sfc_main$J = {
|
|
|
17156
17232
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17157
17233
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17158
17234
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17159
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17235
|
+
return openBlock(), createBlock(_sfc_main$L, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17160
17236
|
}), 256))
|
|
17161
17237
|
], 16);
|
|
17162
17238
|
}), 256))
|
|
@@ -17165,7 +17241,7 @@ const _sfc_main$J = {
|
|
|
17165
17241
|
}
|
|
17166
17242
|
};
|
|
17167
17243
|
const _hoisted_1$6 = { key: 0 };
|
|
17168
|
-
const _sfc_main$
|
|
17244
|
+
const _sfc_main$J = {
|
|
17169
17245
|
__name: "CoreEllipse",
|
|
17170
17246
|
props: {
|
|
17171
17247
|
cx: { type: Number, default: 0 },
|
|
@@ -17210,7 +17286,7 @@ const _sfc_main$I = {
|
|
|
17210
17286
|
};
|
|
17211
17287
|
}
|
|
17212
17288
|
};
|
|
17213
|
-
const _sfc_main$
|
|
17289
|
+
const _sfc_main$I = {
|
|
17214
17290
|
__name: "CoreSvgEllipse",
|
|
17215
17291
|
props: {
|
|
17216
17292
|
extendX: { type: Number, default: 0 },
|
|
@@ -17284,7 +17360,7 @@ const _sfc_main$H = {
|
|
|
17284
17360
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17285
17361
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17286
17362
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17287
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17363
|
+
return openBlock(), createBlock(_sfc_main$J, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17288
17364
|
}), 256))
|
|
17289
17365
|
], 16);
|
|
17290
17366
|
}), 256))
|
|
@@ -17292,7 +17368,7 @@ const _sfc_main$H = {
|
|
|
17292
17368
|
};
|
|
17293
17369
|
}
|
|
17294
17370
|
};
|
|
17295
|
-
const _sfc_main$
|
|
17371
|
+
const _sfc_main$H = {
|
|
17296
17372
|
__name: "CoreSvgLine",
|
|
17297
17373
|
props: {
|
|
17298
17374
|
extendX: { type: Number, default: 0 },
|
|
@@ -17322,6 +17398,8 @@ const _sfc_main$G = {
|
|
|
17322
17398
|
title,
|
|
17323
17399
|
"translate-x": translateX = 0,
|
|
17324
17400
|
"translate-y": translateY = 0,
|
|
17401
|
+
"marker-start": markerStart,
|
|
17402
|
+
"marker-end": markerEnd,
|
|
17325
17403
|
class: className,
|
|
17326
17404
|
style,
|
|
17327
17405
|
$raw
|
|
@@ -17341,6 +17419,8 @@ const _sfc_main$G = {
|
|
|
17341
17419
|
title,
|
|
17342
17420
|
translateX,
|
|
17343
17421
|
translateY,
|
|
17422
|
+
"marker-start": markerStart,
|
|
17423
|
+
"marker-end": markerEnd,
|
|
17344
17424
|
class: className,
|
|
17345
17425
|
style
|
|
17346
17426
|
};
|
|
@@ -17355,7 +17435,7 @@ const _sfc_main$G = {
|
|
|
17355
17435
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17356
17436
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17357
17437
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17358
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17438
|
+
return openBlock(), createBlock(_sfc_main$N, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17359
17439
|
}), 256))
|
|
17360
17440
|
], 16);
|
|
17361
17441
|
}), 256))
|
|
@@ -17363,7 +17443,7 @@ const _sfc_main$G = {
|
|
|
17363
17443
|
};
|
|
17364
17444
|
}
|
|
17365
17445
|
};
|
|
17366
|
-
const _sfc_main$
|
|
17446
|
+
const _sfc_main$G = {
|
|
17367
17447
|
__name: "CoreSvgMarkdown",
|
|
17368
17448
|
props: {
|
|
17369
17449
|
extendX: { type: Number, default: 0 },
|
|
@@ -17414,6 +17494,11 @@ const _sfc_main$F = {
|
|
|
17414
17494
|
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 });
|
|
17415
17495
|
textLength = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
|
|
17416
17496
|
}
|
|
17497
|
+
if (typeof angle2 == "object") {
|
|
17498
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
17499
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
17500
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
17501
|
+
}
|
|
17417
17502
|
let vbind = {
|
|
17418
17503
|
x: tx,
|
|
17419
17504
|
y: ty,
|
|
@@ -17449,7 +17534,7 @@ const _sfc_main$F = {
|
|
|
17449
17534
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17450
17535
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17451
17536
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17452
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17537
|
+
return openBlock(), createBlock(_sfc_main$14, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17453
17538
|
}), 256))
|
|
17454
17539
|
], 16);
|
|
17455
17540
|
}), 256))
|
|
@@ -17457,7 +17542,7 @@ const _sfc_main$F = {
|
|
|
17457
17542
|
};
|
|
17458
17543
|
}
|
|
17459
17544
|
};
|
|
17460
|
-
const _sfc_main$
|
|
17545
|
+
const _sfc_main$F = {
|
|
17461
17546
|
__name: "CoreSvgMarkdownsegment",
|
|
17462
17547
|
props: {
|
|
17463
17548
|
extendX: { type: Number, default: 0 },
|
|
@@ -17570,7 +17655,7 @@ const _sfc_main$E = {
|
|
|
17570
17655
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17571
17656
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17572
17657
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17573
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17658
|
+
return openBlock(), createBlock(_sfc_main$14, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17574
17659
|
}), 256))
|
|
17575
17660
|
], 16);
|
|
17576
17661
|
}), 256))
|
|
@@ -17578,7 +17663,7 @@ const _sfc_main$E = {
|
|
|
17578
17663
|
};
|
|
17579
17664
|
}
|
|
17580
17665
|
};
|
|
17581
|
-
const _sfc_main$
|
|
17666
|
+
const _sfc_main$E = {
|
|
17582
17667
|
__name: "CoreSvgPoint",
|
|
17583
17668
|
props: {
|
|
17584
17669
|
extendX: { type: Number, default: 0 },
|
|
@@ -17616,6 +17701,11 @@ const _sfc_main$D = {
|
|
|
17616
17701
|
}) => {
|
|
17617
17702
|
const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
|
|
17618
17703
|
if (cx < xlim_min || cx > xlim_max || cy < ylim_min || cy > ylim_max) return null;
|
|
17704
|
+
if (typeof angle2 == "object") {
|
|
17705
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
17706
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
17707
|
+
angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
|
|
17708
|
+
}
|
|
17619
17709
|
let vbind = {
|
|
17620
17710
|
x: cx,
|
|
17621
17711
|
y: cy,
|
|
@@ -17644,7 +17734,7 @@ const _sfc_main$D = {
|
|
|
17644
17734
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17645
17735
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17646
17736
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17647
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17737
|
+
return openBlock(), createBlock(_sfc_main$O, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17648
17738
|
}), 256))
|
|
17649
17739
|
], 16);
|
|
17650
17740
|
}), 256))
|
|
@@ -17653,7 +17743,7 @@ const _sfc_main$D = {
|
|
|
17653
17743
|
}
|
|
17654
17744
|
};
|
|
17655
17745
|
const _hoisted_1$5 = { key: 0 };
|
|
17656
|
-
const _sfc_main$
|
|
17746
|
+
const _sfc_main$D = {
|
|
17657
17747
|
__name: "CorePolygon",
|
|
17658
17748
|
props: {
|
|
17659
17749
|
points: { type: Array, default: () => [] },
|
|
@@ -17687,7 +17777,7 @@ const _sfc_main$C = {
|
|
|
17687
17777
|
};
|
|
17688
17778
|
}
|
|
17689
17779
|
};
|
|
17690
|
-
const _sfc_main$
|
|
17780
|
+
const _sfc_main$C = {
|
|
17691
17781
|
__name: "CoreSvgPolygon",
|
|
17692
17782
|
props: {
|
|
17693
17783
|
extendX: { type: Number, default: 0 },
|
|
@@ -17715,6 +17805,9 @@ const _sfc_main$B = {
|
|
|
17715
17805
|
title,
|
|
17716
17806
|
"translate-x": translateX = 0,
|
|
17717
17807
|
"translate-y": translateY = 0,
|
|
17808
|
+
"marker-start": markerStart,
|
|
17809
|
+
"marker-mid": markerMid,
|
|
17810
|
+
"marker-end": markerEnd,
|
|
17718
17811
|
class: className,
|
|
17719
17812
|
style,
|
|
17720
17813
|
$raw
|
|
@@ -17731,6 +17824,9 @@ const _sfc_main$B = {
|
|
|
17731
17824
|
title,
|
|
17732
17825
|
translateX,
|
|
17733
17826
|
translateY,
|
|
17827
|
+
"marker-start": markerStart,
|
|
17828
|
+
"marker-mid": markerMid,
|
|
17829
|
+
"marker-end": markerEnd,
|
|
17734
17830
|
class: className,
|
|
17735
17831
|
style
|
|
17736
17832
|
};
|
|
@@ -17745,7 +17841,7 @@ const _sfc_main$B = {
|
|
|
17745
17841
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17746
17842
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17747
17843
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17748
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17844
|
+
return openBlock(), createBlock(_sfc_main$D, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17749
17845
|
}), 256))
|
|
17750
17846
|
], 16);
|
|
17751
17847
|
}), 256))
|
|
@@ -17753,7 +17849,7 @@ const _sfc_main$B = {
|
|
|
17753
17849
|
};
|
|
17754
17850
|
}
|
|
17755
17851
|
};
|
|
17756
|
-
const _sfc_main$
|
|
17852
|
+
const _sfc_main$B = {
|
|
17757
17853
|
__name: "CoreSvgRect",
|
|
17758
17854
|
props: {
|
|
17759
17855
|
extendX: { type: Number, default: 0 },
|
|
@@ -17817,7 +17913,7 @@ const _sfc_main$A = {
|
|
|
17817
17913
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17818
17914
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17819
17915
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17820
|
-
return openBlock(), createBlock(_sfc_main$
|
|
17916
|
+
return openBlock(), createBlock(_sfc_main$P, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17821
17917
|
}), 256))
|
|
17822
17918
|
], 16);
|
|
17823
17919
|
}), 256))
|
|
@@ -17825,7 +17921,7 @@ const _sfc_main$A = {
|
|
|
17825
17921
|
};
|
|
17826
17922
|
}
|
|
17827
17923
|
};
|
|
17828
|
-
const _sfc_main$
|
|
17924
|
+
const _sfc_main$A = {
|
|
17829
17925
|
__name: "CoreSvgText",
|
|
17830
17926
|
props: {
|
|
17831
17927
|
extendX: { type: Number, default: 0 },
|
|
@@ -17876,6 +17972,11 @@ const _sfc_main$z = {
|
|
|
17876
17972
|
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 });
|
|
17877
17973
|
textLength = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
|
|
17878
17974
|
}
|
|
17975
|
+
if (typeof angle2 == "object") {
|
|
17976
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
17977
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
17978
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
17979
|
+
}
|
|
17879
17980
|
let vbind = {
|
|
17880
17981
|
x: tx,
|
|
17881
17982
|
y: ty,
|
|
@@ -17911,7 +18012,7 @@ const _sfc_main$z = {
|
|
|
17911
18012
|
(openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
|
|
17912
18013
|
return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
|
|
17913
18014
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
|
|
17914
|
-
return openBlock(), createBlock(_sfc_main$
|
|
18015
|
+
return openBlock(), createBlock(_sfc_main$15, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
|
|
17915
18016
|
}), 256))
|
|
17916
18017
|
], 16);
|
|
17917
18018
|
}), 256))
|
|
@@ -17919,7 +18020,7 @@ const _sfc_main$z = {
|
|
|
17919
18020
|
};
|
|
17920
18021
|
}
|
|
17921
18022
|
};
|
|
17922
|
-
const _sfc_main$
|
|
18023
|
+
const _sfc_main$z = {
|
|
17923
18024
|
__name: "CoreSvgTextsegment",
|
|
17924
18025
|
props: {
|
|
17925
18026
|
extendX: { type: Number, default: 0 },
|
|
@@ -18098,22 +18199,22 @@ const _sfc_main$y = {
|
|
|
18098
18199
|
};
|
|
18099
18200
|
const svg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18100
18201
|
__proto__: null,
|
|
18101
|
-
blank: _sfc_main$
|
|
18102
|
-
boxplot: _sfc_main$
|
|
18103
|
-
curve: _sfc_main$
|
|
18104
|
-
ellipse: _sfc_main$
|
|
18105
|
-
line: _sfc_main$
|
|
18106
|
-
markdown: _sfc_main$
|
|
18107
|
-
markdownsegment: _sfc_main$
|
|
18108
|
-
point: _sfc_main$
|
|
18109
|
-
polygon: _sfc_main$
|
|
18110
|
-
rect: _sfc_main$
|
|
18111
|
-
stick: _sfc_main$
|
|
18112
|
-
text: _sfc_main$
|
|
18113
|
-
textsegment: _sfc_main$
|
|
18114
|
-
tile: _sfc_main$
|
|
18202
|
+
blank: _sfc_main$Q,
|
|
18203
|
+
boxplot: _sfc_main$M,
|
|
18204
|
+
curve: _sfc_main$K,
|
|
18205
|
+
ellipse: _sfc_main$I,
|
|
18206
|
+
line: _sfc_main$H,
|
|
18207
|
+
markdown: _sfc_main$G,
|
|
18208
|
+
markdownsegment: _sfc_main$F,
|
|
18209
|
+
point: _sfc_main$E,
|
|
18210
|
+
polygon: _sfc_main$C,
|
|
18211
|
+
rect: _sfc_main$B,
|
|
18212
|
+
stick: _sfc_main$H,
|
|
18213
|
+
text: _sfc_main$A,
|
|
18214
|
+
textsegment: _sfc_main$z,
|
|
18215
|
+
tile: _sfc_main$B
|
|
18115
18216
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18116
|
-
const _sfc_main$
|
|
18217
|
+
const _sfc_main$y = {
|
|
18117
18218
|
__name: "CoreLayer",
|
|
18118
18219
|
props: {
|
|
18119
18220
|
data: Object,
|
|
@@ -18154,7 +18255,7 @@ const _sfc_main$x = {
|
|
|
18154
18255
|
};
|
|
18155
18256
|
const _hoisted_1$4 = { key: 0 };
|
|
18156
18257
|
const _hoisted_2$3 = ["onPointerdown"];
|
|
18157
|
-
const _sfc_main$
|
|
18258
|
+
const _sfc_main$x = {
|
|
18158
18259
|
__name: "CoreSelection",
|
|
18159
18260
|
props: /* @__PURE__ */ mergeModels({
|
|
18160
18261
|
coord2pos: Function,
|
|
@@ -18254,7 +18355,7 @@ const _sfc_main$w = {
|
|
|
18254
18355
|
if (pos.hmax == null) hmax += linewidth / 2;
|
|
18255
18356
|
if (pos.vmin == null) vmin -= linewidth / 2;
|
|
18256
18357
|
if (pos.vmax == null) vmax += linewidth / 2;
|
|
18257
|
-
let width = hmax - hmin, height = vmax - vmin;
|
|
18358
|
+
let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
|
|
18258
18359
|
return {
|
|
18259
18360
|
x: hmin,
|
|
18260
18361
|
y: vmin,
|
|
@@ -18273,7 +18374,7 @@ const _sfc_main$w = {
|
|
|
18273
18374
|
if (!position.value || translating.value) return null;
|
|
18274
18375
|
let size = 10;
|
|
18275
18376
|
let { hmin, hmax, vmin, vmax, pos } = position.value;
|
|
18276
|
-
let width = hmax - hmin, height = vmax - vmin;
|
|
18377
|
+
let width = Math.max(0, hmax - hmin), height = Math.max(0, vmax - vmin);
|
|
18277
18378
|
let binds = {};
|
|
18278
18379
|
if (config.move) binds.tblr = {
|
|
18279
18380
|
x: hmin,
|
|
@@ -18411,7 +18512,7 @@ const _sfc_main$w = {
|
|
|
18411
18512
|
const _hoisted_1$3 = ["height", "width"];
|
|
18412
18513
|
const _hoisted_2$2 = ["y1", "y2"];
|
|
18413
18514
|
const _hoisted_3$2 = ["y"];
|
|
18414
|
-
const _sfc_main$
|
|
18515
|
+
const _sfc_main$w = {
|
|
18415
18516
|
__name: "CoreGuideGradientbar",
|
|
18416
18517
|
props: {
|
|
18417
18518
|
scales: Array,
|
|
@@ -18451,7 +18552,7 @@ const _sfc_main$v = {
|
|
|
18451
18552
|
ref: "svg"
|
|
18452
18553
|
}, [
|
|
18453
18554
|
(openBlock(true), createElementBlock(Fragment, null, renderList(gradient_values.value, (v, i) => {
|
|
18454
|
-
return openBlock(), createBlock(_sfc_main$
|
|
18555
|
+
return openBlock(), createBlock(_sfc_main$P, mergeProps({
|
|
18455
18556
|
width: 10,
|
|
18456
18557
|
height: 3.1,
|
|
18457
18558
|
x: 10,
|
|
@@ -18483,12 +18584,12 @@ const _sfc_main$v = {
|
|
|
18483
18584
|
};
|
|
18484
18585
|
const element = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18485
18586
|
__proto__: null,
|
|
18486
|
-
curve: _sfc_main$
|
|
18487
|
-
line: _sfc_main$
|
|
18488
|
-
point: _sfc_main$
|
|
18489
|
-
polygon: _sfc_main$
|
|
18490
|
-
text: _sfc_main$
|
|
18491
|
-
tile: _sfc_main$
|
|
18587
|
+
curve: _sfc_main$L,
|
|
18588
|
+
line: _sfc_main$N,
|
|
18589
|
+
point: _sfc_main$O,
|
|
18590
|
+
polygon: _sfc_main$D,
|
|
18591
|
+
text: _sfc_main$15,
|
|
18592
|
+
tile: _sfc_main$P
|
|
18492
18593
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18493
18594
|
const _hoisted_1$2 = ["height", "width"];
|
|
18494
18595
|
const _hoisted_2$1 = ["transform"];
|
|
@@ -18498,7 +18599,7 @@ const _hoisted_4$1 = {
|
|
|
18498
18599
|
y: "10",
|
|
18499
18600
|
"alignment-baseline": "central"
|
|
18500
18601
|
};
|
|
18501
|
-
const _sfc_main$
|
|
18602
|
+
const _sfc_main$v = {
|
|
18502
18603
|
__name: "CoreGuideLegendkey",
|
|
18503
18604
|
props: {
|
|
18504
18605
|
scales: Array,
|
|
@@ -18565,7 +18666,7 @@ const _sfc_main$u = {
|
|
|
18565
18666
|
};
|
|
18566
18667
|
}
|
|
18567
18668
|
};
|
|
18568
|
-
const _sfc_main$
|
|
18669
|
+
const _sfc_main$u = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
18569
18670
|
__name: "CoreGuide",
|
|
18570
18671
|
props: {
|
|
18571
18672
|
scales: Array,
|
|
@@ -18573,8 +18674,8 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
18573
18674
|
},
|
|
18574
18675
|
setup(__props) {
|
|
18575
18676
|
const guide = {
|
|
18576
|
-
legendkey: _sfc_main$
|
|
18577
|
-
gradientbar: _sfc_main$
|
|
18677
|
+
legendkey: _sfc_main$v,
|
|
18678
|
+
gradientbar: _sfc_main$w
|
|
18578
18679
|
};
|
|
18579
18680
|
const title = computed(() => {
|
|
18580
18681
|
return __props.scales.reduce((v, [s]) => v ?? s.title, null) ?? __props.scales.reduce((v, [s]) => v ?? s._title, null);
|
|
@@ -18618,7 +18719,7 @@ const _sfc_main$t = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
18618
18719
|
};
|
|
18619
18720
|
}
|
|
18620
18721
|
});
|
|
18621
|
-
const _sfc_main$
|
|
18722
|
+
const _sfc_main$t = {
|
|
18622
18723
|
__name: "CoreLegend",
|
|
18623
18724
|
props: {
|
|
18624
18725
|
theme: { type: Object, default: () => ({}) },
|
|
@@ -18652,7 +18753,7 @@ const _sfc_main$s = {
|
|
|
18652
18753
|
style: normalizeStyle({ gap: __props.theme.spacing + "px" })
|
|
18653
18754
|
}, [
|
|
18654
18755
|
(openBlock(true), createElementBlock(Fragment, null, renderList(guides.value, ([[key, type], scales]) => {
|
|
18655
|
-
return openBlock(), createBlock(_sfc_main$
|
|
18756
|
+
return openBlock(), createBlock(_sfc_main$u, {
|
|
18656
18757
|
key,
|
|
18657
18758
|
type,
|
|
18658
18759
|
scales
|
|
@@ -18670,7 +18771,7 @@ const _hoisted_5 = ["transform", "clip-path"];
|
|
|
18670
18771
|
const _hoisted_6 = ["transform"];
|
|
18671
18772
|
const _hoisted_7 = ["clip-path"];
|
|
18672
18773
|
const _hoisted_8 = { key: 1 };
|
|
18673
|
-
const _sfc_main$
|
|
18774
|
+
const _sfc_main$s = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
18674
18775
|
__name: "CorePlot",
|
|
18675
18776
|
props: /* @__PURE__ */ mergeModels({
|
|
18676
18777
|
schema: Object,
|
|
@@ -19283,37 +19384,39 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19283
19384
|
etc
|
|
19284
19385
|
}));
|
|
19285
19386
|
});
|
|
19387
|
+
function grid_theme_normalize(theme2) {
|
|
19388
|
+
let {
|
|
19389
|
+
grid_color,
|
|
19390
|
+
grid_color_major = grid_color,
|
|
19391
|
+
grid_color_minor = grid_color,
|
|
19392
|
+
grid_width,
|
|
19393
|
+
grid_width_major = grid_width,
|
|
19394
|
+
grid_width_minor = grid_width,
|
|
19395
|
+
...result
|
|
19396
|
+
} = theme2;
|
|
19397
|
+
if (grid_color_major) result.grid_color_major = grid_color_major;
|
|
19398
|
+
if (grid_color_minor) result.grid_color_minor = grid_color_minor;
|
|
19399
|
+
if (grid_width_major) result.grid_width_major = grid_width_major;
|
|
19400
|
+
if (grid_width_minor) result.grid_width_minor = grid_width_minor;
|
|
19401
|
+
return result;
|
|
19402
|
+
}
|
|
19286
19403
|
const vaxes = computed(() => gaxes.value.map(({ coord, axis, etc }) => {
|
|
19287
|
-
let {
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
return {
|
|
19293
|
-
majorBreaks,
|
|
19294
|
-
minorBreaks,
|
|
19295
|
-
ticks: ticks2,
|
|
19296
|
-
showGrid,
|
|
19297
|
-
coord,
|
|
19298
|
-
orientation,
|
|
19299
|
-
bind
|
|
19300
|
-
};
|
|
19404
|
+
let { showGrid, breakSlot, orientation, ...bind } = etc;
|
|
19405
|
+
let gtheme = grid_theme_normalize(__props.theme.axis[orientation] ?? {}), atheme = grid_theme_normalize(bind.theme);
|
|
19406
|
+
let breaks = axis.getBreaks({ range: axisRange[coord], expandMult: __props.expandMult[coord], breakSlot });
|
|
19407
|
+
for (let b of breaks)
|
|
19408
|
+
b.theme = Object.assign({}, gtheme, atheme, grid_theme_normalize(b.theme ?? {}));
|
|
19409
|
+
return { breaks, showGrid, coord, orientation, bind };
|
|
19301
19410
|
}));
|
|
19302
19411
|
const gridBreaks = computed(() => {
|
|
19303
19412
|
let hAxes = vaxes.value.filter((a) => a.showGrid && a.orientation == "v"), vAxes = vaxes.value.filter((a) => a.showGrid && a.orientation == "h");
|
|
19304
19413
|
return {
|
|
19305
|
-
h:
|
|
19306
|
-
|
|
19307
|
-
minorBreaks: unique(hAxes.flatMap((a) => a.minorBreaks), (x2) => x2.position)
|
|
19308
|
-
},
|
|
19309
|
-
v: {
|
|
19310
|
-
majorBreaks: unique(vAxes.flatMap((a) => a.majorBreaks), (x2) => x2.position),
|
|
19311
|
-
minorBreaks: unique(vAxes.flatMap((a) => a.minorBreaks), (x2) => x2.position)
|
|
19312
|
-
}
|
|
19414
|
+
h: unique(hAxes.flatMap((a) => a.breaks), (x2) => x2.value, (a, b) => [a, b].find((x2) => x2.type == "major") ?? a),
|
|
19415
|
+
v: unique(vAxes.flatMap((a) => a.breaks), (x2) => x2.value, (a, b) => [a, b].find((x2) => x2.type == "major") ?? a)
|
|
19313
19416
|
};
|
|
19314
19417
|
});
|
|
19315
19418
|
const axes = computed(() => {
|
|
19316
|
-
return vaxes.value.map(({ orientation, coord, bind,
|
|
19419
|
+
return vaxes.value.map(({ orientation, coord, bind, breaks }) => {
|
|
19317
19420
|
let {
|
|
19318
19421
|
onMove: move = (...args) => emit("move", ...args),
|
|
19319
19422
|
onZoom: zoom = (...args) => emit("zoom", ...args),
|
|
@@ -19326,7 +19429,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19326
19429
|
bind: {
|
|
19327
19430
|
coord,
|
|
19328
19431
|
orientation,
|
|
19329
|
-
ticks:
|
|
19432
|
+
ticks: breaks.filter((x2) => x2.type == "major"),
|
|
19330
19433
|
layout: innerRect,
|
|
19331
19434
|
coord2pos,
|
|
19332
19435
|
pos2coord,
|
|
@@ -19367,21 +19470,21 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19367
19470
|
transform: `translate(${unref(panel).left}, ${unref(panel).top})`,
|
|
19368
19471
|
style: { "pointer-events": "none" }
|
|
19369
19472
|
}, [
|
|
19370
|
-
|
|
19473
|
+
createVNode(_sfc_main$$, {
|
|
19474
|
+
breaks: gridBreaks.value.h,
|
|
19371
19475
|
layout: unref(innerRect),
|
|
19372
|
-
theme: __props.theme.grid.h,
|
|
19373
19476
|
activeTransform: activeTransform.value,
|
|
19374
19477
|
coord2pos,
|
|
19375
19478
|
transition: transition.value
|
|
19376
|
-
}
|
|
19479
|
+
}, null, 8, ["breaks", "layout", "activeTransform", "transition"]),
|
|
19377
19480
|
_cache[2] || (_cache[2] = createTextVNode()),
|
|
19378
|
-
|
|
19481
|
+
createVNode(_sfc_main$_, {
|
|
19482
|
+
breaks: gridBreaks.value.v,
|
|
19379
19483
|
layout: unref(innerRect),
|
|
19380
|
-
theme: __props.theme.grid.v,
|
|
19381
19484
|
activeTransform: activeTransform.value,
|
|
19382
19485
|
coord2pos,
|
|
19383
19486
|
transition: transition.value
|
|
19384
|
-
}
|
|
19487
|
+
}, null, 8, ["breaks", "layout", "activeTransform", "transition"])
|
|
19385
19488
|
], 8, _hoisted_4),
|
|
19386
19489
|
_cache[8] || (_cache[8] = createTextVNode()),
|
|
19387
19490
|
createElementVNode("g", {
|
|
@@ -19392,7 +19495,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19392
19495
|
style: { transition: transition.value }
|
|
19393
19496
|
}), [
|
|
19394
19497
|
(openBlock(true), createElementBlock(Fragment, null, renderList(vplot.value.layers, (layer) => {
|
|
19395
|
-
return openBlock(), createBlock(_sfc_main$
|
|
19498
|
+
return openBlock(), createBlock(_sfc_main$y, mergeProps({
|
|
19396
19499
|
ref_for: true,
|
|
19397
19500
|
ref_key: "layers",
|
|
19398
19501
|
ref: layers,
|
|
@@ -19409,7 +19512,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19409
19512
|
], 16),
|
|
19410
19513
|
_cache[3] || (_cache[3] = createTextVNode()),
|
|
19411
19514
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.selections, (sel) => {
|
|
19412
|
-
return openBlock(), createBlock(_sfc_main$
|
|
19515
|
+
return openBlock(), createBlock(_sfc_main$x, mergeProps({
|
|
19413
19516
|
coord2pos,
|
|
19414
19517
|
pos2coord,
|
|
19415
19518
|
layout: unref(innerRect),
|
|
@@ -19420,7 +19523,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19420
19523
|
}, { ref_for: true }, sel, { flip: __props.flip }), null, 16, ["layout", "transition", "activeTransform", "flip"]);
|
|
19421
19524
|
}), 256)),
|
|
19422
19525
|
_cache[4] || (_cache[4] = createTextVNode()),
|
|
19423
|
-
createVNode(_sfc_main$
|
|
19526
|
+
createVNode(_sfc_main$x, {
|
|
19424
19527
|
coord2pos,
|
|
19425
19528
|
pos2coord,
|
|
19426
19529
|
layout: unref(innerRect),
|
|
@@ -19436,7 +19539,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19436
19539
|
transform: `translate(${unref(panel).left}, ${unref(panel).top})`
|
|
19437
19540
|
}, [
|
|
19438
19541
|
(openBlock(true), createElementBlock(Fragment, null, renderList(axes.value.filter((a) => typeof a.bind.position !== "number"), (axis) => {
|
|
19439
|
-
return openBlock(), createBlock(_sfc_main
|
|
19542
|
+
return openBlock(), createBlock(_sfc_main$10, mergeProps({ ref_for: true }, axis.bind, toHandlers(axis.on), {
|
|
19440
19543
|
transition: transition.value,
|
|
19441
19544
|
"onUpdate:transition": _cache[0] || (_cache[0] = ($event) => transition.value = $event),
|
|
19442
19545
|
activeTransform: activeTransform.value
|
|
@@ -19447,7 +19550,7 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19447
19550
|
"clip-path": props.clip ? `url(#${unref(vid)}-plot-clip)` : null
|
|
19448
19551
|
}, [
|
|
19449
19552
|
(openBlock(true), createElementBlock(Fragment, null, renderList(axes.value.filter((a) => typeof a.bind.position === "number"), (axis) => {
|
|
19450
|
-
return openBlock(), createBlock(_sfc_main
|
|
19553
|
+
return openBlock(), createBlock(_sfc_main$10, mergeProps({ ref_for: true }, axis.bind, toHandlers(axis.on), {
|
|
19451
19554
|
transition: transition.value,
|
|
19452
19555
|
"onUpdate:transition": _cache[1] || (_cache[1] = ($event) => transition.value = $event),
|
|
19453
19556
|
activeTransform: activeTransform.value
|
|
@@ -19456,12 +19559,14 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19456
19559
|
], 8, _hoisted_7)
|
|
19457
19560
|
], 8, _hoisted_6),
|
|
19458
19561
|
_cache[10] || (_cache[10] = createTextVNode()),
|
|
19562
|
+
renderSlot(_ctx.$slots, "default"),
|
|
19563
|
+
_cache[11] || (_cache[11] = createTextVNode()),
|
|
19459
19564
|
props.legendTeleport ? (openBlock(), createElementBlock("foreignObject", _hoisted_8, [
|
|
19460
19565
|
(openBlock(), createBlock(Teleport, {
|
|
19461
19566
|
defer: "",
|
|
19462
19567
|
to: props.legendTeleport
|
|
19463
19568
|
}, [
|
|
19464
|
-
createVNode(_sfc_main$
|
|
19569
|
+
createVNode(_sfc_main$t, {
|
|
19465
19570
|
scales: vplot.value?.scales,
|
|
19466
19571
|
theme: __props.theme.legend
|
|
19467
19572
|
}, null, 8, ["scales", "theme"])
|
|
@@ -19471,35 +19576,36 @@ const _sfc_main$r = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19471
19576
|
};
|
|
19472
19577
|
}
|
|
19473
19578
|
});
|
|
19474
|
-
const _sfc_main$
|
|
19579
|
+
const _sfc_main$r = {
|
|
19475
19580
|
$_type: "action",
|
|
19476
19581
|
$_props: {}
|
|
19477
19582
|
};
|
|
19478
|
-
const _sfc_main$
|
|
19583
|
+
const _sfc_main$q = {
|
|
19479
19584
|
$_type: "layer"
|
|
19480
19585
|
};
|
|
19481
|
-
const _sfc_main$
|
|
19586
|
+
const _sfc_main$p = {
|
|
19482
19587
|
$_props: {
|
|
19483
19588
|
geom: "tile",
|
|
19484
19589
|
stat: "bar"
|
|
19485
19590
|
},
|
|
19486
|
-
$_type: "layer"
|
|
19591
|
+
$_type: "layer",
|
|
19592
|
+
$_argnames: ["width", "height", "position"]
|
|
19487
19593
|
};
|
|
19488
|
-
const _sfc_main$
|
|
19594
|
+
const _sfc_main$o = {
|
|
19489
19595
|
$_props: {
|
|
19490
19596
|
geom: "blank",
|
|
19491
19597
|
stat: "identity"
|
|
19492
19598
|
},
|
|
19493
19599
|
$_type: "layer"
|
|
19494
19600
|
};
|
|
19495
|
-
const _sfc_main$
|
|
19601
|
+
const _sfc_main$n = {
|
|
19496
19602
|
$_props: {
|
|
19497
19603
|
geom: "boxplot",
|
|
19498
19604
|
stat: "boxplot"
|
|
19499
19605
|
},
|
|
19500
19606
|
$_type: "layer"
|
|
19501
19607
|
};
|
|
19502
|
-
const _sfc_main$
|
|
19608
|
+
const _sfc_main$m = {
|
|
19503
19609
|
$_props: {
|
|
19504
19610
|
geom: "curve",
|
|
19505
19611
|
stat: "curve"
|
|
@@ -19507,7 +19613,7 @@ const _sfc_main$l = {
|
|
|
19507
19613
|
$_type: "layer",
|
|
19508
19614
|
$_attrnames: ["interpolate"]
|
|
19509
19615
|
};
|
|
19510
|
-
const _sfc_main$
|
|
19616
|
+
const _sfc_main$l = {
|
|
19511
19617
|
$_props: {
|
|
19512
19618
|
geom: "curve",
|
|
19513
19619
|
stat: "density"
|
|
@@ -19515,7 +19621,7 @@ const _sfc_main$k = {
|
|
|
19515
19621
|
$_type: "layer",
|
|
19516
19622
|
$_argnames: ["n", "kernel"]
|
|
19517
19623
|
};
|
|
19518
|
-
const _sfc_main$
|
|
19624
|
+
const _sfc_main$k = {
|
|
19519
19625
|
$_props: {
|
|
19520
19626
|
geom: "ellipse",
|
|
19521
19627
|
stat: "ellipse"
|
|
@@ -19523,7 +19629,7 @@ const _sfc_main$j = {
|
|
|
19523
19629
|
$_type: "layer",
|
|
19524
19630
|
$_argnames: ["CI"]
|
|
19525
19631
|
};
|
|
19526
|
-
const _sfc_main$
|
|
19632
|
+
const _sfc_main$j = {
|
|
19527
19633
|
$_props: {
|
|
19528
19634
|
geom: "rect",
|
|
19529
19635
|
stat: "histogram"
|
|
@@ -19531,7 +19637,7 @@ const _sfc_main$i = {
|
|
|
19531
19637
|
$_type: "layer",
|
|
19532
19638
|
$_argnames: ["bins", "binwidth", "breaks"]
|
|
19533
19639
|
};
|
|
19534
|
-
const _sfc_main$
|
|
19640
|
+
const _sfc_main$i = {
|
|
19535
19641
|
$_props: {
|
|
19536
19642
|
geom: "line",
|
|
19537
19643
|
stat: "line"
|
|
@@ -19539,84 +19645,84 @@ const _sfc_main$h = {
|
|
|
19539
19645
|
$_type: "layer",
|
|
19540
19646
|
$_argnames: ["orientation"]
|
|
19541
19647
|
};
|
|
19542
|
-
const _sfc_main$
|
|
19648
|
+
const _sfc_main$h = {
|
|
19543
19649
|
$_props: {
|
|
19544
19650
|
geom: "line",
|
|
19545
19651
|
stat: "linerange"
|
|
19546
19652
|
},
|
|
19547
19653
|
$_type: "layer"
|
|
19548
19654
|
};
|
|
19549
|
-
const _sfc_main$
|
|
19655
|
+
const _sfc_main$g = {
|
|
19550
19656
|
$_props: {
|
|
19551
19657
|
geom: "markdown",
|
|
19552
19658
|
stat: "text"
|
|
19553
19659
|
},
|
|
19554
19660
|
$_type: "layer"
|
|
19555
19661
|
};
|
|
19556
|
-
const _sfc_main$
|
|
19662
|
+
const _sfc_main$f = {
|
|
19557
19663
|
$_props: {
|
|
19558
19664
|
geom: "markdownsegment",
|
|
19559
19665
|
stat: "textsegment"
|
|
19560
19666
|
},
|
|
19561
19667
|
$_type: "layer"
|
|
19562
19668
|
};
|
|
19563
|
-
const _sfc_main$
|
|
19669
|
+
const _sfc_main$e = {
|
|
19564
19670
|
$_props: {
|
|
19565
19671
|
geom: "line",
|
|
19566
19672
|
stat: "path"
|
|
19567
19673
|
},
|
|
19568
19674
|
$_type: "layer"
|
|
19569
19675
|
};
|
|
19570
|
-
const _sfc_main$
|
|
19676
|
+
const _sfc_main$d = {
|
|
19571
19677
|
$_props: {
|
|
19572
19678
|
geom: "point",
|
|
19573
19679
|
stat: "point"
|
|
19574
19680
|
},
|
|
19575
19681
|
$_type: "layer"
|
|
19576
19682
|
};
|
|
19577
|
-
const _sfc_main$
|
|
19683
|
+
const _sfc_main$c = {
|
|
19578
19684
|
$_props: {
|
|
19579
19685
|
geom: "polygon",
|
|
19580
19686
|
stat: "polygon"
|
|
19581
19687
|
},
|
|
19582
19688
|
$_type: "layer"
|
|
19583
19689
|
};
|
|
19584
|
-
const _sfc_main$
|
|
19690
|
+
const _sfc_main$b = {
|
|
19585
19691
|
$_props: {
|
|
19586
19692
|
geom: "rect",
|
|
19587
19693
|
stat: "rect"
|
|
19588
19694
|
},
|
|
19589
19695
|
$_type: "layer"
|
|
19590
19696
|
};
|
|
19591
|
-
const _sfc_main$
|
|
19697
|
+
const _sfc_main$a = {
|
|
19592
19698
|
$_props: {
|
|
19593
19699
|
geom: "line",
|
|
19594
19700
|
stat: "segment"
|
|
19595
19701
|
},
|
|
19596
19702
|
$_type: "layer"
|
|
19597
19703
|
};
|
|
19598
|
-
const _sfc_main$
|
|
19704
|
+
const _sfc_main$9 = {
|
|
19599
19705
|
$_props: {
|
|
19600
19706
|
geom: "stick",
|
|
19601
19707
|
stat: "stick"
|
|
19602
19708
|
},
|
|
19603
19709
|
$_type: "layer"
|
|
19604
19710
|
};
|
|
19605
|
-
const _sfc_main$
|
|
19711
|
+
const _sfc_main$8 = {
|
|
19606
19712
|
$_props: {
|
|
19607
19713
|
geom: "text",
|
|
19608
19714
|
stat: "text"
|
|
19609
19715
|
},
|
|
19610
19716
|
$_type: "layer"
|
|
19611
19717
|
};
|
|
19612
|
-
const _sfc_main$
|
|
19718
|
+
const _sfc_main$7 = {
|
|
19613
19719
|
$_props: {
|
|
19614
19720
|
geom: "textsegment",
|
|
19615
19721
|
stat: "textsegment"
|
|
19616
19722
|
},
|
|
19617
19723
|
$_type: "layer"
|
|
19618
19724
|
};
|
|
19619
|
-
const _sfc_main$
|
|
19725
|
+
const _sfc_main$6 = {
|
|
19620
19726
|
$_props: {
|
|
19621
19727
|
geom: "tile",
|
|
19622
19728
|
stat: "tile"
|
|
@@ -19625,45 +19731,50 @@ const _sfc_main$5 = {
|
|
|
19625
19731
|
};
|
|
19626
19732
|
const geom_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19627
19733
|
__proto__: null,
|
|
19628
|
-
VVGeom: _sfc_main$
|
|
19629
|
-
VVGeomBar: _sfc_main$
|
|
19630
|
-
VVGeomBlank: _sfc_main$
|
|
19631
|
-
VVGeomBoxplot: _sfc_main$
|
|
19632
|
-
VVGeomCurve: _sfc_main$
|
|
19633
|
-
VVGeomDensity: _sfc_main$
|
|
19634
|
-
VVGeomEllipse: _sfc_main$
|
|
19635
|
-
VVGeomHistogram: _sfc_main$
|
|
19636
|
-
VVGeomLine: _sfc_main$
|
|
19637
|
-
VVGeomLinerange: _sfc_main$
|
|
19638
|
-
VVGeomMarkdown: _sfc_main$
|
|
19639
|
-
VVGeomMarkdownsegment: _sfc_main$
|
|
19640
|
-
VVGeomPath: _sfc_main$
|
|
19641
|
-
VVGeomPoint: _sfc_main$
|
|
19642
|
-
VVGeomPolygon: _sfc_main$
|
|
19643
|
-
VVGeomRect: _sfc_main$
|
|
19644
|
-
VVGeomSegment: _sfc_main$
|
|
19645
|
-
VVGeomStick: _sfc_main$
|
|
19646
|
-
VVGeomText: _sfc_main$
|
|
19647
|
-
VVGeomTextsegment: _sfc_main$
|
|
19648
|
-
VVGeomTile: _sfc_main$
|
|
19734
|
+
VVGeom: _sfc_main$q,
|
|
19735
|
+
VVGeomBar: _sfc_main$p,
|
|
19736
|
+
VVGeomBlank: _sfc_main$o,
|
|
19737
|
+
VVGeomBoxplot: _sfc_main$n,
|
|
19738
|
+
VVGeomCurve: _sfc_main$m,
|
|
19739
|
+
VVGeomDensity: _sfc_main$l,
|
|
19740
|
+
VVGeomEllipse: _sfc_main$k,
|
|
19741
|
+
VVGeomHistogram: _sfc_main$j,
|
|
19742
|
+
VVGeomLine: _sfc_main$i,
|
|
19743
|
+
VVGeomLinerange: _sfc_main$h,
|
|
19744
|
+
VVGeomMarkdown: _sfc_main$g,
|
|
19745
|
+
VVGeomMarkdownsegment: _sfc_main$f,
|
|
19746
|
+
VVGeomPath: _sfc_main$e,
|
|
19747
|
+
VVGeomPoint: _sfc_main$d,
|
|
19748
|
+
VVGeomPolygon: _sfc_main$c,
|
|
19749
|
+
VVGeomRect: _sfc_main$b,
|
|
19750
|
+
VVGeomSegment: _sfc_main$a,
|
|
19751
|
+
VVGeomStick: _sfc_main$9,
|
|
19752
|
+
VVGeomText: _sfc_main$8,
|
|
19753
|
+
VVGeomTextsegment: _sfc_main$7,
|
|
19754
|
+
VVGeomTile: _sfc_main$6
|
|
19649
19755
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19650
|
-
const _sfc_main$
|
|
19756
|
+
const _sfc_main$5 = {
|
|
19651
19757
|
$_type: "axis",
|
|
19652
19758
|
$_props: {}
|
|
19653
19759
|
};
|
|
19654
|
-
const _sfc_main$
|
|
19760
|
+
const _sfc_main$4 = {
|
|
19655
19761
|
$_type: "axis",
|
|
19656
19762
|
$_props: { coord: "x" }
|
|
19657
19763
|
};
|
|
19658
|
-
const _sfc_main$
|
|
19764
|
+
const _sfc_main$3 = {
|
|
19659
19765
|
$_type: "axis",
|
|
19660
19766
|
$_props: { coord: "y" }
|
|
19661
19767
|
};
|
|
19768
|
+
const _sfc_main$2 = {
|
|
19769
|
+
$_type: "axis-break",
|
|
19770
|
+
$_props: { type: "major" }
|
|
19771
|
+
};
|
|
19662
19772
|
const axis_components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19663
19773
|
__proto__: null,
|
|
19664
|
-
VVAxis: _sfc_main$
|
|
19665
|
-
|
|
19666
|
-
|
|
19774
|
+
VVAxis: _sfc_main$5,
|
|
19775
|
+
VVAxisBreak: _sfc_main$2,
|
|
19776
|
+
VVAxisX: _sfc_main$4,
|
|
19777
|
+
VVAxisY: _sfc_main$3
|
|
19667
19778
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19668
19779
|
const _hoisted_1 = {
|
|
19669
19780
|
key: 0,
|
|
@@ -19710,8 +19821,8 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19710
19821
|
const components = {
|
|
19711
19822
|
...geom_components,
|
|
19712
19823
|
...axis_components,
|
|
19713
|
-
VVAction: _sfc_main$
|
|
19714
|
-
VVSelection: _sfc_main$
|
|
19824
|
+
VVAction: _sfc_main$r,
|
|
19825
|
+
VVSelection: _sfc_main$r
|
|
19715
19826
|
};
|
|
19716
19827
|
const opponents = {
|
|
19717
19828
|
x: "y",
|
|
@@ -19731,20 +19842,6 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19731
19842
|
const selectionPreview = useModel(__props, "selectionPreview");
|
|
19732
19843
|
const selectionPreviewTheme = useModel(__props, "selectionPreviewTheme");
|
|
19733
19844
|
const transition = useModel(__props, "transition");
|
|
19734
|
-
function expandFragment(componentList) {
|
|
19735
|
-
if (componentList == null) return [];
|
|
19736
|
-
return componentList.flatMap((layer) => {
|
|
19737
|
-
if (layer.type == Fragment) {
|
|
19738
|
-
return expandFragment(layer.children);
|
|
19739
|
-
} else if (layer.type == "template") {
|
|
19740
|
-
return expandFragment(layer.children).map((c) => {
|
|
19741
|
-
c.props = { ...c.props, ...layer.props };
|
|
19742
|
-
return c;
|
|
19743
|
-
});
|
|
19744
|
-
}
|
|
19745
|
-
return layer;
|
|
19746
|
-
});
|
|
19747
|
-
}
|
|
19748
19845
|
function resolveComponent(ast2) {
|
|
19749
19846
|
let result = {
|
|
19750
19847
|
props: Object.fromEntries(ast2.props.map((p) => {
|
|
@@ -19792,6 +19889,8 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
19792
19889
|
const vaction = computed(() => Object.values(vnodes.action).flat());
|
|
19793
19890
|
const vselection = computed(() => Object.values(vnodes.selection).flat());
|
|
19794
19891
|
const vdom = computed(() => Object.keys(vnodes.dom).flatMap((k) => k == "panel" ? [] : vnodes.dom[k]));
|
|
19892
|
+
const vdom_svg = computed(() => vdom.value.filter((v) => isSVGTag(v.type)));
|
|
19893
|
+
const vdom_etc = computed(() => vdom.value.filter((v) => !isSVGTag(v.type)));
|
|
19795
19894
|
const vBind = computed(() => {
|
|
19796
19895
|
let plot = {};
|
|
19797
19896
|
let wrapper = {};
|
|
@@ -20012,7 +20111,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20012
20111
|
const buttonsMap = { left: 1, right: 2, middle: 4, X1: 8, X2: 16 };
|
|
20013
20112
|
const axes = computed(() => {
|
|
20014
20113
|
let ori = __props.flip ? { x: "v", y: "h" } : { x: "h", y: "v" };
|
|
20015
|
-
let allAxes = vaxis.value.map((c) => ({ ...c.type.$_props, ...c.props, $_children: c.children })).concat(__props.axes ?? []);
|
|
20114
|
+
let allAxes = vaxis.value.map((c) => ({ ...c.type.$_props, ...c.props, $_children: c.children ?? {} })).concat(__props.axes ?? []);
|
|
20016
20115
|
if (allAxes.every((ax) => ax?.coord != "x")) allAxes.push({ coord: "x" });
|
|
20017
20116
|
if (allAxes.every((ax) => ax?.coord != "y")) allAxes.push({ coord: "y" });
|
|
20018
20117
|
return allAxes.map(({
|
|
@@ -20039,7 +20138,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20039
20138
|
max,
|
|
20040
20139
|
"onUpdate:min": oum,
|
|
20041
20140
|
"onUpdate:max": ouM,
|
|
20042
|
-
$_children,
|
|
20141
|
+
$_children = {},
|
|
20043
20142
|
...etc
|
|
20044
20143
|
}) => {
|
|
20045
20144
|
let orientation = ori[coord];
|
|
@@ -20051,7 +20150,8 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20051
20150
|
position = { h: "top", v: "right" }[orientation];
|
|
20052
20151
|
if (reverse[opponents[coord]]) position = opponents[position];
|
|
20053
20152
|
}
|
|
20054
|
-
let
|
|
20153
|
+
let breakSlot = $_children.breaks;
|
|
20154
|
+
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) => {
|
|
20055
20155
|
let res = [];
|
|
20056
20156
|
for (let a of ["move", "nudge", "zoom", "rescale"]) {
|
|
20057
20157
|
let act = props[a];
|
|
@@ -20081,6 +20181,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20081
20181
|
labels,
|
|
20082
20182
|
titles,
|
|
20083
20183
|
minorBreaks,
|
|
20184
|
+
breakSlot,
|
|
20084
20185
|
showGrid: _isPropTruthy(showGrid) ?? position !== "none",
|
|
20085
20186
|
extend: extend2 ?? primaryAxisConfig.extend[coord],
|
|
20086
20187
|
theme: Object.assign({}, ...[theme2.value?.axis?.[position] ?? theme2.value?.axis?.[orientation]].concat($$theme)),
|
|
@@ -20238,7 +20339,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20238
20339
|
class: "vvplot",
|
|
20239
20340
|
style: wrapperStyle.value
|
|
20240
20341
|
}, vBind.value.wrapper), [
|
|
20241
|
-
createVNode(_sfc_main$
|
|
20342
|
+
createVNode(_sfc_main$s, mergeProps({
|
|
20242
20343
|
ref: "plot",
|
|
20243
20344
|
paddings,
|
|
20244
20345
|
schema: schema.value,
|
|
@@ -20267,7 +20368,14 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20267
20368
|
dpi: __props.dpi ?? 96 * unref(pixelRatio),
|
|
20268
20369
|
legendTeleport: __props.legendTeleport,
|
|
20269
20370
|
onSelect: _cache[3] || (_cache[3] = (d, e) => emit("select", d, e))
|
|
20270
|
-
}),
|
|
20371
|
+
}), {
|
|
20372
|
+
default: withCtx(() => [
|
|
20373
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(vdom_svg.value, (c) => {
|
|
20374
|
+
return openBlock(), createBlock(resolveDynamicComponent(c));
|
|
20375
|
+
}), 256))
|
|
20376
|
+
]),
|
|
20377
|
+
_: 1
|
|
20378
|
+
}, 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"]),
|
|
20271
20379
|
_cache[4] || (_cache[4] = createTextVNode()),
|
|
20272
20380
|
createElementVNode("div", {
|
|
20273
20381
|
class: "vvplot-panel-container",
|
|
@@ -20280,7 +20388,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20280
20388
|
])) : createCommentVNode("", true)
|
|
20281
20389
|
], 4),
|
|
20282
20390
|
_cache[5] || (_cache[5] = createTextVNode()),
|
|
20283
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
20391
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(vdom_etc.value, (c) => {
|
|
20284
20392
|
return openBlock(), createBlock(resolveDynamicComponent(c));
|
|
20285
20393
|
}), 256))
|
|
20286
20394
|
], 16);
|
|
@@ -20293,67 +20401,71 @@ const _sfc_main = {
|
|
|
20293
20401
|
};
|
|
20294
20402
|
const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20295
20403
|
__proto__: null,
|
|
20296
|
-
VVAction: _sfc_main$
|
|
20297
|
-
VVAxis: _sfc_main$
|
|
20298
|
-
|
|
20299
|
-
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20308
|
-
|
|
20309
|
-
|
|
20310
|
-
|
|
20311
|
-
|
|
20312
|
-
|
|
20313
|
-
|
|
20314
|
-
|
|
20315
|
-
|
|
20316
|
-
|
|
20317
|
-
|
|
20318
|
-
|
|
20319
|
-
|
|
20320
|
-
|
|
20404
|
+
VVAction: _sfc_main$r,
|
|
20405
|
+
VVAxis: _sfc_main$5,
|
|
20406
|
+
VVAxisBreak: _sfc_main$2,
|
|
20407
|
+
VVAxisX: _sfc_main$4,
|
|
20408
|
+
VVAxisY: _sfc_main$3,
|
|
20409
|
+
VVGeom: _sfc_main$q,
|
|
20410
|
+
VVGeomBar: _sfc_main$p,
|
|
20411
|
+
VVGeomBlank: _sfc_main$o,
|
|
20412
|
+
VVGeomBoxplot: _sfc_main$n,
|
|
20413
|
+
VVGeomCurve: _sfc_main$m,
|
|
20414
|
+
VVGeomDensity: _sfc_main$l,
|
|
20415
|
+
VVGeomEllipse: _sfc_main$k,
|
|
20416
|
+
VVGeomHistogram: _sfc_main$j,
|
|
20417
|
+
VVGeomLine: _sfc_main$i,
|
|
20418
|
+
VVGeomLinerange: _sfc_main$h,
|
|
20419
|
+
VVGeomMarkdown: _sfc_main$g,
|
|
20420
|
+
VVGeomMarkdownsegment: _sfc_main$f,
|
|
20421
|
+
VVGeomPath: _sfc_main$e,
|
|
20422
|
+
VVGeomPoint: _sfc_main$d,
|
|
20423
|
+
VVGeomPolygon: _sfc_main$c,
|
|
20424
|
+
VVGeomRect: _sfc_main$b,
|
|
20425
|
+
VVGeomSegment: _sfc_main$a,
|
|
20426
|
+
VVGeomStick: _sfc_main$9,
|
|
20427
|
+
VVGeomText: _sfc_main$8,
|
|
20428
|
+
VVGeomTextsegment: _sfc_main$7,
|
|
20429
|
+
VVGeomTile: _sfc_main$6,
|
|
20321
20430
|
VVPlot: _sfc_main$1,
|
|
20322
20431
|
VVSelection: _sfc_main
|
|
20323
20432
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
20324
20433
|
export {
|
|
20325
|
-
_sfc_main$
|
|
20326
|
-
_sfc_main$
|
|
20327
|
-
_sfc_main$
|
|
20328
|
-
_sfc_main$
|
|
20329
|
-
_sfc_main$
|
|
20330
|
-
_sfc_main$
|
|
20331
|
-
_sfc_main$
|
|
20332
|
-
_sfc_main$
|
|
20333
|
-
_sfc_main$
|
|
20334
|
-
_sfc_main$
|
|
20335
|
-
_sfc_main$
|
|
20336
|
-
_sfc_main$
|
|
20337
|
-
_sfc_main$
|
|
20338
|
-
_sfc_main$
|
|
20339
|
-
_sfc_main$
|
|
20340
|
-
_sfc_main$
|
|
20341
|
-
_sfc_main$
|
|
20342
|
-
_sfc_main$
|
|
20343
|
-
_sfc_main$
|
|
20344
|
-
_sfc_main$
|
|
20345
|
-
_sfc_main$
|
|
20346
|
-
_sfc_main$
|
|
20347
|
-
_sfc_main$
|
|
20348
|
-
_sfc_main$
|
|
20349
|
-
_sfc_main$
|
|
20434
|
+
_sfc_main$r as VVAction,
|
|
20435
|
+
_sfc_main$5 as VVAxis,
|
|
20436
|
+
_sfc_main$2 as VVAxisBreak,
|
|
20437
|
+
_sfc_main$4 as VVAxisX,
|
|
20438
|
+
_sfc_main$3 as VVAxisY,
|
|
20439
|
+
_sfc_main$q as VVGeom,
|
|
20440
|
+
_sfc_main$p as VVGeomBar,
|
|
20441
|
+
_sfc_main$o as VVGeomBlank,
|
|
20442
|
+
_sfc_main$n as VVGeomBoxplot,
|
|
20443
|
+
_sfc_main$m as VVGeomCurve,
|
|
20444
|
+
_sfc_main$l as VVGeomDensity,
|
|
20445
|
+
_sfc_main$k as VVGeomEllipse,
|
|
20446
|
+
_sfc_main$j as VVGeomHistogram,
|
|
20447
|
+
_sfc_main$i as VVGeomLine,
|
|
20448
|
+
_sfc_main$h as VVGeomLinerange,
|
|
20449
|
+
_sfc_main$g as VVGeomMarkdown,
|
|
20450
|
+
_sfc_main$f as VVGeomMarkdownsegment,
|
|
20451
|
+
_sfc_main$e as VVGeomPath,
|
|
20452
|
+
_sfc_main$d as VVGeomPoint,
|
|
20453
|
+
_sfc_main$c as VVGeomPolygon,
|
|
20454
|
+
_sfc_main$b as VVGeomRect,
|
|
20455
|
+
_sfc_main$a as VVGeomSegment,
|
|
20456
|
+
_sfc_main$9 as VVGeomStick,
|
|
20457
|
+
_sfc_main$8 as VVGeomText,
|
|
20458
|
+
_sfc_main$7 as VVGeomTextsegment,
|
|
20459
|
+
_sfc_main$6 as VVGeomTile,
|
|
20350
20460
|
_sfc_main$1 as VVPlot,
|
|
20351
20461
|
_sfc_main as VVSelection,
|
|
20352
20462
|
index as components,
|
|
20353
20463
|
number_cut,
|
|
20354
20464
|
oob,
|
|
20355
20465
|
vvbreak,
|
|
20466
|
+
vvgeom,
|
|
20356
20467
|
vvlabel,
|
|
20357
20468
|
vvscale,
|
|
20469
|
+
vvstat,
|
|
20358
20470
|
theme as vvtheme
|
|
20359
20471
|
};
|