vvplot 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6268,7 +6268,7 @@ function palette_scale_dynamic({
6268
6268
  return Object.assign(fn, { title, limits, oob: oob2 }, etc);
6269
6269
  }
6270
6270
  function shape_scale_discrete({ title, ...etc } = {}) {
6271
- let shapes = ["circle", "square", "triangle", "diamond", "plus"];
6271
+ let shapes = ["circle", "square", "triangle", "diamond", "plus", "cross"];
6272
6272
  let fn = function(arr) {
6273
6273
  return arr.map((v) => shapes[+v]);
6274
6274
  };
@@ -7096,6 +7096,7 @@ const _sfc_main$13 = {
7096
7096
  return {
7097
7097
  x: __props.x,
7098
7098
  y: __props.y,
7099
+ color: __props.color || null,
7099
7100
  fill: __props.color || null,
7100
7101
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
7101
7102
  stroke: __props.stroke || null,
@@ -14347,6 +14348,7 @@ const _sfc_main$12 = {
14347
14348
  return {
14348
14349
  x: __props.x,
14349
14350
  y: __props.y,
14351
+ color: __props.color || null,
14350
14352
  fill: __props.color || null,
14351
14353
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
14352
14354
  stroke: __props.stroke || null,
@@ -15642,7 +15644,7 @@ const _sfc_main$X = {
15642
15644
  points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
15643
15645
  if (points.length === 0) continue;
15644
15646
  const path2d = new Path2D();
15645
- let interpolatorFn = interpolators[interpolate2] ?? natural$1;
15647
+ let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
15646
15648
  let interpolator = interpolatorFn(path2d);
15647
15649
  interpolator.lineStart();
15648
15650
  for (let i = 0; i < points.length; i++) {
@@ -16532,6 +16534,7 @@ const _sfc_main$O = {
16532
16534
  y: __props.y - __props.height / 2,
16533
16535
  width: __props.width,
16534
16536
  height: __props.height,
16537
+ color: __props.color || null,
16535
16538
  fill: __props.fill || null,
16536
16539
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16537
16540
  stroke: __props.color || null,
@@ -16569,6 +16572,7 @@ const _sfc_main$N = {
16569
16572
  },
16570
16573
  setup(__props) {
16571
16574
  const paths = {
16575
+ circle: "M0-0.5A0.5,0.5,0,1,1,0,0.5A0.5,0.5,0,1,1,0-0.5Z",
16572
16576
  square: "M-0.5-0.5H0.5V0.5H-0.5Z",
16573
16577
  triangle: "M0-0.667L0.577,0.333L-0.577,0.333Z",
16574
16578
  diamond: "M0-0.707L0.707,0L0,0.707L-0.707,0Z",
@@ -16578,6 +16582,7 @@ const _sfc_main$N = {
16578
16582
  const binds = computed(() => {
16579
16583
  let d = __props.shape?.startsWith?.("path:") ? __props.shape?.slice?.(5) : paths[__props.shape];
16580
16584
  let result = {
16585
+ color: __props.color || null,
16581
16586
  fill: __props.color || null,
16582
16587
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16583
16588
  stroke: __props.stroke || null,
@@ -16630,6 +16635,7 @@ const _sfc_main$M = {
16630
16635
  x2: __props.x2,
16631
16636
  y1: __props.y1,
16632
16637
  y2: __props.y2,
16638
+ color: __props.color || null,
16633
16639
  stroke: __props.color || null,
16634
16640
  "stroke-width": __props.linewidth,
16635
16641
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
@@ -16652,7 +16658,9 @@ const _sfc_main$L = {
16652
16658
  data: Object,
16653
16659
  coord2pos: Function,
16654
16660
  getCoord: Function,
16655
- layout: Object
16661
+ layout: Object,
16662
+ groupClass: null,
16663
+ groupStyle: null
16656
16664
  },
16657
16665
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16658
16666
  setup(__props, { emit: __emit }) {
@@ -16685,6 +16693,8 @@ const _sfc_main$L = {
16685
16693
  title,
16686
16694
  "translate-x": translateX = 0,
16687
16695
  "translate-y": translateY = 0,
16696
+ class: className,
16697
+ style,
16688
16698
  $raw
16689
16699
  }) => {
16690
16700
  const { hmin: x1, hmax: x22, vmin: y1, vmax: y22 } = __props.coord2pos({ xmin: $xmin, xmax: $xmax, ymin: $ymin, ymax: $ymax });
@@ -16711,7 +16721,9 @@ const _sfc_main$L = {
16711
16721
  alpha: alpha2,
16712
16722
  title,
16713
16723
  translateX,
16714
- translateY
16724
+ translateY,
16725
+ class: className,
16726
+ style
16715
16727
  },
16716
16728
  line: {
16717
16729
  x1: lx1,
@@ -16723,7 +16735,9 @@ const _sfc_main$L = {
16723
16735
  linewidth,
16724
16736
  alpha: alpha2,
16725
16737
  translateX,
16726
- translateY
16738
+ translateY,
16739
+ class: className,
16740
+ style
16727
16741
  },
16728
16742
  midline: {
16729
16743
  x1: mx1,
@@ -16735,7 +16749,9 @@ const _sfc_main$L = {
16735
16749
  linewidth: (linewidth ?? 1) * 2,
16736
16750
  alpha: alpha2,
16737
16751
  translateX,
16738
- translateY
16752
+ translateY,
16753
+ class: className,
16754
+ style
16739
16755
  },
16740
16756
  uwisker: {
16741
16757
  x1: uwx1,
@@ -16747,7 +16763,9 @@ const _sfc_main$L = {
16747
16763
  linewidth,
16748
16764
  alpha: alpha2,
16749
16765
  translateX,
16750
- translateY
16766
+ translateY,
16767
+ class: className,
16768
+ style
16751
16769
  },
16752
16770
  lwisker: {
16753
16771
  x1: lwx1,
@@ -16759,7 +16777,9 @@ const _sfc_main$L = {
16759
16777
  linewidth,
16760
16778
  alpha: alpha2,
16761
16779
  translateX,
16762
- translateY
16780
+ translateY,
16781
+ class: className,
16782
+ style
16763
16783
  },
16764
16784
  outliers: outliers?.map(({ x: x3, y: y3, $raw: $raw2 }) => {
16765
16785
  const { h: cx, v: cy } = __props.coord2pos({ x: x3, y: y3 });
@@ -16771,7 +16791,9 @@ const _sfc_main$L = {
16771
16791
  color: color2,
16772
16792
  alpha: alpha2,
16773
16793
  translateX,
16774
- translateY
16794
+ translateY,
16795
+ class: className,
16796
+ style
16775
16797
  };
16776
16798
  let von2 = Object.fromEntries(
16777
16799
  events.map((evt) => [evt, (e) => emit(evt, e, $raw2)])
@@ -16788,7 +16810,7 @@ const _sfc_main$L = {
16788
16810
  return (_ctx, _cache) => {
16789
16811
  return openBlock(), createElementBlock("g", null, [
16790
16812
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
16791
- return openBlock(), createElementBlock("g", null, [
16813
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
16792
16814
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbinds, von]) => {
16793
16815
  return openBlock(), createElementBlock("g", null, [
16794
16816
  createVNode(_sfc_main$M, mergeProps({ ref_for: true }, vbinds.line), null, 16),
@@ -16806,7 +16828,7 @@ const _sfc_main$L = {
16806
16828
  }), 256))
16807
16829
  ]);
16808
16830
  }), 256))
16809
- ]);
16831
+ ], 16);
16810
16832
  }), 256))
16811
16833
  ]);
16812
16834
  };
@@ -16830,10 +16852,12 @@ const _sfc_main$K = {
16830
16852
  },
16831
16853
  setup(__props) {
16832
16854
  const binds = computed(() => {
16833
- let interpolatorFn = interpolators[__props.interpolate] ?? natural$1;
16855
+ let interpolatorFn = typeof __props.interpolate == "function" ? __props.interpolate : interpolators[__props.interpolate] ?? natural$1;
16834
16856
  return {
16835
16857
  d: line().curve(interpolatorFn)(__props.points.map((p) => [p.x, p.y])),
16858
+ color: __props.color || null,
16836
16859
  fill: __props.fill || null,
16860
+ "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16837
16861
  stroke: __props.color || null,
16838
16862
  "stroke-width": __props.linewidth,
16839
16863
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
@@ -16862,7 +16886,9 @@ const _sfc_main$J = {
16862
16886
  data: Object,
16863
16887
  coord2pos: Function,
16864
16888
  getCoord: Function,
16865
- layout: Object
16889
+ layout: Object,
16890
+ groupClass: null,
16891
+ groupStyle: null
16866
16892
  },
16867
16893
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16868
16894
  setup(__props, { emit: __emit }) {
@@ -16880,6 +16906,8 @@ const _sfc_main$J = {
16880
16906
  title,
16881
16907
  "translate-x": translateX = 0,
16882
16908
  "translate-y": translateY = 0,
16909
+ class: className,
16910
+ style,
16883
16911
  $raw,
16884
16912
  interpolate: interpolate2
16885
16913
  }) => {
@@ -16895,6 +16923,8 @@ const _sfc_main$J = {
16895
16923
  title,
16896
16924
  translateX,
16897
16925
  translateY,
16926
+ class: className,
16927
+ style,
16898
16928
  interpolate: interpolate2
16899
16929
  };
16900
16930
  let von = Object.fromEntries(
@@ -16906,11 +16936,11 @@ const _sfc_main$J = {
16906
16936
  return (_ctx, _cache) => {
16907
16937
  return openBlock(), createElementBlock("g", null, [
16908
16938
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
16909
- return openBlock(), createElementBlock("g", null, [
16939
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
16910
16940
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
16911
16941
  return openBlock(), createBlock(_sfc_main$K, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
16912
16942
  }), 256))
16913
- ]);
16943
+ ], 16);
16914
16944
  }), 256))
16915
16945
  ]);
16916
16946
  };
@@ -16944,6 +16974,7 @@ const _sfc_main$I = {
16944
16974
  cy: __props.cy,
16945
16975
  rx: __props.rx,
16946
16976
  ry: __props.ry,
16977
+ color: __props.color || null,
16947
16978
  fill: __props.fill || null,
16948
16979
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16949
16980
  stroke: __props.color || null,
@@ -16969,7 +17000,9 @@ const _sfc_main$H = {
16969
17000
  data: Object,
16970
17001
  coord2pos: Function,
16971
17002
  getCoord: Function,
16972
- layout: Object
17003
+ layout: Object,
17004
+ groupClass: null,
17005
+ groupStyle: null
16973
17006
  },
16974
17007
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16975
17008
  setup(__props, { emit: __emit }) {
@@ -16991,6 +17024,8 @@ const _sfc_main$H = {
16991
17024
  title,
16992
17025
  "translate-x": translateX = 0,
16993
17026
  "translate-y": translateY = 0,
17027
+ class: className,
17028
+ style,
16994
17029
  $raw
16995
17030
  }) => {
16996
17031
  let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
@@ -17016,7 +17051,9 @@ const _sfc_main$H = {
17016
17051
  alpha: alpha2,
17017
17052
  title,
17018
17053
  translateX,
17019
- translateY
17054
+ translateY,
17055
+ class: className,
17056
+ style
17020
17057
  };
17021
17058
  let von = Object.fromEntries(
17022
17059
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17027,11 +17064,11 @@ const _sfc_main$H = {
17027
17064
  return (_ctx, _cache) => {
17028
17065
  return openBlock(), createElementBlock("g", null, [
17029
17066
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17030
- return openBlock(), createElementBlock("g", null, [
17067
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17031
17068
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17032
17069
  return openBlock(), createBlock(_sfc_main$I, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17033
17070
  }), 256))
17034
- ]);
17071
+ ], 16);
17035
17072
  }), 256))
17036
17073
  ]);
17037
17074
  };
@@ -17045,7 +17082,9 @@ const _sfc_main$G = {
17045
17082
  data: Object,
17046
17083
  coord2pos: Function,
17047
17084
  getCoord: Function,
17048
- layout: Object
17085
+ layout: Object,
17086
+ groupClass: null,
17087
+ groupStyle: null
17049
17088
  },
17050
17089
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17051
17090
  setup(__props, { emit: __emit }) {
@@ -17065,6 +17104,8 @@ const _sfc_main$G = {
17065
17104
  title,
17066
17105
  "translate-x": translateX = 0,
17067
17106
  "translate-y": translateY = 0,
17107
+ class: className,
17108
+ style,
17068
17109
  $raw
17069
17110
  }) => {
17070
17111
  const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
@@ -17081,7 +17122,9 @@ const _sfc_main$G = {
17081
17122
  alpha: alpha2,
17082
17123
  title,
17083
17124
  translateX,
17084
- translateY
17125
+ translateY,
17126
+ class: className,
17127
+ style
17085
17128
  };
17086
17129
  let von = Object.fromEntries(
17087
17130
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17092,11 +17135,11 @@ const _sfc_main$G = {
17092
17135
  return (_ctx, _cache) => {
17093
17136
  return openBlock(), createElementBlock("g", null, [
17094
17137
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17095
- return openBlock(), createElementBlock("g", null, [
17138
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17096
17139
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17097
17140
  return openBlock(), createBlock(_sfc_main$M, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17098
17141
  }), 256))
17099
- ]);
17142
+ ], 16);
17100
17143
  }), 256))
17101
17144
  ]);
