vvplot 0.4.1 → 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
@@ -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
  /**
@@ -14550,7 +14550,7 @@ var VVPlot = (function(exports, vue) {
14550
14550
  return result.filter((t) => t.stroke != null).sort((a, b) => a.x1 - b.x1);
14551
14551
  });
14552
14552
  const tickTexts = vue.computed(() => {
14553
- let isTop = __props.theme.tick_position == "top";
14553
+ let isTop = (__props.theme.label_position ?? __props.theme.tick_position) == "top";
14554
14554
  let result = [];
14555
14555
  for (let tick of __props.ticks) {
14556
14556
  if (typeof tick == "number") tick = { position: tick, label: tick };
@@ -14558,14 +14558,14 @@ var VVPlot = (function(exports, vue) {
14558
14558
  let tsl = pos * (__props.activeTransform.scaleH - 1) + __props.activeTransform.translateH;
14559
14559
  let position = pos + __props.layout.l;
14560
14560
  if (position + tsl < 0 || position + tsl > width.value) continue;
14561
- 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);
14562
14562
  let anchorX, anchorY, dockX, dockY;
14563
- if (__props.theme.tick_anchor_x != null || __props.theme.tick_anchor_y != null) {
14564
- anchorX = __props.theme.tick_anchor_x ?? 0.5;
14565
- 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);
14566
14566
  } else {
14567
- dockX = __props.theme.tick_dock_x ?? 0.5;
14568
- 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);
14569
14569
  }
14570
14570
  result.push({
14571
14571
  wrapper: {
@@ -14576,7 +14576,7 @@ var VVPlot = (function(exports, vue) {
14576
14576
  text: {
14577
14577
  x: position,
14578
14578
  y: offset,
14579
- angle: __props.theme.text_angle,
14579
+ angle: __props.theme.label_angle,
14580
14580
  anchorX,
14581
14581
  anchorY,
14582
14582
  dockX,
@@ -14977,7 +14977,7 @@ var VVPlot = (function(exports, vue) {
14977
14977
  return result.filter((t) => t.stroke != null).sort((a, b) => a.y1 - b.y1);
14978
14978
  });
14979
14979
  const tickTexts = vue.computed(() => {
14980
- let isRight = __props.theme.tick_position == "right";
14980
+ let isRight = (__props.theme.label_position ?? __props.theme.tick_position) == "right";
14981
14981
  let result = [];
14982
14982
  for (let tick of __props.ticks) {
14983
14983
  if (typeof tick == "number") tick = { position: tick };
@@ -14985,14 +14985,14 @@ var VVPlot = (function(exports, vue) {
14985
14985
  let tsl = pos * (__props.activeTransform.scaleV - 1) + __props.activeTransform.translateV;
14986
14986
  let position = pos + __props.layout.t;
14987
14987
  if (position + tsl < 0 || position + tsl > height.value) continue;
14988
- 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);
14989
14989
  let anchorX, anchorY, dockX, dockY;
14990
- if (__props.theme.tick_anchor_x != null || __props.theme.tick_anchor_y != null) {
14991
- anchorX = __props.theme.tick_anchor_x ?? (isRight ? 0 : 1);
14992
- 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;
14993
14993
  } else {
14994
- dockX = __props.theme.tick_dock_x ?? (isRight ? 0 : 1);
14995
- 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;
14996
14996
  }
14997
14997
  result.push({
14998
14998
  wrapper: {
@@ -15003,7 +15003,7 @@ var VVPlot = (function(exports, vue) {
15003
15003
  text: {
15004
15004
  y: position,
15005
15005
  x: offset,
15006
- angle: __props.theme.text_angle,
15006
+ angle: __props.theme.label_angle,
15007
15007
  anchorX,
15008
15008
  anchorY,
15009
15009
  dockX,