vvplot 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vvplot.esm.js +437 -454
- package/dist/vvplot.esm.min.js +13 -13
- package/dist/vvplot.global.js +437 -454
- package/dist/vvplot.global.min.js +10 -10
- package/package.json +1 -1
package/dist/vvplot.esm.js
CHANGED
|
@@ -7349,9 +7349,9 @@ class GPlot {
|
|
|
7349
7349
|
}
|
|
7350
7350
|
getComputedLayers() {
|
|
7351
7351
|
return this.layers.map((layer) => {
|
|
7352
|
-
let data =
|
|
7352
|
+
let data = layer.data.$group.map(
|
|
7353
7353
|
(_, i) => vvgeom[layer.geom].validate(object_map(layer.data, (k, v) => v?.[i]))
|
|
7354
|
-
).filter((x2) => x2 != null)
|
|
7354
|
+
).filter((x2) => x2 != null);
|
|
7355
7355
|
return { data, geom: layer.geom, vBind: layer.vBind };
|
|
7356
7356
|
});
|
|
7357
7357
|
}
|
|
@@ -16037,83 +16037,81 @@ const _sfc_main$$ = {
|
|
|
16037
16037
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16038
16038
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16039
16039
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16040
|
-
for (
|
|
16041
|
-
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
|
|
16045
|
-
|
|
16046
|
-
|
|
16047
|
-
|
|
16048
|
-
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
|
|
16055
|
-
|
|
16056
|
-
|
|
16057
|
-
|
|
16058
|
-
|
|
16059
|
-
|
|
16060
|
-
|
|
16061
|
-
|
|
16062
|
-
|
|
16063
|
-
|
|
16064
|
-
|
|
16065
|
-
|
|
16066
|
-
}
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16071
|
-
|
|
16072
|
-
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16087
|
-
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16040
|
+
for (let {
|
|
16041
|
+
x: x2,
|
|
16042
|
+
xmin,
|
|
16043
|
+
xmax,
|
|
16044
|
+
y: y2,
|
|
16045
|
+
ymin,
|
|
16046
|
+
ymax,
|
|
16047
|
+
lwisker,
|
|
16048
|
+
Q1,
|
|
16049
|
+
median,
|
|
16050
|
+
Q3,
|
|
16051
|
+
uwisker,
|
|
16052
|
+
outliers,
|
|
16053
|
+
$xmin,
|
|
16054
|
+
$xmax,
|
|
16055
|
+
$ymin,
|
|
16056
|
+
$ymax,
|
|
16057
|
+
fill = "white",
|
|
16058
|
+
color: color2 = "black",
|
|
16059
|
+
linewidth = 1,
|
|
16060
|
+
linetype,
|
|
16061
|
+
alpha: alpha2,
|
|
16062
|
+
"translate-x": translateX = 0,
|
|
16063
|
+
"translate-y": translateY = 0,
|
|
16064
|
+
$raw
|
|
16065
|
+
} of __props.data) {
|
|
16066
|
+
const { hmin: rx1, hmax: rx2, vmin: ry1, vmax: ry2 } = __props.coord2pos(x2 == null ? { ymin, ymax, xmin: Q1, xmax: Q3 } : { xmin, xmax, ymin: Q1, ymax: Q3 });
|
|
16067
|
+
const { h: lx1, v: ly1 } = __props.coord2pos(x2 == null ? { y: y2, x: lwisker } : { x: x2, y: lwisker });
|
|
16068
|
+
const { h: lx2, v: ly2 } = __props.coord2pos(x2 == null ? { y: y2, x: uwisker } : { x: x2, y: uwisker });
|
|
16069
|
+
const { h: mx1, v: my1 } = __props.coord2pos(x2 == null ? { y: ymin, x: median } : { x: xmin, y: median });
|
|
16070
|
+
const { h: mx2, v: my2 } = __props.coord2pos(x2 == null ? { y: ymax, x: median } : { x: xmax, y: median });
|
|
16071
|
+
const { h: uwx1, v: uwy1 } = __props.coord2pos(x2 == null ? { y: ymin * 0.25 + ymax * 0.75, x: uwisker } : { x: xmin * 0.25 + xmax * 0.75, y: uwisker });
|
|
16072
|
+
const { h: uwx2, v: uwy2 } = __props.coord2pos(x2 == null ? { y: ymin * 0.75 + ymax * 0.25, x: uwisker } : { x: xmin * 0.75 + xmax * 0.25, y: uwisker });
|
|
16073
|
+
const { h: lwx1, v: lwy1 } = __props.coord2pos(x2 == null ? { y: ymin * 0.25 + ymax * 0.75, x: lwisker } : { x: xmin * 0.25 + xmax * 0.75, y: lwisker });
|
|
16074
|
+
const { h: lwx2, v: lwy2 } = __props.coord2pos(x2 == null ? { y: ymin * 0.75 + ymax * 0.25, x: lwisker } : { x: xmin * 0.75 + xmax * 0.25, y: lwisker });
|
|
16075
|
+
ctx.globalAlpha = alpha2;
|
|
16076
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16077
|
+
const linepath2d = new Path2D();
|
|
16078
|
+
linepath2d.moveTo(lx1 + translateX, ly1 + translateY);
|
|
16079
|
+
linepath2d.lineTo(lx2 + translateX, ly2 + translateY);
|
|
16080
|
+
const wiskerpath2d = new Path2D();
|
|
16081
|
+
wiskerpath2d.moveTo(uwx1 + translateX, uwy1 + translateY);
|
|
16082
|
+
wiskerpath2d.lineTo(uwx2 + translateX, uwy2 + translateY);
|
|
16083
|
+
wiskerpath2d.moveTo(lwx1 + translateX, lwy1 + translateY);
|
|
16084
|
+
wiskerpath2d.lineTo(lwx2 + translateX, lwy2 + translateY);
|
|
16085
|
+
const rectpath2d = new Path2D();
|
|
16086
|
+
rectpath2d.rect(rx1 + translateX, ry1 + translateY, rx2 - rx1, ry2 - ry1);
|
|
16087
|
+
_path_data.set(rectpath2d, $raw);
|
|
16088
|
+
const medianpath2d = new Path2D();
|
|
16089
|
+
medianpath2d.moveTo(mx1 + translateX, my1 + translateY);
|
|
16090
|
+
medianpath2d.lineTo(mx2 + translateX, my2 + translateY);
|
|
16091
|
+
if (color2 != null && color2 !== "none") {
|
|
16092
|
+
ctx.strokeStyle = color2;
|
|
16093
|
+
ctx.lineWidth = linewidth;
|
|
16094
|
+
ctx.stroke(linepath2d);
|
|
16095
|
+
ctx.stroke(wiskerpath2d);
|
|
16096
|
+
}
|
|
16097
|
+
if (fill !== "none") {
|
|
16098
|
+
ctx.fillStyle = fill;
|
|
16099
|
+
ctx.fill(rectpath2d);
|
|
16100
|
+
}
|
|
16101
|
+
if (color2 != null && color2 !== "none") {
|
|
16102
|
+
ctx.stroke(rectpath2d);
|
|
16103
|
+
ctx.lineWidth = linewidth * 2;
|
|
16104
|
+
ctx.stroke(medianpath2d);
|
|
16105
|
+
}
|
|
16106
|
+
for (let { x: x3, y: y3, $raw: $raw2 } of outliers) {
|
|
16107
|
+
const { h: ox, v: oy } = __props.coord2pos({ x: x3, y: y3 });
|
|
16108
|
+
const outlierpath2d = new Path2D();
|
|
16109
|
+
outlierpath2d.arc(ox + translateX, oy + translateY, 2, 0, Math.PI * 2);
|
|
16102
16110
|
if (color2 != null && color2 !== "none") {
|
|
16103
|
-
ctx.
|
|
16104
|
-
ctx.
|
|
16105
|
-
ctx.stroke(medianpath2d);
|
|
16106
|
-
}
|
|
16107
|
-
for (let { x: x3, y: y3, $raw: $raw2 } of outliers) {
|
|
16108
|
-
const { h: ox, v: oy } = __props.coord2pos({ x: x3, y: y3 });
|
|
16109
|
-
const outlierpath2d = new Path2D();
|
|
16110
|
-
outlierpath2d.arc(ox + translateX, oy + translateY, 2, 0, Math.PI * 2);
|
|
16111
|
-
if (color2 != null && color2 !== "none") {
|
|
16112
|
-
ctx.fillStyle = color2;
|
|
16113
|
-
ctx.fill(outlierpath2d);
|
|
16114
|
-
}
|
|
16115
|
-
_path_data.set(outlierpath2d, $raw2);
|
|
16111
|
+
ctx.fillStyle = color2;
|
|
16112
|
+
ctx.fill(outlierpath2d);
|
|
16116
16113
|
}
|
|
16114
|
+
_path_data.set(outlierpath2d, $raw2);
|
|
16117
16115
|
}
|
|
16118
16116
|
}
|
|
16119
16117
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16179,41 +16177,39 @@ const _sfc_main$_ = {
|
|
|
16179
16177
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16180
16178
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16181
16179
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16182
|
-
for (
|
|
16183
|
-
|
|
16184
|
-
|
|
16185
|
-
|
|
16186
|
-
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
}
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
|
|
16203
|
-
|
|
16204
|
-
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
ctx.stroke(path2d);
|
|
16216
|
-
}
|
|
16180
|
+
for (let {
|
|
16181
|
+
points,
|
|
16182
|
+
fill,
|
|
16183
|
+
color: color2,
|
|
16184
|
+
linewidth,
|
|
16185
|
+
linetype,
|
|
16186
|
+
alpha: alpha2,
|
|
16187
|
+
"translate-x": translateX = 0,
|
|
16188
|
+
"translate-y": translateY = 0,
|
|
16189
|
+
$raw,
|
|
16190
|
+
interpolate: interpolate2
|
|
16191
|
+
} of __props.data) {
|
|
16192
|
+
points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
|
|
16193
|
+
if (points.length === 0) continue;
|
|
16194
|
+
const path2d = new Path2D();
|
|
16195
|
+
let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
|
|
16196
|
+
let interpolator = interpolatorFn(path2d);
|
|
16197
|
+
interpolator.lineStart();
|
|
16198
|
+
for (let i = 0; i < points.length; i++) {
|
|
16199
|
+
interpolator.point(points[i].x + translateX, points[i].y + translateY);
|
|
16200
|
+
}
|
|
16201
|
+
interpolator.lineEnd();
|
|
16202
|
+
_path_data.set(path2d, $raw);
|
|
16203
|
+
ctx.lineWidth = linewidth;
|
|
16204
|
+
ctx.globalAlpha = alpha2;
|
|
16205
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16206
|
+
if (fill !== "none") {
|
|
16207
|
+
ctx.fillStyle = fill;
|
|
16208
|
+
ctx.fill(path2d);
|
|
16209
|
+
}
|
|
16210
|
+
if (color2 != null && color2 !== "none") {
|
|
16211
|
+
ctx.strokeStyle = color2;
|
|
16212
|
+
ctx.stroke(path2d);
|
|
16217
16213
|
}
|
|
16218
16214
|
}
|
|
16219
16215
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16288,46 +16284,44 @@ const _sfc_main$Z = {
|
|
|
16288
16284
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16289
16285
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16290
16286
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16291
|
-
for (
|
|
16292
|
-
|
|
16293
|
-
|
|
16294
|
-
|
|
16295
|
-
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
|
|
16301
|
-
|
|
16302
|
-
|
|
16303
|
-
|
|
16304
|
-
|
|
16305
|
-
|
|
16306
|
-
|
|
16307
|
-
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16311
|
-
|
|
16312
|
-
|
|
16313
|
-
|
|
16314
|
-
|
|
16315
|
-
|
|
16316
|
-
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
|
|
16323
|
-
|
|
16324
|
-
|
|
16325
|
-
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
ctx.stroke(path2d);
|
|
16330
|
-
}
|
|
16287
|
+
for (let {
|
|
16288
|
+
cx,
|
|
16289
|
+
cy,
|
|
16290
|
+
A,
|
|
16291
|
+
B,
|
|
16292
|
+
C,
|
|
16293
|
+
fill,
|
|
16294
|
+
color: color2,
|
|
16295
|
+
linewidth,
|
|
16296
|
+
linetype,
|
|
16297
|
+
alpha: alpha2,
|
|
16298
|
+
"translate-x": translateX = 0,
|
|
16299
|
+
"translate-y": translateY = 0,
|
|
16300
|
+
$raw
|
|
16301
|
+
} of __props.data) {
|
|
16302
|
+
let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
|
|
16303
|
+
const { h: ch, v: cv } = __props.coord2pos({ x: cx, y: cy });
|
|
16304
|
+
let { h: h1, v: v1 } = __props.coord2pos({ x: cx - dx, y: cy - dy }), { h: h2, v: v2 } = __props.coord2pos({ x: cx + dx, y: cy + dy });
|
|
16305
|
+
let scaleX = (h2 - h1) / (2 * dx), scaleY = (v2 - v1) / (2 * dy);
|
|
16306
|
+
A /= scaleX * scaleX;
|
|
16307
|
+
B /= scaleX * scaleY;
|
|
16308
|
+
C /= scaleY * scaleY;
|
|
16309
|
+
const tr = A + C, det = A * C - B * B;
|
|
16310
|
+
const disc = Math.sqrt(Math.max(0, tr * tr / 4 - det));
|
|
16311
|
+
let rx2 = 1 / Math.sqrt(tr / 2 + disc), ry = 1 / Math.sqrt(tr / 2 - disc), angle2 = Math.atan2(2 * B, A - C) / 2;
|
|
16312
|
+
const path2d = new Path2D();
|
|
16313
|
+
path2d.ellipse(ch + translateX, cv + translateY, rx2, ry, angle2, 0, 2 * Math.PI);
|
|
16314
|
+
_path_data.set(path2d, $raw);
|
|
16315
|
+
ctx.lineWidth = linewidth;
|
|
16316
|
+
ctx.globalAlpha = alpha2;
|
|
16317
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16318
|
+
if (fill !== "none") {
|
|
16319
|
+
ctx.fillStyle = fill;
|
|
16320
|
+
ctx.fill(path2d);
|
|
16321
|
+
}
|
|
16322
|
+
if (color2 != null && color2 !== "none") {
|
|
16323
|
+
ctx.strokeStyle = color2;
|
|
16324
|
+
ctx.stroke(path2d);
|
|
16331
16325
|
}
|
|
16332
16326
|
}
|
|
16333
16327
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16393,33 +16387,31 @@ const _sfc_main$Y = {
|
|
|
16393
16387
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16394
16388
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16395
16389
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16396
|
-
for (
|
|
16397
|
-
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16401
|
-
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16407
|
-
|
|
16408
|
-
|
|
16409
|
-
}
|
|
16410
|
-
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
ctx.stroke(path2d);
|
|
16422
|
-
}
|
|
16390
|
+
for (let {
|
|
16391
|
+
x: x2,
|
|
16392
|
+
y: y2,
|
|
16393
|
+
xend,
|
|
16394
|
+
yend,
|
|
16395
|
+
color: color2 = "black",
|
|
16396
|
+
linewidth,
|
|
16397
|
+
alpha: alpha2,
|
|
16398
|
+
linetype,
|
|
16399
|
+
"translate-x": translateX = 0,
|
|
16400
|
+
"translate-y": translateY = 0,
|
|
16401
|
+
$raw
|
|
16402
|
+
} of __props.data) {
|
|
16403
|
+
const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
|
|
16404
|
+
const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
|
|
16405
|
+
const path2d = new Path2D();
|
|
16406
|
+
path2d.moveTo(x1 + translateX, y1 + translateY);
|
|
16407
|
+
path2d.lineTo(x22 + translateX, y22 + translateY);
|
|
16408
|
+
_path_data.set(path2d, $raw);
|
|
16409
|
+
ctx.lineWidth = linewidth;
|
|
16410
|
+
ctx.globalAlpha = alpha2;
|
|
16411
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16412
|
+
if (color2 != null && color2 !== "none") {
|
|
16413
|
+
ctx.strokeStyle = color2;
|
|
16414
|
+
ctx.stroke(path2d);
|
|
16423
16415
|
}
|
|
16424
16416
|
}
|
|
16425
16417
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16493,55 +16485,53 @@ const _sfc_main$X = {
|
|
|
16493
16485
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16494
16486
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16495
16487
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16496
|
-
for (
|
|
16497
|
-
|
|
16498
|
-
|
|
16499
|
-
|
|
16500
|
-
|
|
16501
|
-
|
|
16502
|
-
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
}
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
|
|
16522
|
-
|
|
16523
|
-
|
|
16524
|
-
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
|
|
16528
|
-
|
|
16529
|
-
|
|
16530
|
-
|
|
16531
|
-
|
|
16532
|
-
|
|
16533
|
-
|
|
16534
|
-
|
|
16535
|
-
|
|
16536
|
-
|
|
16537
|
-
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
ctx.stroke(path2d);
|
|
16544
|
-
}
|
|
16488
|
+
for (let {
|
|
16489
|
+
x: x2,
|
|
16490
|
+
y: y2,
|
|
16491
|
+
size = 6,
|
|
16492
|
+
shape: shape2,
|
|
16493
|
+
color: color2,
|
|
16494
|
+
stroke,
|
|
16495
|
+
linewidth,
|
|
16496
|
+
linetype,
|
|
16497
|
+
alpha: alpha2,
|
|
16498
|
+
"translate-x": translateX = 0,
|
|
16499
|
+
"translate-y": translateY = 0,
|
|
16500
|
+
angle: angle2 = 0,
|
|
16501
|
+
$raw
|
|
16502
|
+
} of __props.data) {
|
|
16503
|
+
const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
|
|
16504
|
+
if (typeof angle2 == "object") {
|
|
16505
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16506
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16507
|
+
angle2 = Math.atan2(v - cy, h - cx) * 180 / Math.PI;
|
|
16508
|
+
}
|
|
16509
|
+
const path2d = new Path2D();
|
|
16510
|
+
if (String(shape2).startsWith("path:")) {
|
|
16511
|
+
path2d.addPath(
|
|
16512
|
+
new Path2D(shape2.slice(5)),
|
|
16513
|
+
new DOMMatrix().translateSelf(cx + translateX, cy + translateY).rotate(angle2)
|
|
16514
|
+
);
|
|
16515
|
+
} else if (shape2 in paths) {
|
|
16516
|
+
path2d.addPath(
|
|
16517
|
+
new Path2D(paths[shape2](size)),
|
|
16518
|
+
new DOMMatrix().translate(cx + translateX, cy + translateY).rotate(angle2)
|
|
16519
|
+
);
|
|
16520
|
+
} else {
|
|
16521
|
+
path2d.arc(cx + translateX, cy + translateY, size / 2, 0, Math.PI * 2);
|
|
16522
|
+
}
|
|
16523
|
+
_path_data.set(path2d, $raw);
|
|
16524
|
+
ctx.lineWidth = linewidth;
|
|
16525
|
+
ctx.globalAlpha = alpha2;
|
|
16526
|
+
ctx.beginPath();
|
|
16527
|
+
if (color2 !== "none") {
|
|
16528
|
+
ctx.fillStyle = color2;
|
|
16529
|
+
ctx.fill(path2d);
|
|
16530
|
+
}
|
|
16531
|
+
if (stroke != null && stroke !== "none") {
|
|
16532
|
+
ctx.strokeStyle = stroke;
|
|
16533
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16534
|
+
ctx.stroke(path2d);
|
|
16545
16535
|
}
|
|
16546
16536
|
}
|
|
16547
16537
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16607,38 +16597,36 @@ const _sfc_main$W = {
|
|
|
16607
16597
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16608
16598
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16609
16599
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16610
|
-
for (
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
|
|
16617
|
-
|
|
16618
|
-
|
|
16619
|
-
|
|
16620
|
-
|
|
16621
|
-
}
|
|
16622
|
-
|
|
16623
|
-
|
|
16624
|
-
|
|
16625
|
-
|
|
16626
|
-
|
|
16627
|
-
|
|
16628
|
-
|
|
16629
|
-
|
|
16630
|
-
|
|
16631
|
-
|
|
16632
|
-
|
|
16633
|
-
|
|
16634
|
-
|
|
16635
|
-
|
|
16636
|
-
|
|
16637
|
-
|
|
16638
|
-
|
|
16639
|
-
|
|
16640
|
-
ctx.stroke(path2d);
|
|
16641
|
-
}
|
|
16600
|
+
for (let {
|
|
16601
|
+
points,
|
|
16602
|
+
fill,
|
|
16603
|
+
color: color2,
|
|
16604
|
+
linewidth,
|
|
16605
|
+
linetype,
|
|
16606
|
+
alpha: alpha2,
|
|
16607
|
+
"translate-x": translateX = 0,
|
|
16608
|
+
"translate-y": translateY = 0,
|
|
16609
|
+
$raw
|
|
16610
|
+
} of __props.data) {
|
|
16611
|
+
points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
|
|
16612
|
+
if (points.length === 0) continue;
|
|
16613
|
+
const path2d = new Path2D();
|
|
16614
|
+
path2d.moveTo(points[0].x + translateX, points[0].y + translateY);
|
|
16615
|
+
for (let i = 1; i < points.length; i++) {
|
|
16616
|
+
path2d.lineTo(points[i].x + translateX, points[i].y + translateY);
|
|
16617
|
+
}
|
|
16618
|
+
path2d.closePath();
|
|
16619
|
+
_path_data.set(path2d, $raw);
|
|
16620
|
+
ctx.lineWidth = linewidth;
|
|
16621
|
+
ctx.globalAlpha = alpha2;
|
|
16622
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16623
|
+
if (fill !== "none") {
|
|
16624
|
+
ctx.fillStyle = fill;
|
|
16625
|
+
ctx.fill(path2d);
|
|
16626
|
+
}
|
|
16627
|
+
if (color2 != null && color2 !== "none") {
|
|
16628
|
+
ctx.strokeStyle = color2;
|
|
16629
|
+
ctx.stroke(path2d);
|
|
16642
16630
|
}
|
|
16643
16631
|
}
|
|
16644
16632
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16704,36 +16692,34 @@ const _sfc_main$V = {
|
|
|
16704
16692
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16705
16693
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16706
16694
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16707
|
-
for (
|
|
16708
|
-
|
|
16709
|
-
|
|
16710
|
-
|
|
16711
|
-
|
|
16712
|
-
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16716
|
-
|
|
16717
|
-
|
|
16718
|
-
|
|
16719
|
-
|
|
16720
|
-
|
|
16721
|
-
}
|
|
16722
|
-
|
|
16723
|
-
|
|
16724
|
-
|
|
16725
|
-
|
|
16726
|
-
|
|
16727
|
-
|
|
16728
|
-
|
|
16729
|
-
|
|
16730
|
-
|
|
16731
|
-
|
|
16732
|
-
|
|
16733
|
-
|
|
16734
|
-
|
|
16735
|
-
ctx.stroke(path2d);
|
|
16736
|
-
}
|
|
16695
|
+
for (let {
|
|
16696
|
+
xmin,
|
|
16697
|
+
xmax,
|
|
16698
|
+
ymin,
|
|
16699
|
+
ymax,
|
|
16700
|
+
fill,
|
|
16701
|
+
color: color2,
|
|
16702
|
+
linewidth,
|
|
16703
|
+
linetype,
|
|
16704
|
+
alpha: alpha2,
|
|
16705
|
+
"translate-x": translateX = 0,
|
|
16706
|
+
"translate-y": translateY = 0,
|
|
16707
|
+
$raw
|
|
16708
|
+
} of __props.data) {
|
|
16709
|
+
const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
|
|
16710
|
+
const path2d = new Path2D();
|
|
16711
|
+
path2d.rect(x1 + translateX, y1 + translateY, x2 - x1, y2 - y1);
|
|
16712
|
+
_path_data.set(path2d, $raw);
|
|
16713
|
+
ctx.lineWidth = linewidth;
|
|
16714
|
+
ctx.globalAlpha = alpha2;
|
|
16715
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16716
|
+
if (fill !== "none") {
|
|
16717
|
+
ctx.fillStyle = fill;
|
|
16718
|
+
ctx.fill(path2d);
|
|
16719
|
+
}
|
|
16720
|
+
if (color2 !== "none" && color2 != null) {
|
|
16721
|
+
ctx.strokeStyle = color2;
|
|
16722
|
+
ctx.stroke(path2d);
|
|
16737
16723
|
}
|
|
16738
16724
|
}
|
|
16739
16725
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
@@ -16799,77 +16785,75 @@ const _sfc_main$U = {
|
|
|
16799
16785
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16800
16786
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16801
16787
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16802
|
-
for (
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
}
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
ctx.strokeText(label, 0, 0);
|
|
16870
|
-
}
|
|
16871
|
-
ctx.restore();
|
|
16788
|
+
for (let {
|
|
16789
|
+
x: x2,
|
|
16790
|
+
y: y2,
|
|
16791
|
+
color: color2,
|
|
16792
|
+
size = 4,
|
|
16793
|
+
label = "",
|
|
16794
|
+
title,
|
|
16795
|
+
stroke,
|
|
16796
|
+
linewidth,
|
|
16797
|
+
linetype,
|
|
16798
|
+
alpha: alpha2,
|
|
16799
|
+
"anchor-x": anchorX,
|
|
16800
|
+
"anchor-y": anchorY,
|
|
16801
|
+
"dock-x": dockX,
|
|
16802
|
+
"dock-y": dockY,
|
|
16803
|
+
"translate-x": translateX = 0,
|
|
16804
|
+
"translate-y": translateY = 0,
|
|
16805
|
+
angle: angle2,
|
|
16806
|
+
"text-length": textLength,
|
|
16807
|
+
"font-family": fontFamily = "sans-serif",
|
|
16808
|
+
$raw
|
|
16809
|
+
} of __props.data) {
|
|
16810
|
+
ctx.save();
|
|
16811
|
+
const { h: tx, v: ty } = __props.coord2pos({ x: x2, y: y2 });
|
|
16812
|
+
ctx.textAlign = "center";
|
|
16813
|
+
ctx.textBaseline = "middle";
|
|
16814
|
+
ctx.lineWidth = linewidth;
|
|
16815
|
+
ctx.globalAlpha = alpha2;
|
|
16816
|
+
ctx.font = `${size * 4}px ${fontFamily}`;
|
|
16817
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16818
|
+
ctx.translate(tx + translateX, ty + translateY);
|
|
16819
|
+
let { width: w, fontBoundingBoxAscent: a, fontBoundingBoxDescent: d } = ctx.measureText(label), width = w, height = a + d;
|
|
16820
|
+
if (typeof textLength == "object") {
|
|
16821
|
+
let { x: lx = 0, y: ly = 0 } = textLength;
|
|
16822
|
+
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 });
|
|
16823
|
+
width = Math.hypot(h1 - h2 || 0, v1 - v2 || 0);
|
|
16824
|
+
} else if (textLength != null) {
|
|
16825
|
+
width = textLength;
|
|
16826
|
+
}
|
|
16827
|
+
if (typeof angle2 == "object") {
|
|
16828
|
+
let { dx = 0, dy = 0 } = angle2;
|
|
16829
|
+
let { h, v } = __props.coord2pos({ x: x2 + dx, y: y2 + dy });
|
|
16830
|
+
angle2 = Math.atan2(v - ty, h - tx) * 180 / Math.PI;
|
|
16831
|
+
}
|
|
16832
|
+
if (dockX != null || dockY != null) {
|
|
16833
|
+
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);
|
|
16834
|
+
if (isNaN(alnX)) alnX = 0.5;
|
|
16835
|
+
if (isNaN(alnY)) alnY = 0.5;
|
|
16836
|
+
let w2 = width * Math.abs(Math.cos(angle2 * Math.PI / 180)) + height * Math.abs(Math.sin(angle2 * Math.PI / 180)), h = width * Math.abs(Math.sin(angle2 * Math.PI / 180)) + height * Math.abs(Math.cos(angle2 * Math.PI / 180));
|
|
16837
|
+
ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
|
|
16838
|
+
ctx.rotate(angle2 * Math.PI / 180);
|
|
16839
|
+
} else {
|
|
16840
|
+
let alnX = { left: 0, center: 0.5, right: 1 }[anchorX] ?? +(anchorX ?? 0.5), alnY = { bottom: 0, center: 0.5, top: 1 }[anchorY] ?? +(anchorY ?? 0.5);
|
|
16841
|
+
if (isNaN(alnX)) alnX = 0.5;
|
|
16842
|
+
if (isNaN(alnY)) alnY = 0.5;
|
|
16843
|
+
let w2 = width, h = height;
|
|
16844
|
+
ctx.rotate(angle2 * Math.PI / 180);
|
|
16845
|
+
ctx.translate(w2 * (0.5 - alnX), h * (alnY - 0.5));
|
|
16846
|
+
}
|
|
16847
|
+
if (width != w) ctx.scale(width / w, 1);
|
|
16848
|
+
if (color2 !== "none") {
|
|
16849
|
+
ctx.fillStyle = color2;
|
|
16850
|
+
ctx.fillText(label, 0, 0);
|
|
16851
|
+
}
|
|
16852
|
+
if (stroke != null && stroke !== "none") {
|
|
16853
|
+
ctx.strokeStyle = stroke;
|
|
16854
|
+
ctx.strokeText(label, 0, 0);
|
|
16872
16855
|
}
|
|
16856
|
+
ctx.restore();
|
|
16873
16857
|
}
|
|
16874
16858
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
16875
16859
|
path_data.set(path2, _path_data.get(path2));
|
|
@@ -16934,69 +16918,86 @@ const _sfc_main$T = {
|
|
|
16934
16918
|
ctx.scale(__props.dpi / 96, __props.dpi / 96);
|
|
16935
16919
|
ctx.translate(__props.layout.l + __props.layout.fullWidth * __props.extendX, __props.layout.t + __props.layout.fullHeight * __props.extendY);
|
|
16936
16920
|
let _path_data = /* @__PURE__ */ new Map(), path_data = /* @__PURE__ */ new Map();
|
|
16937
|
-
for (
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16953
|
-
|
|
16954
|
-
|
|
16955
|
-
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
}
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
|
|
16963
|
-
|
|
16964
|
-
|
|
16965
|
-
|
|
16966
|
-
|
|
16967
|
-
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
|
|
16988
|
-
|
|
16989
|
-
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16921
|
+
for (let {
|
|
16922
|
+
x: x2,
|
|
16923
|
+
xend,
|
|
16924
|
+
y: y2,
|
|
16925
|
+
yend,
|
|
16926
|
+
size = 4,
|
|
16927
|
+
label = "",
|
|
16928
|
+
title,
|
|
16929
|
+
color: color2,
|
|
16930
|
+
stroke,
|
|
16931
|
+
linewidth,
|
|
16932
|
+
linetype,
|
|
16933
|
+
alpha: alpha2,
|
|
16934
|
+
"translate-x": translateX = 0,
|
|
16935
|
+
"translate-y": translateY = 0,
|
|
16936
|
+
"text-length": textLength,
|
|
16937
|
+
"font-family": fontFamily = "sans-serif",
|
|
16938
|
+
"text-align": textAlign = "justify",
|
|
16939
|
+
angle: angle2 = "auto",
|
|
16940
|
+
inset = 0,
|
|
16941
|
+
$raw
|
|
16942
|
+
} of __props.data) {
|
|
16943
|
+
const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
|
|
16944
|
+
const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
|
|
16945
|
+
ctx.save();
|
|
16946
|
+
ctx.translate(translateX, translateY);
|
|
16947
|
+
ctx.textBaseline = "middle";
|
|
16948
|
+
ctx.lineWidth = linewidth;
|
|
16949
|
+
ctx.globalAlpha = alpha2;
|
|
16950
|
+
ctx.font = `${size * 4}px ${fontFamily}`;
|
|
16951
|
+
ctx.setLineDash(parseLinetype(linetype));
|
|
16952
|
+
if (["stretch", "pre", "start", "center", "end", "post"].includes(textAlign)) {
|
|
16953
|
+
let radian = Math.atan2(y22 - y1, x22 - x1);
|
|
16954
|
+
let text2 = String(label).replace(/\x01|\x02/g, "");
|
|
16955
|
+
let insetX = Math.cos(radian) * inset, insetY = Math.sin(radian) * inset;
|
|
16956
|
+
switch (textAlign) {
|
|
16957
|
+
case "stretch":
|
|
16958
|
+
case "center":
|
|
16959
|
+
ctx.translate((x1 + x22) / 2, (y1 + y22) / 2);
|
|
16960
|
+
ctx.textAlign = "center";
|
|
16961
|
+
break;
|
|
16962
|
+
case "pre":
|
|
16963
|
+
ctx.translate(x1 - insetX, y1 - insetY);
|
|
16964
|
+
ctx.textAlign = "end";
|
|
16965
|
+
break;
|
|
16966
|
+
case "start":
|
|
16967
|
+
ctx.translate(x1 + insetX, y1 + insetY);
|
|
16968
|
+
ctx.textAlign = "start";
|
|
16969
|
+
break;
|
|
16970
|
+
case "end":
|
|
16971
|
+
ctx.translate(x22 - insetX, y22 - insetY);
|
|
16972
|
+
ctx.textAlign = "end";
|
|
16973
|
+
break;
|
|
16974
|
+
case "post":
|
|
16975
|
+
ctx.translate(x22 + insetX, y22 + insetY);
|
|
16976
|
+
ctx.textAlign = "start";
|
|
16977
|
+
break;
|
|
16978
|
+
}
|
|
16979
|
+
ctx.rotate(radian);
|
|
16980
|
+
if (textAlign === "stretch") {
|
|
16981
|
+
ctx.scale(Math.hypot(x22 - x1 || 0, y22 - y1 || 0) / ctx.measureText(text2).width, 1);
|
|
16982
|
+
}
|
|
16983
|
+
if (color2 !== "none") {
|
|
16984
|
+
ctx.fillStyle = color2;
|
|
16985
|
+
ctx.fillText(text2, 0, 0);
|
|
16986
|
+
}
|
|
16987
|
+
if (stroke != null && stroke !== "none") {
|
|
16988
|
+
ctx.strokeStyle = stroke;
|
|
16989
|
+
ctx.strokeText(text2, 0, 0);
|
|
16990
|
+
}
|
|
16991
|
+
} else {
|
|
16992
|
+
let radian = angle2 === "auto" ? Math.atan2(y22 - y1, x22 - x1) : angle2 * Math.PI / 180;
|
|
16993
|
+
ctx.textAlign = "center";
|
|
16994
|
+
let parts = splitLabel(String(label));
|
|
16995
|
+
let dx = (x22 - x1) / (parts.length - 1 || 1), dy = (y22 - y1) / (parts.length - 1 || 1);
|
|
16996
|
+
for (let i = 0; i < parts.length; i++) {
|
|
16997
|
+
ctx.save();
|
|
16998
|
+
ctx.translate(x1 + i * dx, y1 + i * dy);
|
|
16996
16999
|
ctx.rotate(radian);
|
|
16997
|
-
|
|
16998
|
-
ctx.scale(Math.hypot(x22 - x1 || 0, y22 - y1 || 0) / ctx.measureText(text2).width, 1);
|
|
16999
|
-
}
|
|
17000
|
+
let text2 = parts[i];
|
|
17000
17001
|
if (color2 !== "none") {
|
|
17001
17002
|
ctx.fillStyle = color2;
|
|
17002
17003
|
ctx.fillText(text2, 0, 0);
|
|
@@ -17005,29 +17006,10 @@ const _sfc_main$T = {
|
|
|
17005
17006
|
ctx.strokeStyle = stroke;
|
|
17006
17007
|
ctx.strokeText(text2, 0, 0);
|
|
17007
17008
|
}
|
|
17008
|
-
|
|
17009
|
-
let radian = angle2 === "auto" ? Math.atan2(y22 - y1, x22 - x1) : angle2 * Math.PI / 180;
|
|
17010
|
-
ctx.textAlign = "center";
|
|
17011
|
-
let parts = splitLabel(String(label));
|
|
17012
|
-
let dx = (x22 - x1) / (parts.length - 1 || 1), dy = (y22 - y1) / (parts.length - 1 || 1);
|
|
17013
|
-
for (let i = 0; i < parts.length; i++) {
|
|
17014
|
-
ctx.save();
|
|
17015
|
-
ctx.translate(x1 + i * dx, y1 + i * dy);
|
|
17016
|
-
ctx.rotate(radian);
|
|
17017
|
-
let text2 = parts[i];
|
|
17018
|
-
if (color2 !== "none") {
|
|
17019
|
-
ctx.fillStyle = color2;
|
|
17020
|
-
ctx.fillText(text2, 0, 0);
|
|
17021
|
-
}
|
|
17022
|
-
if (stroke != null && stroke !== "none") {
|
|
17023
|
-
ctx.strokeStyle = stroke;
|
|
17024
|
-
ctx.strokeText(text2, 0, 0);
|
|
17025
|
-
}
|
|
17026
|
-
ctx.restore();
|
|
17027
|
-
}
|
|
17009
|
+
ctx.restore();
|
|
17028
17010
|
}
|
|
17029
|
-
ctx.restore();
|
|
17030
17011
|
}
|
|
17012
|
+
ctx.restore();
|
|
17031
17013
|
}
|
|
17032
17014
|
for (let path2 of Array.from(_path_data.keys()).reverse()) {
|
|
17033
17015
|
path_data.set(path2, _path_data.get(path2));
|
|
@@ -17264,7 +17246,7 @@ const _sfc_main$O = {
|
|
|
17264
17246
|
const emit = __emit;
|
|
17265
17247
|
const binds = computed(() => {
|
|
17266
17248
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17267
|
-
return __props.data.map((group) => group.map(({
|
|
17249
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17268
17250
|
x: x2,
|
|
17269
17251
|
xmin,
|
|
17270
17252
|
xmax,
|
|
@@ -17494,7 +17476,7 @@ const _sfc_main$M = {
|
|
|
17494
17476
|
const emit = __emit;
|
|
17495
17477
|
const binds = computed(() => {
|
|
17496
17478
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17497
|
-
return __props.data.map((group) => group.map(({
|
|
17479
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17498
17480
|
points,
|
|
17499
17481
|
fill,
|
|
17500
17482
|
color: color2,
|
|
@@ -17612,7 +17594,7 @@ const _sfc_main$K = {
|
|
|
17612
17594
|
const emit = __emit;
|
|
17613
17595
|
const binds = computed(() => {
|
|
17614
17596
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17615
|
-
return __props.data.map((group) => group.map(({
|
|
17597
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17616
17598
|
cx,
|
|
17617
17599
|
cy,
|
|
17618
17600
|
A,
|
|
@@ -17694,7 +17676,7 @@ const _sfc_main$J = {
|
|
|
17694
17676
|
const emit = __emit;
|
|
17695
17677
|
const binds = computed(() => {
|
|
17696
17678
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17697
|
-
return __props.data.map((group) => group.map(({
|
|
17679
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17698
17680
|
x: x2,
|
|
17699
17681
|
y: y2,
|
|
17700
17682
|
xend,
|
|
@@ -17769,7 +17751,7 @@ const _sfc_main$I = {
|
|
|
17769
17751
|
const emit = __emit;
|
|
17770
17752
|
const binds = computed(() => {
|
|
17771
17753
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17772
|
-
return __props.data.map((group) => group.map(({
|
|
17754
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17773
17755
|
x: x2,
|
|
17774
17756
|
y: y2,
|
|
17775
17757
|
size = 4,
|
|
@@ -17868,7 +17850,7 @@ const _sfc_main$H = {
|
|
|
17868
17850
|
const emit = __emit;
|
|
17869
17851
|
const binds = computed(() => {
|
|
17870
17852
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17871
|
-
return __props.data.map((group) => group.map(({
|
|
17853
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17872
17854
|
x: x2,
|
|
17873
17855
|
xend,
|
|
17874
17856
|
y: y2,
|
|
@@ -17989,7 +17971,7 @@ const _sfc_main$G = {
|
|
|
17989
17971
|
const emit = __emit;
|
|
17990
17972
|
const binds = computed(() => {
|
|
17991
17973
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
17992
|
-
return __props.data.map((group) => group.map(({
|
|
17974
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
17993
17975
|
x: x2,
|
|
17994
17976
|
y: y2,
|
|
17995
17977
|
shape: shape2,
|
|
@@ -18103,7 +18085,7 @@ const _sfc_main$E = {
|
|
|
18103
18085
|
const emit = __emit;
|
|
18104
18086
|
const binds = computed(() => {
|
|
18105
18087
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
18106
|
-
return __props.data.map((group) => group.map(({
|
|
18088
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
18107
18089
|
points,
|
|
18108
18090
|
fill,
|
|
18109
18091
|
color: color2,
|
|
@@ -18175,7 +18157,7 @@ const _sfc_main$D = {
|
|
|
18175
18157
|
const emit = __emit;
|
|
18176
18158
|
const binds = computed(() => {
|
|
18177
18159
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
18178
|
-
return __props.data.map((group) => group.map(({
|
|
18160
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
18179
18161
|
xmin,
|
|
18180
18162
|
xmax,
|
|
18181
18163
|
ymin,
|
|
@@ -18247,7 +18229,7 @@ const _sfc_main$C = {
|
|
|
18247
18229
|
const emit = __emit;
|
|
18248
18230
|
const binds = computed(() => {
|
|
18249
18231
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
18250
|
-
return __props.data.map((group) => group.map(({
|
|
18232
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
18251
18233
|
x: x2,
|
|
18252
18234
|
y: y2,
|
|
18253
18235
|
size = 4,
|
|
@@ -18346,7 +18328,7 @@ const _sfc_main$B = {
|
|
|
18346
18328
|
const emit = __emit;
|
|
18347
18329
|
const binds = computed(() => {
|
|
18348
18330
|
let xlim_min = -__props.layout.fullWidth * __props.extendX - __props.layout.l, xlim_max = __props.layout.fullWidth * (1 + __props.extendX) - __props.layout.l, ylim_min = -__props.layout.fullHeight * __props.extendY - __props.layout.t, ylim_max = __props.layout.fullHeight * (1 + __props.extendY) - __props.layout.t;
|
|
18349
|
-
return __props.data.map((group) => group.map(({
|
|
18331
|
+
return Object.values(Object.groupBy(__props.data, (d) => d.$group)).map((group) => group.map(({
|
|
18350
18332
|
x: x2,
|
|
18351
18333
|
xend,
|
|
18352
18334
|
y: y2,
|
|
@@ -20633,6 +20615,7 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
|
20633
20615
|
let oldSize = { width: 0, height: 0 };
|
|
20634
20616
|
useResizeObserver(plotRef, (e) => {
|
|
20635
20617
|
let { width: w, height: h } = e[0].contentRect;
|
|
20618
|
+
if (width.value - w < 0.5 && height.value - h < 0.5) return;
|
|
20636
20619
|
if (wrapperRef.value.style.width) width.value = w;
|
|
20637
20620
|
if (wrapperRef.value.style.height) height.value = h;
|
|
20638
20621
|
if ((w > 0 || h > 0) && (oldSize.width > 0 || oldSize.height > 0))
|