17102
17145
  };
@@ -17110,7 +17153,9 @@ const _sfc_main$F = {
17110
17153
  data: Object,
17111
17154
  coord2pos: Function,
17112
17155
  getCoord: Function,
17113
- layout: Object
17156
+ layout: Object,
17157
+ groupClass: null,
17158
+ groupStyle: null
17114
17159
  },
17115
17160
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17116
17161
  setup(__props, { emit: __emit }) {
@@ -17139,6 +17184,8 @@ const _sfc_main$F = {
17139
17184
  "text-length": textLength,
17140
17185
  "font-family": fontFamily = "sans-serif",
17141
17186
  "text-anchor": textAnchor,
17187
+ class: className,
17188
+ style,
17142
17189
  $raw
17143
17190
  }) => {
17144
17191
  if (label == null) return null;
@@ -17163,6 +17210,8 @@ const _sfc_main$F = {
17163
17210
  angle: angle2,
17164
17211
  translateX,
17165
17212
  translateY,
17213
+ class: className,
17214
+ style,
17166
17215
  anchorX,
17167
17216
  anchorY,
17168
17217
  dockX,
@@ -17180,11 +17229,11 @@ const _sfc_main$F = {
17180
17229
  return (_ctx, _cache) => {
17181
17230
  return openBlock(), createElementBlock("g", null, [
17182
17231
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17183
- return openBlock(), createElementBlock("g", null, [
17232
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17184
17233
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17185
17234
  return openBlock(), createBlock(_sfc_main$12, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17186
17235
  }), 256))
17187
- ]);
17236
+ ], 16);
17188
17237
  }), 256))
