vvplot 0.4.0 → 0.4.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.
@@ -2072,7 +2072,7 @@ var VVPlot = (function(exports, vue) {
2072
2072
  plot: {
2073
2073
  margin: 20,
2074
2074
  padding_h: 50,
2075
- padding_v: 20
2075
+ padding_v: 30
2076
2076
  },
2077
2077
  legend: {
2078
2078
  spacing: 4
@@ -6269,7 +6269,7 @@ var VVPlot = (function(exports, vue) {
6269
6269
  return Object.assign(fn, { title, limits, oob: oob2 }, etc);
6270
6270
  }
6271
6271
  function shape_scale_discrete({ title, ...etc } = {}) {
6272
- let shapes = ["circle", "square", "triangle", "diamond", "plus"];
6272
+ let shapes = ["circle", "square", "triangle", "diamond", "plus", "cross"];
6273
6273
  let fn = function(arr) {
6274
6274
  return arr.map((v) => shapes[+v]);
6275
6275
  };
@@ -6611,7 +6611,7 @@ var VVPlot = (function(exports, vue) {
6611
6611
  return Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, expr(k, v)]));
6612
6612
  }
6613
6613
  function is_categorical(v) {
6614
- return typeof v === "string" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "object" && typeof v.valueOf() !== "number" && typeof v.valueOf() !== "bigint";
6614
+ return typeof v === "string" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "object" && v !== null && typeof v.valueOf() !== "number" && typeof v.valueOf() !== "bigint";
6615
6615
  }
6616
6616
  class GLayer {
6617
6617
  /**
@@ -7097,6 +7097,7 @@ var VVPlot = (function(exports, vue) {
7097
7097
  return {
7098
7098
  x: __props.x,
7099
7099
  y: __props.y,
7100
+ color: __props.color || null,
7100
7101
  fill: __props.color || null,
7101
7102
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
7102
7103
  stroke: __props.stroke || null,
@@ -14348,6 +14349,7 @@ var VVPlot = (function(exports, vue) {
14348
14349
  return {
14349
14350
  x: __props.x,
14350
14351
  y: __props.y,
14352
+ color: __props.color || null,
14351
14353
  fill: __props.color || null,
14352
14354
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
14353
14355
  stroke: __props.stroke || null,
@@ -14548,7 +14550,7 @@ var VVPlot = (function(exports, vue) {
14548
14550
  return result.filter((t) => t.stroke != null).sort((a, b) => a.x1 - b.x1);
14549
14551
  });
14550
14552
  const tickTexts = vue.computed(() => {
14551
- let isTop = __props.theme.tick_position == "top";
14553
+ let isTop = (__props.theme.label_position ?? __props.theme.tick_position) == "top";
14552
14554
  let result = [];
14553
14555
  for (let tick of __props.ticks) {
14554
14556
  if (typeof tick == "number") tick = { position: tick, label: tick };
@@ -14556,14 +14558,14 @@ var VVPlot = (function(exports, vue) {
14556
14558
  let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
14557
14559
  let position = pos + __props.layout.l;
14558
14560
  if (position + tsl < 0 || position + tsl > width.value) continue;
14559
- let offset = (isTop ? -1 : 1) * (tick.length ?? __props.theme.tick_length);
14561
+ let offset = (isTop ? -1 : 1) * (__props.theme.label_offset ?? tick.length ?? __props.theme.tick_length);
14560
14562
  let anchorX, anchorY, dockX, dockY;
14561
- if (__props.theme.tick_anchor_x != null || __props.theme.tick_anchor_y != null) {
14562
- anchorX = __props.theme.tick_anchor_x ?? 0.5;
14563
- anchorY = __props.theme.tick_anchor_y ?? (isTop ? 0 : 1);
14563
+ if (__props.theme.label_anchor_x != null || __props.theme.label_anchor_y != null) {
14564
+ anchorX = __props.theme.label_anchor_x ?? 0.5;
14565
+ anchorY = __props.theme.label_anchor_y ?? (isTop ? 0 : 1);
14564
14566
  } else {
14565
- dockX = __props.theme.tick_dock_x ?? 0.5;
14566
- dockY = __props.theme.tick_dock_y ?? (isTop ? 0 : 1);
14567
+ dockX = __props.theme.label_dock_x ?? 0.5;
14568
+ dockY = __props.theme.label_dock_y ?? (isTop ? 0 : 1);
14567
14569
  }
14568
14570
  result.push({
14569
14571
  wrapper: {
@@ -14574,7 +14576,7 @@ var VVPlot = (function(exports, vue) {
14574
14576
  text: {
14575
14577
  x: position,
14576
14578
  y: offset,
14577
- angle: __props.theme.text_angle,
14579
+ angle: __props.theme.label_angle,
14578
14580
  anchorX,
14579
14581
  anchorY,
14580
14582
  dockX,
@@ -14975,7 +14977,7 @@ var VVPlot = (function(exports, vue) {
14975
14977
  return result.filter((t) => t.stroke != null).sort((a, b) => a.y1 - b.y1);
14976
14978
  });
14977
14979
  const tickTexts = vue.computed(() => {
14978
- let isRight = __props.theme.tick_position == "right";
14980
+ let isRight = (__props.theme.label_position ?? __props.theme.tick_position) == "right";
14979
14981
  let result = [];
14980
14982
  for (let tick of __props.ticks) {
14981
14983
  if (typeof tick == "number") tick = { position: tick };
@@ -14983,14 +14985,14 @@ var VVPlot = (function(exports, vue) {
14983
14985
  let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
14984
14986
  let position = pos + __props.layout.t;
14985
14987
  if (position + tsl < 0 || position + tsl > height.value) continue;
14986
- let offset = (isRight ? 1 : -1) * ((tick.length ?? __props.theme.tick_length) + 3);
14988
+ let offset = (isRight ? 1 : -1) * ((__props.theme.label_offset ?? tick.length ?? __props.theme.tick_length) + 3);
14987
14989
  let anchorX, anchorY, dockX, dockY;
14988
- if (__props.theme.tick_anchor_x != null || __props.theme.tick_anchor_y != null) {
14989
- anchorX = __props.theme.tick_anchor_x ?? (isRight ? 0 : 1);
14990
- anchorY = __props.theme.tick_anchor_y ?? 0.5;
14990
+ if (__props.theme.label_anchor_x != null || __props.theme.label_anchor_y != null) {
14991
+ anchorX = __props.theme.label_anchor_x ?? (isRight ? 0 : 1);
14992
+ anchorY = __props.theme.label_anchor_y ?? 0.5;
14991
14993
  } else {
14992
- dockX = __props.theme.tick_dock_x ?? (isRight ? 0 : 1);
14993
- dockY = __props.theme.tick_dock_y ?? 0.5;
14994
+ dockX = __props.theme.label_dock_x ?? (isRight ? 0 : 1);
14995
+ dockY = __props.theme.label_dock_y ?? 0.5;
14994
14996
  }
14995
14997
  result.push({
14996
14998
  wrapper: {
@@ -15001,7 +15003,7 @@ var VVPlot = (function(exports, vue) {
15001
15003
  text: {
15002
15004
  y: position,
15003
15005
  x: offset,
15004
- angle: __props.theme.text_angle,
15006
+ angle: __props.theme.label_angle,
15005
15007
  anchorX,
15006
15008
  anchorY,
15007
15009
  dockX,
@@ -15643,7 +15645,7 @@ var VVPlot = (function(exports, vue) {
15643
15645
  points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p))).filter((p) => p.x != null && p.y != null);
15644
15646
  if (points.length === 0) continue;
15645
15647
  const path2d = new Path2D();
15646
- let interpolatorFn = interpolators[interpolate2] ?? natural$1;
15648
+ let interpolatorFn = typeof interpolate2 == "function" ? interpolate2 : interpolators[interpolate2] ?? natural$1;
15647
15649
  let interpolator = interpolatorFn(path2d);
15648
15650
  interpolator.lineStart();
15649
15651
  for (let i = 0; i < points.length; i++) {
@@ -16533,6 +16535,7 @@ var VVPlot = (function(exports, vue) {
16533
16535
  y: __props.y - __props.height / 2,
16534
16536
  width: __props.width,
16535
16537
  height: __props.height,
16538
+ color: __props.color || null,
16536
16539
  fill: __props.fill || null,
16537
16540
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16538
16541
  stroke: __props.color || null,
@@ -16570,6 +16573,7 @@ var VVPlot = (function(exports, vue) {
16570
16573
  },
16571
16574
  setup(__props) {
16572
16575
  const paths = {
16576
+ circle: "M0-0.5A0.5,0.5,0,1,1,0,0.5A0.5,0.5,0,1,1,0-0.5Z",
16573
16577
  square: "M-0.5-0.5H0.5V0.5H-0.5Z",
16574
16578
  triangle: "M0-0.667L0.577,0.333L-0.577,0.333Z",
16575
16579
  diamond: "M0-0.707L0.707,0L0,0.707L-0.707,0Z",
@@ -16579,6 +16583,7 @@ var VVPlot = (function(exports, vue) {
16579
16583
  const binds = vue.computed(() => {
16580
16584
  let d = __props.shape?.startsWith?.("path:") ? __props.shape?.slice?.(5) : paths[__props.shape];
16581
16585
  let result = {
16586
+ color: __props.color || null,
16582
16587
  fill: __props.color || null,
16583
16588
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16584
16589
  stroke: __props.stroke || null,
@@ -16631,6 +16636,7 @@ var VVPlot = (function(exports, vue) {
16631
16636
  x2: __props.x2,
16632
16637
  y1: __props.y1,
16633
16638
  y2: __props.y2,
16639
+ color: __props.color || null,
16634
16640
  stroke: __props.color || null,
16635
16641
  "stroke-width": __props.linewidth,
16636
16642
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
@@ -16653,7 +16659,9 @@ var VVPlot = (function(exports, vue) {
16653
16659
  data: Object,
16654
16660
  coord2pos: Function,
16655
16661
  getCoord: Function,
16656
- layout: Object
16662
+ layout: Object,
16663
+ groupClass: null,
16664
+ groupStyle: null
16657
16665
  },
16658
16666
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16659
16667
  setup(__props, { emit: __emit }) {
@@ -16686,6 +16694,8 @@ var VVPlot = (function(exports, vue) {
16686
16694
  title,
16687
16695
  "translate-x": translateX = 0,
16688
16696
  "translate-y": translateY = 0,
16697
+ class: className,
16698
+ style,
16689
16699
  $raw
16690
16700
  }) => {
16691
16701
  const { hmin: x1, hmax: x22, vmin: y1, vmax: y22 } = __props.coord2pos({ xmin: $xmin, xmax: $xmax, ymin: $ymin, ymax: $ymax });
@@ -16712,7 +16722,9 @@ var VVPlot = (function(exports, vue) {
16712
16722
  alpha: alpha2,
16713
16723
  title,
16714
16724
  translateX,
16715
- translateY
16725
+ translateY,
16726
+ class: className,
16727
+ style
16716
16728
  },
16717
16729
  line: {
16718
16730
  x1: lx1,
@@ -16724,7 +16736,9 @@ var VVPlot = (function(exports, vue) {
16724
16736
  linewidth,
16725
16737
  alpha: alpha2,
16726
16738
  translateX,
16727
- translateY
16739
+ translateY,
16740
+ class: className,
16741
+ style
16728
16742
  },
16729
16743
  midline: {
16730
16744
  x1: mx1,
@@ -16736,7 +16750,9 @@ var VVPlot = (function(exports, vue) {
16736
16750
  linewidth: (linewidth ?? 1) * 2,
16737
16751
  alpha: alpha2,
16738
16752
  translateX,
16739
- translateY
16753
+ translateY,
16754
+ class: className,
16755
+ style
16740
16756
  },
16741
16757
  uwisker: {
16742
16758
  x1: uwx1,
@@ -16748,7 +16764,9 @@ var VVPlot = (function(exports, vue) {
16748
16764
  linewidth,
16749
16765
  alpha: alpha2,
16750
16766
  translateX,
16751
- translateY
16767
+ translateY,
16768
+ class: className,
16769
+ style
16752
16770
  },
16753
16771
  lwisker: {
16754
16772
  x1: lwx1,
@@ -16760,7 +16778,9 @@ var VVPlot = (function(exports, vue) {
16760
16778
  linewidth,
16761
16779
  alpha: alpha2,
16762
16780
  translateX,
16763
- translateY
16781
+ translateY,
16782
+ class: className,
16783
+ style
16764
16784
  },
16765
16785
  outliers: outliers?.map(({ x: x3, y: y3, $raw: $raw2 }) => {
16766
16786
  const { h: cx, v: cy } = __props.coord2pos({ x: x3, y: y3 });
@@ -16772,7 +16792,9 @@ var VVPlot = (function(exports, vue) {
16772
16792
  color: color2,
16773
16793
  alpha: alpha2,
16774
16794
  translateX,
16775
- translateY
16795
+ translateY,
16796
+ class: className,
16797
+ style
16776
16798
  };
16777
16799
  let von2 = Object.fromEntries(
16778
16800
  events.map((evt) => [evt, (e) => emit(evt, e, $raw2)])
@@ -16789,7 +16811,7 @@ var VVPlot = (function(exports, vue) {
16789
16811
  return (_ctx, _cache) => {
16790
16812
  return vue.openBlock(), vue.createElementBlock("g", null, [
16791
16813
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
16792
- return vue.openBlock(), vue.createElementBlock("g", null, [
16814
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
16793
16815
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbinds, von]) => {
16794
16816
  return vue.openBlock(), vue.createElementBlock("g", null, [
16795
16817
  vue.createVNode(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbinds.line), null, 16),
@@ -16807,7 +16829,7 @@ var VVPlot = (function(exports, vue) {
16807
16829
  }), 256))
16808
16830
  ]);
16809
16831
  }), 256))
16810
- ]);
16832
+ ], 16);
16811
16833
  }), 256))
16812
16834
  ]);
16813
16835
  };
@@ -16831,10 +16853,12 @@ var VVPlot = (function(exports, vue) {
16831
16853
  },
16832
16854
  setup(__props) {
16833
16855
  const binds = vue.computed(() => {
16834
- let interpolatorFn = interpolators[__props.interpolate] ?? natural$1;
16856
+ let interpolatorFn = typeof __props.interpolate == "function" ? __props.interpolate : interpolators[__props.interpolate] ?? natural$1;
16835
16857
  return {
16836
16858
  d: line().curve(interpolatorFn)(__props.points.map((p) => [p.x, p.y])),
16859
+ color: __props.color || null,
16837
16860
  fill: __props.fill || null,
16861
+ "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16838
16862
  stroke: __props.color || null,
16839
16863
  "stroke-width": __props.linewidth,
16840
16864
  "stroke-opacity": __props.alpha == 1 ? null : __props.alpha,
@@ -16863,7 +16887,9 @@ var VVPlot = (function(exports, vue) {
16863
16887
  data: Object,
16864
16888
  coord2pos: Function,
16865
16889
  getCoord: Function,
16866
- layout: Object
16890
+ layout: Object,
16891
+ groupClass: null,
16892
+ groupStyle: null
16867
16893
  },
16868
16894
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16869
16895
  setup(__props, { emit: __emit }) {
@@ -16881,6 +16907,8 @@ var VVPlot = (function(exports, vue) {
16881
16907
  title,
16882
16908
  "translate-x": translateX = 0,
16883
16909
  "translate-y": translateY = 0,
16910
+ class: className,
16911
+ style,
16884
16912
  $raw,
16885
16913
  interpolate: interpolate2
16886
16914
  }) => {
@@ -16896,6 +16924,8 @@ var VVPlot = (function(exports, vue) {
16896
16924
  title,
16897
16925
  translateX,
16898
16926
  translateY,
16927
+ class: className,
16928
+ style,
16899
16929
  interpolate: interpolate2
16900
16930
  };
16901
16931
  let von = Object.fromEntries(
@@ -16907,11 +16937,11 @@ var VVPlot = (function(exports, vue) {
16907
16937
  return (_ctx, _cache) => {
16908
16938
  return vue.openBlock(), vue.createElementBlock("g", null, [
16909
16939
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
16910
- return vue.openBlock(), vue.createElementBlock("g", null, [
16940
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
16911
16941
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
16912
16942
  return vue.openBlock(), vue.createBlock(_sfc_main$K, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
16913
16943
  }), 256))
16914
- ]);
16944
+ ], 16);
16915
16945
  }), 256))
16916
16946
  ]);
16917
16947
  };
@@ -16945,6 +16975,7 @@ var VVPlot = (function(exports, vue) {
16945
16975
  cy: __props.cy,
16946
16976
  rx: __props.rx,
16947
16977
  ry: __props.ry,
16978
+ color: __props.color || null,
16948
16979
  fill: __props.fill || null,
16949
16980
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
16950
16981
  stroke: __props.color || null,
@@ -16970,7 +17001,9 @@ var VVPlot = (function(exports, vue) {
16970
17001
  data: Object,
16971
17002
  coord2pos: Function,
16972
17003
  getCoord: Function,
16973
- layout: Object
17004
+ layout: Object,
17005
+ groupClass: null,
17006
+ groupStyle: null
16974
17007
  },
16975
17008
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
16976
17009
  setup(__props, { emit: __emit }) {
@@ -16992,6 +17025,8 @@ var VVPlot = (function(exports, vue) {
16992
17025
  title,
16993
17026
  "translate-x": translateX = 0,
16994
17027
  "translate-y": translateY = 0,
17028
+ class: className,
17029
+ style,
16995
17030
  $raw
16996
17031
  }) => {
16997
17032
  let dx = Math.sqrt(C / (A * C - B * B)), dy = Math.sqrt(A / (A * C - B * B));
@@ -17017,7 +17052,9 @@ var VVPlot = (function(exports, vue) {
17017
17052
  alpha: alpha2,
17018
17053
  title,
17019
17054
  translateX,
17020
- translateY
17055
+ translateY,
17056
+ class: className,
17057
+ style
17021
17058
  };
17022
17059
  let von = Object.fromEntries(
17023
17060
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17028,11 +17065,11 @@ var VVPlot = (function(exports, vue) {
17028
17065
  return (_ctx, _cache) => {
17029
17066
  return vue.openBlock(), vue.createElementBlock("g", null, [
17030
17067
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17031
- return vue.openBlock(), vue.createElementBlock("g", null, [
17068
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17032
17069
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17033
17070
  return vue.openBlock(), vue.createBlock(_sfc_main$I, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17034
17071
  }), 256))
17035
- ]);
17072
+ ], 16);
17036
17073
  }), 256))
17037
17074
  ]);
17038
17075
  };
@@ -17046,7 +17083,9 @@ var VVPlot = (function(exports, vue) {
17046
17083
  data: Object,
17047
17084
  coord2pos: Function,
17048
17085
  getCoord: Function,
17049
- layout: Object
17086
+ layout: Object,
17087
+ groupClass: null,
17088
+ groupStyle: null
17050
17089
  },
17051
17090
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17052
17091
  setup(__props, { emit: __emit }) {
@@ -17066,6 +17105,8 @@ var VVPlot = (function(exports, vue) {
17066
17105
  title,
17067
17106
  "translate-x": translateX = 0,
17068
17107
  "translate-y": translateY = 0,
17108
+ class: className,
17109
+ style,
17069
17110
  $raw
17070
17111
  }) => {
17071
17112
  const { h: x1, v: y1 } = __props.coord2pos({ x: x2, y: y2 });
@@ -17082,7 +17123,9 @@ var VVPlot = (function(exports, vue) {
17082
17123
  alpha: alpha2,
17083
17124
  title,
17084
17125
  translateX,
17085
- translateY
17126
+ translateY,
17127
+ class: className,
17128
+ style
17086
17129
  };
17087
17130
  let von = Object.fromEntries(
17088
17131
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17093,11 +17136,11 @@ var VVPlot = (function(exports, vue) {
17093
17136
  return (_ctx, _cache) => {
17094
17137
  return vue.openBlock(), vue.createElementBlock("g", null, [
17095
17138
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17096
- return vue.openBlock(), vue.createElementBlock("g", null, [
17139
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17097
17140
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17098
17141
  return vue.openBlock(), vue.createBlock(_sfc_main$M, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17099
17142
  }), 256))
17100
- ]);
17143
+ ], 16);
17101
17144
  }), 256))
17102
17145
  ]);
17103
17146
  };
@@ -17111,7 +17154,9 @@ var VVPlot = (function(exports, vue) {
17111
17154
  data: Object,
17112
17155
  coord2pos: Function,
17113
17156
  getCoord: Function,
17114
- layout: Object
17157
+ layout: Object,
17158
+ groupClass: null,
17159
+ groupStyle: null
17115
17160
  },
17116
17161
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17117
17162
  setup(__props, { emit: __emit }) {
@@ -17140,6 +17185,8 @@ var VVPlot = (function(exports, vue) {
17140
17185
  "text-length": textLength,
17141
17186
  "font-family": fontFamily = "sans-serif",
17142
17187
  "text-anchor": textAnchor,
17188
+ class: className,
17189
+ style,
17143
17190
  $raw
17144
17191
  }) => {
17145
17192
  if (label == null) return null;
@@ -17164,6 +17211,8 @@ var VVPlot = (function(exports, vue) {
17164
17211
  angle: angle2,
17165
17212
  translateX,
17166
17213
  translateY,
17214
+ class: className,
17215
+ style,
17167
17216
  anchorX,
17168
17217
  anchorY,
17169
17218
  dockX,
@@ -17181,11 +17230,11 @@ var VVPlot = (function(exports, vue) {
17181
17230
  return (_ctx, _cache) => {
17182
17231
  return vue.openBlock(), vue.createElementBlock("g", null, [
17183
17232
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17184
- return vue.openBlock(), vue.createElementBlock("g", null, [
17233
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17185
17234
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17186
17235
  return vue.openBlock(), vue.createBlock(_sfc_main$12, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17187
17236
  }), 256))
17188
- ]);
17237
+ ], 16);
17189
17238
  }), 256))
17190
17239
  ]);
17191
17240
  };
@@ -17199,7 +17248,9 @@ var VVPlot = (function(exports, vue) {
17199
17248
  data: Object,
17200
17249
  coord2pos: Function,
17201
17250
  getCoord: Function,
17202
- layout: Object
17251
+ layout: Object,
17252
+ groupClass: null,
17253
+ groupStyle: null
17203
17254
  },
17204
17255
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17205
17256
  setup(__props, { emit: __emit }) {
@@ -17225,6 +17276,8 @@ var VVPlot = (function(exports, vue) {
17225
17276
  "font-family": fontFamily = "sans-serif",
17226
17277
  "text-align": textAlign = "start",
17227
17278
  inset = 0,
17279
+ class: className,
17280
+ style,
17228
17281
  $raw
17229
17282
  }) => {
17230
17283
  if (label == null) return null;
@@ -17233,14 +17286,17 @@ var VVPlot = (function(exports, vue) {
17233
17286
  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;
17234
17287
  let radian = Math.atan2(y22 - y1, x22 - x1);
17235
17288
  let vbind = {
17236
- fill: color2,
17289
+ color: color2 || null,
17290
+ fill: color2 || null,
17291
+ "fill-opacity": alpha2 == 1 ? null : alpha2,
17237
17292
  "font-size": size * 4,
17238
- stroke,
17293
+ stroke: stroke || null,
17239
17294
  "stroke-width": linewidth,
17240
17295
  "stroke-dasharray": parseLinetype(linetype).join(" ") || null,
17241
- "fill-opacity": alpha2,
17242
- "stroke-opacity": alpha2,
17243
- "font-family": fontFamily
17296
+ "stroke-opacity": alpha2 == 1 ? null : alpha2,
17297
+ "font-family": fontFamily,
17298
+ class: className,
17299
+ style
17244
17300
  };
17245
17301
  let von = Object.fromEntries(
17246
17302
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17355,7 +17411,7 @@ var VVPlot = (function(exports, vue) {
17355
17411
  return (_ctx, _cache) => {
17356
17412
  return vue.openBlock(), vue.createElementBlock("g", null, [
17357
17413
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17358
- return vue.openBlock(), vue.createElementBlock("g", null, [
17414
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17359
17415
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von, textFragments, title]) => {
17360
17416
  return vue.openBlock(), vue.createElementBlock("text", vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von, true)), [
17361
17417
  vue.createElementVNode("title", null, vue.toDisplayString(title), 1),
@@ -17365,7 +17421,7 @@ var VVPlot = (function(exports, vue) {
17365
17421
  }), 256))
17366
17422
  ], 16);
17367
17423
  }), 256))
17368
- ]);
17424
+ ], 16);
17369
17425
  }), 256))
17370
17426
  ]);
17371
17427
  };
@@ -17379,7 +17435,9 @@ var VVPlot = (function(exports, vue) {
17379
17435
  data: Object,
17380
17436
  coord2pos: Function,
17381
17437
  getCoord: Function,
17382
- layout: Object
17438
+ layout: Object,
17439
+ groupClass: null,
17440
+ groupStyle: null
17383
17441
  },
17384
17442
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17385
17443
  setup(__props, { emit: __emit }) {
@@ -17401,6 +17459,8 @@ var VVPlot = (function(exports, vue) {
17401
17459
  "translate-x": translateX = 0,
17402
17460
  "translate-y": translateY = 0,
17403
17461
  angle: angle2,
17462
+ class: className,
17463
+ style,
17404
17464
  $raw
17405
17465
  }) => {
17406
17466
  const { h: cx, v: cy } = __props.coord2pos({ x: x2, y: y2 });
@@ -17418,7 +17478,9 @@ var VVPlot = (function(exports, vue) {
17418
17478
  title,
17419
17479
  angle: angle2,
17420
17480
  translateX,
17421
- translateY
17481
+ translateY,
17482
+ class: className,
17483
+ style
17422
17484
  };
17423
17485
  let von = Object.fromEntries(
17424
17486
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17429,11 +17491,11 @@ var VVPlot = (function(exports, vue) {
17429
17491
  return (_ctx, _cache) => {
17430
17492
  return vue.openBlock(), vue.createElementBlock("g", null, [
17431
17493
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17432
- return vue.openBlock(), vue.createElementBlock("g", null, [
17494
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17433
17495
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17434
17496
  return vue.openBlock(), vue.createBlock(_sfc_main$N, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17435
17497
  }), 256))
17436
- ]);
17498
+ ], 16);
17437
17499
  }), 256))
17438
17500
  ]);
17439
17501
  };
@@ -17457,6 +17519,7 @@ var VVPlot = (function(exports, vue) {
17457
17519
  const binds = vue.computed(() => {
17458
17520
  return {
17459
17521
  points: __props.points.map((p) => `${p.x},${p.y}`).join(" "),
17522
+ color: __props.color || null,
17460
17523
  fill: __props.fill || null,
17461
17524
  "fill-opacity": __props.alpha == 1 ? null : __props.alpha,
17462
17525
  stroke: __props.color || null,
@@ -17481,7 +17544,9 @@ var VVPlot = (function(exports, vue) {
17481
17544
  data: Object,
17482
17545
  coord2pos: Function,
17483
17546
  getCoord: Function,
17484
- layout: Object
17547
+ layout: Object,
17548
+ groupClass: null,
17549
+ groupStyle: null
17485
17550
  },
17486
17551
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17487
17552
  setup(__props, { emit: __emit }) {
@@ -17499,6 +17564,8 @@ var VVPlot = (function(exports, vue) {
17499
17564
  title,
17500
17565
  "translate-x": translateX = 0,
17501
17566
  "translate-y": translateY = 0,
17567
+ class: className,
17568
+ style,
17502
17569
  $raw
17503
17570
  }) => {
17504
17571
  points = points.map((p) => (({ h: x2, v: y2 }) => ({ x: x2, y: y2 }))(__props.coord2pos(p)));
@@ -17512,7 +17579,9 @@ var VVPlot = (function(exports, vue) {
17512
17579
  alpha: alpha2,
17513
17580
  title,
17514
17581
  translateX,
17515
- translateY
17582
+ translateY,
17583
+ class: className,
17584
+ style
17516
17585
  };
17517
17586
  let von = Object.fromEntries(
17518
17587
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17523,11 +17592,11 @@ var VVPlot = (function(exports, vue) {
17523
17592
  return (_ctx, _cache) => {
17524
17593
  return vue.openBlock(), vue.createElementBlock("g", null, [
17525
17594
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17526
- return vue.openBlock(), vue.createElementBlock("g", null, [
17595
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17527
17596
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17528
17597
  return vue.openBlock(), vue.createBlock(_sfc_main$C, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17529
17598
  }), 256))
17530
- ]);
17599
+ ], 16);
17531
17600
  }), 256))
17532
17601
  ]);
17533
17602
  };
@@ -17541,7 +17610,9 @@ var VVPlot = (function(exports, vue) {
17541
17610
  data: Object,
17542
17611
  coord2pos: Function,
17543
17612
  getCoord: Function,
17544
- layout: Object
17613
+ layout: Object,
17614
+ groupClass: null,
17615
+ groupStyle: null
17545
17616
  },
17546
17617
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17547
17618
  setup(__props, { emit: __emit }) {
@@ -17562,6 +17633,8 @@ var VVPlot = (function(exports, vue) {
17562
17633
  title,
17563
17634
  "translate-x": translateX = 0,
17564
17635
  "translate-y": translateY = 0,
17636
+ class: className,
17637
+ style,
17565
17638
  $raw
17566
17639
  }) => {
17567
17640
  const { hmin: x1, hmax: x2, vmin: y1, vmax: y2 } = __props.coord2pos({ xmin, xmax, ymin, ymax });
@@ -17578,7 +17651,9 @@ var VVPlot = (function(exports, vue) {
17578
17651
  alpha: alpha2,
17579
17652
  title,
17580
17653
  translateX,
17581
- translateY
17654
+ translateY,
17655
+ class: className,
17656
+ style
17582
17657
  };
17583
17658
  let von = Object.fromEntries(
17584
17659
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17589,11 +17664,11 @@ var VVPlot = (function(exports, vue) {
17589
17664
  return (_ctx, _cache) => {
17590
17665
  return vue.openBlock(), vue.createElementBlock("g", null, [
17591
17666
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17592
- return vue.openBlock(), vue.createElementBlock("g", null, [
17667
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17593
17668
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17594
17669
  return vue.openBlock(), vue.createBlock(_sfc_main$O, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17595
17670
  }), 256))
17596
- ]);
17671
+ ], 16);
17597
17672
  }), 256))
17598
17673
  ]);
17599
17674
  };
@@ -17607,7 +17682,9 @@ var VVPlot = (function(exports, vue) {
17607
17682
  data: Object,
17608
17683
  coord2pos: Function,
17609
17684
  getCoord: Function,
17610
- layout: Object
17685
+ layout: Object,
17686
+ groupClass: null,
17687
+ groupStyle: null
17611
17688
  },
17612
17689
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17613
17690
  setup(__props, { emit: __emit }) {
@@ -17636,6 +17713,8 @@ var VVPlot = (function(exports, vue) {
17636
17713
  "text-length": textLength,
17637
17714
  "font-family": fontFamily,
17638
17715
  "text-anchor": textAnchor,
17716
+ class: className,
17717
+ style,
17639
17718
  $raw
17640
17719
  }) => {
17641
17720
  if (label == null) return null;
@@ -17660,6 +17739,8 @@ var VVPlot = (function(exports, vue) {
17660
17739
  angle: angle2,
17661
17740
  translateX,
17662
17741
  translateY,
17742
+ class: className,
17743
+ style,
17663
17744
  anchorX,
17664
17745
  anchorY,
17665
17746
  dockX,
@@ -17677,11 +17758,11 @@ var VVPlot = (function(exports, vue) {
17677
17758
  return (_ctx, _cache) => {
17678
17759
  return vue.openBlock(), vue.createElementBlock("g", null, [
17679
17760
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17680
- return vue.openBlock(), vue.createElementBlock("g", null, [
17761
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17681
17762
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von]) => {
17682
17763
  return vue.openBlock(), vue.createBlock(_sfc_main$13, vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von)), null, 16);
17683
17764
  }), 256))
17684
- ]);
17765
+ ], 16);
17685
17766
  }), 256))
17686
17767
  ]);
17687
17768
  };
@@ -17695,7 +17776,9 @@ var VVPlot = (function(exports, vue) {
17695
17776
  data: Object,
17696
17777
  coord2pos: Function,
17697
17778
  getCoord: Function,
17698
- layout: Object
17779
+ layout: Object,
17780
+ groupClass: null,
17781
+ groupStyle: null
17699
17782
  },
17700
17783
  emits: ["click", "contextmenu", "singleclick", "pointerover", "pointerout", "pointerenter", "pointerleave", "pointermove", "pointerdown", "pointerup", "wheel"],
17701
17784
  setup(__props, { emit: __emit }) {
@@ -17722,6 +17805,8 @@ var VVPlot = (function(exports, vue) {
17722
17805
  "text-align": textAlign = "justify",
17723
17806
  angle: angle2 = "auto",
17724
17807
  inset = 0,
17808
+ class: className,
17809
+ style,
17725
17810
  $raw
17726
17811
  }) => {
17727
17812
  if (label == null) return null;
@@ -17729,14 +17814,17 @@ var VVPlot = (function(exports, vue) {
17729
17814
  const { h: x22, v: y22 } = __props.coord2pos({ x: xend, y: yend });
17730
17815
  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;
17731
17816
  let vbind = {
17732
- fill: color2,
17817
+ color: color2 || null,
17818
+ fill: color2 || null,
17819
+ "fill-opacity": alpha2 == 1 ? null : alpha2,
17733
17820
  "font-size": size * 4,
17734
- stroke,
17821
+ stroke: stroke || null,
17735
17822
  "stroke-width": linewidth,
17736
17823
  "stroke-dasharray": parseLinetype(linetype).join(" ") || null,
17737
- "fill-opacity": alpha2,
17738
- "stroke-opacity": alpha2,
17739
- "font-family": fontFamily
17824
+ "stroke-opacity": alpha2 == 1 ? null : alpha2,
17825
+ "font-family": fontFamily,
17826
+ class: className,
17827
+ style
17740
17828
  };
17741
17829
  let von = Object.fromEntries(
17742
17830
  events.map((evt) => [evt, (e) => emit(evt, Object.assign(e, { _vhandled: true }), __props.getCoord(e), $raw)])
@@ -17834,7 +17922,7 @@ var VVPlot = (function(exports, vue) {
17834
17922
  return (_ctx, _cache) => {
17835
17923
  return vue.openBlock(), vue.createElementBlock("g", null, [
17836
17924
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(binds.value, (group) => {
17837
- return vue.openBlock(), vue.createElementBlock("g", null, [
17925
+ return vue.openBlock(), vue.createElementBlock("g", vue.mergeProps({ ref_for: true }, { class: __props.groupClass, style: __props.groupStyle }), [
17838
17926
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group, ([vbind, von, content, title]) => {
17839
17927
  return vue.openBlock(), vue.createElementBlock("text", vue.mergeProps({ ref_for: true }, vbind, vue.toHandlers(von, true)), [
17840
17928
  vue.createElementVNode("title", null, vue.toDisplayString(title), 1),
@@ -17851,7 +17939,7 @@ var VVPlot = (function(exports, vue) {
17851
17939
  }), 256))
17852
17940
  ], 16);
17853
17941
  }), 256))
17854
- ]);
17942
+ ], 16);
17855
17943
  }), 256))
17856
17944
  ]);
17857
17945
  };
@@ -19248,7 +19336,8 @@ var VVPlot = (function(exports, vue) {
19248
19336
  geom: "curve",
19249
19337
  stat: "curve"
19250
19338
  },
19251
- $_type: "layer"
19339
+ $_type: "layer",
19340
+ $_attrnames: ["interpolate"]
19252
19341
  };
19253
19342
  const _sfc_main$k = {
19254
19343
  $_props: {
@@ -19604,19 +19693,28 @@ var VVPlot = (function(exports, vue) {
19604
19693
  return vlayer.value.map((layer) => {
19605
19694
  let { geom, stat, scales, data, "extend-x": extendX, "extend-y": extendY, ...etc } = { ...layer.type.$_props, ...layer.props };
19606
19695
  let argnames = layer.type.$_argnames || [];
19696
+ let attrnames = layer.type.$_attrnames || [];
19607
19697
  let aes = {}, args = {}, attrs2 = {};
19608
19698
  let vBind2 = {};
19609
19699
  for (let key in etc) {
19610
19700
  if (key == "key") continue;
19611
19701
  if (argnames.includes(key)) {
19612
19702
  args[key] = etc[key];
19703
+ } else if (attrnames.includes(key)) {
19704
+ attrs2[key] = etc[key];
19613
19705
  } else if (key.startsWith("on")) {
19614
19706
  vBind2[key] = etc[key];
19615
19707
  } else if (typeof etc[key] === "function") {
19616
- aes[key] = etc[key];
19708
+ if (["item-class", "item-style"].includes(key)) {
19709
+ aes[key.slice(5)] = etc[key];
19710
+ } else {
19711
+ aes[key] = etc[key];
19712
+ }
19617
19713
  } else {
19618
- if (["class", "style", "render"].includes(key)) {
19714
+ if (["class", "style", "group-class", "group-style", "render"].includes(key)) {
19619
19715
  vBind2[key] = etc[key];
19716
+ } else if (["item-class", "item-style"].includes(key)) {
19717
+ attrs2[key.slice(5)] = etc[key];
19620
19718
  } else {
19621
19719
  attrs2[key] = etc[key];
19622
19720
  }