17189
17238
  ]);
17190
17239
  };
@@ -17198,7 +17247,9 @@ const _sfc_main$E = {
17198
17247
  data: Object,
17199
17248
  coord2pos: Function,
17200
17249
  getCoord: Function,
17201
- layout: Object
17250
+ layout: Object,
17251
+ groupClass: null,
17252
+ groupStyle: null
17202
17253
  },
17203
17254
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17204
17255
  setup(__props, { emit: __emit }) {
@@ -17224,6 +17275,8 @@ const _sfc_main$E = {
17224
17275
  "font-family": fontFamily = "sans-serif",
17225
17276
  "text-align": textAlign = "start",
17226
17277
  inset = 0,
17278
+ class: className,
17279
+ style,
17227
17280
  $raw
17228
17281
  }) => {
17229
17282
  if (label == null) return null;
@@ -17232,14 +17285,17 @@ const _sfc_main$E = {
17232
17285
  if (x1 < xlim_min && x22 < xlim_min || x1 > xlim_max && x22 > xlim_max || y1 < ylim_min && y22 < ylim_min || y1 > ylim_max && y22 > ylim_max) return null;
17233
17286
  let radian = Math.atan2(y22 - y1, x22 - x1);
17234
17287
  let vbind = {
17235
- fill: color2,
17288
+ color: color2 || null,
17289
+ fill: color2 || null,
17290
+ "fill-opacity": alpha2 == 1 ? null : alpha2,
17236
17291
  "font-size": size * 4,
17237
- stroke,
17292
+ stroke: stroke || null,
17238
17293
  "stroke-width": linewidth,
17239
17294
  "stroke-dasharray": parseLinetype(linetype).join(" ") || null,
17240
- "fill-opacity": alpha2,
17241
- "stroke-opacity": alpha2,
17242
- "font-family": fontFamily
17295
+ "stroke-opacity": alpha2 == 1 ? null : alpha2,
17296
+ "font-family": fontFamily,
17297
+ class: className,
17298
+ style
17243
17299
  };
17244
17300
  let von = Object.fromEntries(
17245
17301
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17354,7 +17410,7 @@ const _sfc_main$E = {
17354
17410
  return (_ctx, _cache) => {
17355
17411
  return openBlock(), createElementBlock("g", null, [
17356
17412
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17357
- return openBlock(), createElementBlock("g", null, [
17413
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17358
17414
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von, textFragments, title]) => {
17359
17415
  return openBlock(), createElementBlock("text", mergeProps({ ref_for: true }, vbind, toHandlers(von, true)), [
17360
17416
  createElementVNode("title", null, toDisplayString(title), 1),
@@ -17364,7 +17420,7 @@ const _sfc_main$E = {
17364
17420
  }), 256))
17365
17421
  ], 16);
17366
17422
  }), 256))
17367
- ]);
17423
+ ], 16);
17368
17424
  }), 256))
17369
17425
  ]);
17370
17426
  };
@@ -17378,7 +17434,9 @@ const _sfc_main$D = {
17378
17434
  data: Object,
17379
17435
  coord2pos: Function,
17380
17436
  getCoord: Function,
17381
- layout: Object
17437
+ layout: Object,
17438
+ groupClass: null,
17439
+ groupStyle: null
17382
17440
  },
17383
17441
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17384
17442
  setup(__props, { emit: __emit }) {
@@ -17400,6 +17458,8 @@ const _sfc_main$D = {
17400
17458
  "translate-x": translateX = 0,
17401
17459
  "translate-y": translateY = 0,
17402
17460
  angle: angle2,
17461
+ class: className,
17462
+ style,
17403
17463
  $raw
17404
17464
  }) => {
17405
17465
  const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
@@ -17417,7 +17477,9 @@ const _sfc_main$D = {
17417
17477
  title,
17418
17478
  angle: angle2,
17419
17479
  translateX,
17420
- translateY
17480
+ translateY,
17481
+ class: className,
17482
+ style
17421
17483
  };
17422
17484
  let von = Object.fromEntries(
17423
17485
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17428,11 +17490,11 @@ const _sfc_main$D = {
17428
17490
  return (_ctx, _cache) => {
17429
17491
  return openBlock(), createElementBlock("g", null, [
17430
17492
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17431
- return openBlock(), createElementBlock("g", null, [
17493
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17432
17494
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17433
17495
  return openBlock(), createBlock(_sfc_main$N, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17434
17496
  }), 256))
17435
- ]);
17497
+ ], 16);
17436
17498
  }), 256))
17437
17499
  ]);
17438
17500
  };
@@ -17456,6 +17518,7 @@ const _sfc_main$C = {
17456
17518
  const binds = computed(() => {
17457
17519
  return {
17458
17520
  points: __props.points.map((p) => `${p.x},${p.y}`).join(" "),
17521
+ color: __props.color || null,
17459
17522
  fill: __props.fill || null,
17460
17523
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
17461
17524
  stroke: __props.color || null,
@@ -17480,7 +17543,9 @@ const _sfc_main$B = {
17480
17543
  data: Object,
17481
17544
  coord2pos: Function,
17482
17545
  getCoord: Function,
17483
- layout: Object
17546
+ layout: Object,
17547
+ groupClass: null,
17548
+ groupStyle: null
17484
17549
  },
17485
17550
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17486
17551
  setup(__props, { emit: __emit }) {
@@ -17498,6 +17563,8 @@ const _sfc_main$B = {
17498
17563
  title,
17499
17564
  "translate-x": translateX = 0,
17500
17565
  "translate-y": translateY = 0,
17566
+ class: className,
17567
+ style,
17501
17568
  $raw
17502
17569
  }) => {
17503
17570
  points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p)));
@@ -17511,7 +17578,9 @@ const _sfc_main$B = {
17511
17578
  alpha: alpha2,
17512
17579
  title,
17513
17580
  translateX,
17514
- translateY
17581
+ translateY,
17582
+ class: className,
17583
+ style
17515
17584
  };
17516
17585
  let von = Object.fromEntries(
17517
17586
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17522,11 +17591,11 @@ const _sfc_main$B = {
17522
17591
  return (_ctx, _cache) => {
17523
17592
  return openBlock(), createElementBlock("g", null, [
17524
17593
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17525
- return openBlock(), createElementBlock("g", null, [
17594
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17526
17595
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17527
17596
  return openBlock(), createBlock(_sfc_main$C, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17528
17597
  }), 256))
17529
- ]);
17598
+ ], 16);
17530
17599
  }), 256))
17531
17600
  ]);
17532
17601
  };
@@ -17540,7 +17609,9 @@ const _sfc_main$A = {
17540
17609
  data: Object,
17541
17610
  coord2pos: Function,
17542
17611
  getCoord: Function,
17543
- layout: Object
17612
+ layout: Object,
17613
+ groupClass: null,
17614
+ groupStyle: null
17544
17615
  },
17545
17616
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17546
17617
  setup(__props, { emit: __emit }) {
@@ -17561,6 +17632,8 @@ const _sfc_main$A = {
17561
17632
  title,
17562
17633
  "translate-x": translateX = 0,
17563
17634
  "translate-y": translateY = 0,
17635
+ class: className,
17636
+ style,
17564
17637
  $raw
17565
17638
  }) => {
17566
17639
  const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
@@ -17577,7 +17650,9 @@ const _sfc_main$A = {
17577
17650
  alpha: alpha2,
17578
17651
  title,
17579
17652
  translateX,
17580
- translateY
17653
+ translateY,
17654
+ class: className,
17655
+ style
17581
17656
  };
17582
17657
  let von = Object.fromEntries(
17583
17658
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17588,11 +17663,11 @@ const _sfc_main$A = {
17588
17663
  return (_ctx, _cache) => {
17589
17664
  return openBlock(), createElementBlock("g", null, [
17590
17665
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17591
- return openBlock(), createElementBlock("g", null, [
17666
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17592
17667
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17593
17668
  return openBlock(), createBlock(_sfc_main$O, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17594
17669
  }), 256))
17595
- ]);
17670
+ ], 16);
17596
17671
  }), 256))
17597
17672
  ]);
17598
17673
  };
@@ -17606,7 +17681,9 @@ const _sfc_main$z = {
17606
17681
  data: Object,
17607
17682
  coord2pos: Function,
17608
17683
  getCoord: Function,
17609
- layout: Object
17684
+ layout: Object,
17685
+ groupClass: null,
17686
+ groupStyle: null
17610
17687
  },
17611
17688
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17612
17689
  setup(__props, { emit: __emit }) {
@@ -17635,6 +17712,8 @@ const _sfc_main$z = {
17635
17712
  "text-length": textLength,
17636
17713
  "font-family": fontFamily,
17637
17714
  "text-anchor": textAnchor,
17715
+ class: className,
17716
+ style,
17638
17717
  $raw
17639
17718
  }) => {
17640
17719
  if (label == null) return null;
@@ -17659,6 +17738,8 @@ const _sfc_main$z = {
17659
17738
  angle: angle2,
17660
17739
  translateX,
17661
17740
  translateY,
17741
+ class: className,
17742
+ style,
17662
17743
  anchorX,
17663
17744
  anchorY,
17664
17745
  dockX,
@@ -17676,11 +17757,11 @@ const _sfc_main$z = {
17676
17757
  return (_ctx, _cache) => {
17677
17758
  return openBlock(), createElementBlock("g", null, [
17678
17759
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17679
- return openBlock(), createElementBlock("g", null, [
17760
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17680
17761
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von]) => {
17681
17762
  return openBlock(), createBlock(_sfc_main$13, mergeProps({ ref_for: true }, vbind, toHandlers(von)), null, 16);
17682
17763
  }), 256))
17683
- ]);
17764
+ ], 16);
17684
17765
  }), 256))
17685
17766
  ]);
17686
17767
  };
@@ -17694,7 +17775,9 @@ const _sfc_main$y = {
17694
17775
  data: Object,
17695
17776
  coord2pos: Function,
17696
17777
  getCoord: Function,
17697
- layout: Object
17778
+ layout: Object,
17779
+ groupClass: null,
17780
+ groupStyle: null
17698
17781
  },
17699
17782
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17700
17783
  setup(__props, { emit: __emit }) {
@@ -17721,6 +17804,8 @@ const _sfc_main$y = {
17721
17804
  "text-align": textAlign = "justify",
17722
17805
  angle: angle2 = "auto",
17723
17806
  inset = 0,
17807
+ class: className,
17808
+ style,
17724
17809
  $raw
17725
17810
  }) => {
17726
17811
  if (label == null) return null;
@@ -17728,14 +17813,17 @@ const _sfc_main$y = {
17728
17813
  const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
17729
17814
  if (x1 < xlim_min && x22 < xlim_min || x1 > xlim_max && x22 > xlim_max || y1 < ylim_min && y22 < ylim_min || y1 > ylim_max && y22 > ylim_max) return null;
17730
17815
  let vbind = {
17731
- fill: color2,
17816
+ color: color2 || null,
17817
+ fill: color2 || null,
17818
+ "fill-opacity": alpha2 == 1 ? null : alpha2,
17732
17819
  "font-size": size * 4,
17733
- stroke,
17820
+ stroke: stroke || null,
17734
17821
  "stroke-width": linewidth,
17735
17822
  "stroke-dasharray": parseLinetype(linetype).join(" ") || null,
17736
- "fill-opacity": alpha2,
17737
- "stroke-opacity": alpha2,
17738
- "font-family": fontFamily
17823
+ "stroke-opacity": alpha2 == 1 ? null : alpha2,
17824
+ "font-family": fontFamily,
17825
+ class: className,
17826
+ style
17739
17827
  };
17740
17828
  let von = Object.fromEntries(
17741
17829
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17833,7 +17921,7 @@ const _sfc_main$y = {
17833
17921
  return (_ctx, _cache) => {
17834
17922
  return openBlock(), createElementBlock("g", null, [
17835
17923
  (openBlock(true), createElementBlock(Fragment, null, renderList(binds.value, (group) => {
17836
- return openBlock(), createElementBlock("g", null, [
17924
+ return openBlock(), createElementBlock("g", mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17837
17925
  (openBlock(true), createElementBlock(Fragment, null, renderList(group, ([vbind, von, content, title]) => {
17838
17926
  return openBlock(), createElementBlock("text", mergeProps({ ref_for: true }, vbind, toHandlers(von, true)), [
17839
17927
  createElementVNode("title", null, toDisplayString(title), 1),
@@ -17850,7 +17938,7 @@ const _sfc_main$y = {
17850
17938
  }), 256))
17851
17939
  ], 16);
17852
17940
  }), 256))
17853
- ]);
17941
+ ], 16);
17854
17942
  }), 256))
17855
17943
  ]);
17856
17944
  };
@@ -19247,7 +19335,8 @@ const _sfc_main$l = {
19247
19335
  geom: "curve",
19248
19336
  stat: "curve"
19249
19337
  },
19250
- $_type: "layer"
19338
+ $_type: "layer",
19339
+ $_attrnames: ["interpolate"]
19251
19340
  };
19252
19341
  const _sfc_main$k = {
19253
19342
  $_props: {
@@ -19603,19 +19692,28 @@ const _sfc_main$1 = /* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
19603
19692
  return vlayer.value.map((layer) => {
19604
19693
  let { geom, stat, scales, data, "extend-x": extendX, "extend-y": extendY, ...etc } = { ...layer.type.$_props, ...layer.props };
19605
19694
  let argnames = layer.type.$_argnames || [];
19695
+ let attrnames = layer.type.$_attrnames || [];
19606
19696
  let aes = {}, args = {}, attrs2 = {};
19607
19697
  let vBind2 = {};
19608
19698
  for (let key in etc) {
19609
19699
  if (key == "key") continue;
19610
19700
  if (argnames.includes(key)) {
19611
19701
  args[key] = etc[key];
19702
+ } else if (attrnames.includes(key)) {
19703
+ attrs2[key] = etc[key];
19612
19704
  } else if (key.startsWith("on")) {
19613
19705
  vBind2[key] = etc[key];
19614
19706
  } else if (typeof etc[key] === "function") {
19615
- aes[key] = etc[key];
19707
+ if (["item-class", "item-style"].includes(key)) {
19708
+ aes[key.slice(5)] = etc[key];
19709
+ } else {
19710
+ aes[key] = etc[key];
19711
+ }
19616
19712
  } else {
19617
- if (["class", "style", "render"].includes(key)) {
19713
+ if (["class", "style", "group-class", "group-style", "render"].includes(key)) {
19618
19714
  vBind2[key] = etc[key];
19715
+ } else if (["item-class", "item-style"].includes(key)) {
19716
+ attrs2[key.slice(5)] = etc[key];
19619
19717
  } else {
19620
19718
  attrs2[key] = etc[key];
19621
19719
  }