vue-chrts 2.0.0 → 2.1.0-beta-3

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.
Files changed (165) hide show
  1. package/dist/components/AreaChart/AreaChart.js +141 -112
  2. package/dist/components/AreaChart/types.d.ts +33 -1
  3. package/dist/components/BarChart/BarChart.js +76 -65
  4. package/dist/components/BarChart/types.d.ts +9 -1
  5. package/dist/components/BubbleChart/BubbleChart.js +55 -45
  6. package/dist/components/BubbleChart/types.d.ts +9 -1
  7. package/dist/components/DagreGraph/DagreGraph.js +171 -0
  8. package/dist/components/DagreGraph/DagreGraph.vue.d.ts +33 -0
  9. package/dist/components/DagreGraph/DagreGraph2.js +4 -0
  10. package/dist/components/DagreGraph/types.d.ts +253 -0
  11. package/dist/components/DonutChart/DonutChart.js +69 -59
  12. package/dist/components/DonutChart/types.d.ts +14 -2
  13. package/dist/components/DualChart/DualChart.js +216 -0
  14. package/dist/components/DualChart/DualChart.vue.d.ts +21 -0
  15. package/dist/components/DualChart/DualChart2.js +4 -0
  16. package/dist/components/DualChart/types.d.ts +195 -0
  17. package/dist/components/GanttChart/GanttChart.js +58 -48
  18. package/dist/components/GanttChart/types.d.ts +9 -1
  19. package/dist/components/LineChart/LineChart.js +17 -9
  20. package/dist/components/Maps/DottedMap/DottedMap.js +170 -0
  21. package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +52 -0
  22. package/dist/components/Maps/DottedMap/DottedMap2.js +4 -0
  23. package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +6 -0
  24. package/dist/components/Maps/DottedMap/MapZoomControls.js +44 -0
  25. package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +13 -0
  26. package/dist/components/Maps/DottedMap/MapZoomControls2.js +4 -0
  27. package/dist/components/Maps/DottedMap/core.js +122 -0
  28. package/dist/components/Maps/DottedMap/core.vue.d.ts +36 -0
  29. package/dist/components/Maps/DottedMap/core2.js +4 -0
  30. package/dist/components/Maps/DottedMap/mapUtils.d.ts +49 -0
  31. package/dist/components/Maps/DottedMap/mapUtils.js +130 -0
  32. package/dist/components/Maps/DottedMap/pins.d.ts +9 -0
  33. package/dist/components/Maps/DottedMap/pins.js +58 -0
  34. package/dist/components/Maps/DottedMap/regions.d.ts +4 -0
  35. package/dist/components/Maps/DottedMap/regions.js +66 -0
  36. package/dist/components/Maps/DottedMap/types.d.ts +127 -0
  37. package/dist/components/Maps/DottedMap/useMapPanZoom.d.ts +22 -0
  38. package/dist/components/Maps/DottedMap/useMapPanZoom.js +41 -0
  39. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +170 -0
  40. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +30 -0
  41. package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
  42. package/dist/components/Maps/TopoJSONMap/data.d.ts +13 -0
  43. package/dist/components/Maps/TopoJSONMap/types.d.ts +40 -0
  44. package/dist/components/Maps/types.d.ts +48 -0
  45. package/dist/components/SankeyChart/SankeyChart.js +133 -0
  46. package/dist/components/SankeyChart/SankeyChart.vue.d.ts +22 -0
  47. package/dist/components/SankeyChart/SankeyChart2.js +4 -0
  48. package/dist/components/SankeyChart/types.d.ts +116 -0
  49. package/dist/components/Tooltip.js +32 -27
  50. package/dist/data/countries.geo.json.js +9 -0
  51. package/dist/index.d.ts +8 -2
  52. package/dist/index.js +25 -12
  53. package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +28 -0
  54. package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +20 -0
  55. package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +222 -0
  56. package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +25 -0
  57. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +24 -0
  58. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +46 -0
  59. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +31 -0
  60. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +15 -0
  61. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +8 -0
  62. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +8 -0
  63. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +13 -0
  64. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +9 -0
  65. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +6 -0
  66. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +8 -0
  67. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +10 -0
  68. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +7 -0
  69. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +6 -0
  70. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +6 -0
  71. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +6 -0
  72. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +6 -0
  73. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +7 -0
  74. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +8 -0
  75. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +8 -0
  76. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +11 -0
  77. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +13 -0
  78. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +7 -0
  79. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +6 -0
  80. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +7 -0
  81. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +10 -0
  82. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +10 -0
  83. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +14 -0
  84. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +6 -0
  85. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +7 -0
  86. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +6 -0
  87. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +7 -0
  88. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +6 -0
  89. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +10 -0
  90. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +8 -0
  91. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +33 -0
  92. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +1278 -0
  93. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +226 -0
  94. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +17 -0
  95. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +25 -0
  96. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +22 -0
  97. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +65 -0
  98. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +8 -0
  99. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +82 -0
  100. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +94 -0
  101. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +39 -0
  102. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +30 -0
  103. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +12 -0
  104. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +9 -0
  105. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +25 -0
  106. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +11 -0
  107. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +128 -0
  108. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +47 -0
  109. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +119 -0
  110. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +43 -0
  111. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +36 -0
  112. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +55 -0
  113. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +52 -0
  114. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +36 -0
  115. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +27 -0
  116. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +48 -0
  117. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +30 -0
  118. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +54 -0
  119. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +27 -0
  120. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +26 -0
  121. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +49 -0
  122. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +28 -0
  123. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +31 -0
  124. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +134 -0
  125. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +61 -0
  126. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +19 -0
  127. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +49 -0
  128. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +26 -0
  129. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +37 -0
  130. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +48 -0
  131. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +173 -0
  132. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +58 -0
  133. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +28 -0
  134. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +68 -0
  135. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +67 -0
  136. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +104 -0
  137. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +47 -0
  138. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +34 -0
  139. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +46 -0
  140. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +33 -0
  141. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +60 -0
  142. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +110 -0
  143. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +22 -0
  144. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +34 -0
  145. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +34 -0
  146. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +49 -0
  147. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +38 -0
  148. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +23 -0
  149. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +30 -0
  150. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +9 -0
  151. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +20 -0
  152. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +171 -0
  153. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +11 -0
  154. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +7 -0
  155. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +104 -0
  156. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +117 -0
  157. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +89 -0
  158. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +73 -0
  159. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +12 -0
  160. package/dist/types.d.ts +21 -1
  161. package/dist/utils/geoJsonToGrid.d.ts +14 -0
  162. package/dist/utils/index.d.ts +1 -0
  163. package/dist/utils.d.ts +3 -0
  164. package/dist/utils.js +35 -31
  165. package/package.json +15 -9
@@ -1,5 +1,5 @@
1
- import { defineComponent as W, useSlots as X, useTemplateRef as H, ref as Y, computed as k, createElementBlock as p, openBlock as d, normalizeStyle as L, createVNode as b, createCommentVNode as x, createElementVNode as j, unref as a, withCtx as $, createBlock as c, Fragment as q, renderList as I, mergeProps as C, renderSlot as F } from "vue";
2
- import { Orientation as u, StackedBar as U, GroupedBar as J } from "@unovis/ts";
1
+ import { defineComponent as W, useSlots as X, useTemplateRef as H, ref as Y, computed as k, createElementBlock as v, openBlock as d, normalizeStyle as h, createVNode as p, createCommentVNode as c, createElementVNode as j, unref as a, withCtx as $, createBlock as s, Fragment as q, renderList as I, mergeProps as P, renderSlot as F } from "vue";
2
+ import { Orientation as g, StackedBar as U, GroupedBar as J } from "@unovis/ts";
3
3
  import { useStackedGrouped as K } from "./stackedGroupedUtils.js";
4
4
  import { VisXYContainer as Q, VisXYLabels as Z, VisTooltip as _, VisStackedBar as G, VisGroupedBar as ee, VisAxis as V, VisBulletLegend as te } from "@unovis/vue";
5
5
  import ae from "../Tooltip.js";
@@ -7,7 +7,7 @@ import { LegendPosition as ie } from "../../types.js";
7
7
  const ne = {
8
8
  ref: "slotWrapper",
9
9
  style: { display: "none" }
10
- }, ue = /* @__PURE__ */ W({
10
+ }, ce = /* @__PURE__ */ W({
11
11
  __name: "BarChart",
12
12
  props: {
13
13
  data: {},
@@ -35,8 +35,12 @@ const ne = {
35
35
  radius: {},
36
36
  hideLegend: { type: Boolean, default: !1 },
37
37
  hideTooltip: { type: Boolean, default: !1 },
38
- orientation: { default: u.Vertical },
38
+ orientation: { default: g.Vertical },
39
39
  legendPosition: { default: ie.BottomCenter },
40
+ duration: { default: 600 },
41
+ tooltip: { default: () => ({
42
+ followCursor: !0
43
+ }) },
40
44
  legendStyle: { default: void 0 },
41
45
  xDomainLine: { type: Boolean },
42
46
  yDomainLine: { type: Boolean },
@@ -55,7 +59,7 @@ const ne = {
55
59
  },
56
60
  emits: ["click"],
57
61
  setup(e, { emit: S }) {
58
- const O = S, t = e, D = X(), h = H("slotWrapper"), g = Y();
62
+ const w = S, t = e, D = X(), L = H("slotWrapper"), y = Y();
59
63
  if (t.valueLabel && !t.xAxis)
60
64
  throw new Error(
61
65
  "BarChart: 'xAxis' prop is required when 'valueLabel' is enabled. Please provide an 'xAxis' to display value labels."
@@ -65,7 +69,7 @@ const ne = {
65
69
  const A = k(() => t.yAxis.map((i) => (l) => l[i])), B = (i, l) => {
66
70
  var o;
67
71
  return (o = Object.values(t.categories)[l]) == null ? void 0 : o.color;
68
- }, y = k(
72
+ }, m = k(
69
73
  () => K({
70
74
  data: t.data,
71
75
  categories: t.categories,
@@ -73,75 +77,80 @@ const ne = {
73
77
  xAxis: t.xAxis,
74
78
  spacing: t.stackedGroupedSpacing
75
79
  }).value
76
- ), E = k(() => t.legendPosition.startsWith("top")), N = k(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
77
- function T(i) {
78
- g.value = i;
80
+ ), O = k(() => t.legendPosition.startsWith("top")), E = k(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center");
81
+ function C(i) {
82
+ y.value = i;
79
83
  }
80
- const P = t.yAxis.map((i) => (l) => l[i]), M = P.length, w = t.data.flatMap(
81
- (i, l) => P.map((o, s) => ({
84
+ const T = t.yAxis.map((i) => (l) => l[i]), N = T.length, M = t.data.flatMap(
85
+ (i, l) => T.map((o, u) => ({
82
86
  x: l,
83
87
  y: Number(o(i) ?? 0),
84
- itemIndex: s
88
+ itemIndex: u
85
89
  }))
86
90
  ), z = (i) => {
87
91
  if (t.stacked || t.stackAndGrouped) return i.x;
88
- const l = M;
92
+ const l = N;
89
93
  if (l <= 1) return i.x;
90
- const s = 1 - (t.groupPadding ?? 0), m = s / l, f = -s / 2, n = m * i.itemIndex + m / 2, v = 1 - (t.barPadding ?? 0), R = (f + n) * v;
94
+ const u = 1 - (t.groupPadding ?? 0), f = u / l, x = -u / 2, n = f * i.itemIndex + f / 2, b = 1 - (t.barPadding ?? 0), R = (x + n) * b;
91
95
  return i.x + R;
92
96
  };
93
- return (i, l) => (d(), p("div", {
94
- style: L({
97
+ return (i, l) => (d(), v("div", {
98
+ style: h({
95
99
  display: "flex",
96
- flexDirection: E.value ? "column-reverse" : "column",
100
+ flexDirection: O.value ? "column-reverse" : "column",
97
101
  gap: "var(--vis-legend-spacing)"
98
102
  }),
99
- onClick: l[0] || (l[0] = (o) => O("click", o, g.value))
103
+ onClick: l[0] || (l[0] = (o) => w("click", o, y.value))
100
104
  }, [
101
- b(a(Q), {
105
+ p(a(Q), {
102
106
  padding: e.padding,
103
- height: e.height
107
+ height: e.height,
108
+ duration: e.duration
104
109
  }, {
105
110
  default: $(() => {
106
- var o, s, m, f;
111
+ var o, u, f, x;
107
112
  return [
108
- e.valueLabel ? (d(), c(a(Z), {
113
+ e.valueLabel ? (d(), s(a(Z), {
109
114
  key: 0,
110
- data: a(w),
115
+ data: a(M),
111
116
  x: z,
112
117
  y: (n) => {
113
118
  var r;
114
119
  return n.y + (((r = t.valueLabel) == null ? void 0 : r.labelSpacing) ?? 0);
115
120
  },
116
121
  label: (o = t.valueLabel) == null ? void 0 : o.label,
117
- backgroundColor: ((s = t.valueLabel) == null ? void 0 : s.backgroundColor) ?? "transparent",
118
- color: ((m = t.valueLabel) == null ? void 0 : m.color) ?? "red",
119
- labelFontSize: (f = t.valueLabel) == null ? void 0 : f.labelFontSize
120
- }, null, 8, ["data", "y", "label", "backgroundColor", "color", "labelFontSize"])) : x("", !0),
121
- b(a(_), {
122
+ backgroundColor: ((u = t.valueLabel) == null ? void 0 : u.backgroundColor) ?? "transparent",
123
+ color: ((f = t.valueLabel) == null ? void 0 : f.color) ?? "red",
124
+ labelFontSize: (x = t.valueLabel) == null ? void 0 : x.labelFontSize
125
+ }, null, 8, ["data", "y", "label", "backgroundColor", "color", "labelFontSize"])) : c("", !0),
126
+ e.hideTooltip ? c("", !0) : (d(), s(a(_), {
127
+ key: 1,
128
+ followCursor: t.tooltip.followCursor,
129
+ "show-delay": t.tooltip.showDelay,
130
+ "hide-delay": t.tooltip.hideDelay,
122
131
  triggers: {
123
132
  [a(J).selectors.bar]: (n) => {
124
133
  var r;
125
- return T(n), n ? (r = h.value) == null ? void 0 : r.innerHTML : "";
134
+ return C(n), n ? (r = L.value) == null ? void 0 : r.innerHTML : "";
126
135
  },
127
136
  [a(U).selectors.bar]: (n) => {
128
137
  var r;
129
- return T(n), n ? (r = h.value) == null ? void 0 : r.innerHTML : "";
138
+ return C(n), n ? (r = L.value) == null ? void 0 : r.innerHTML : "";
130
139
  }
131
140
  }
132
- }, null, 8, ["triggers"]),
133
- e.stackAndGrouped ? (d(!0), p(q, { key: 1 }, I(y.value.states, (n) => (d(), c(a(G), {
141
+ }, null, 8, ["followCursor", "show-delay", "hide-delay", "triggers"])),
142
+ e.stackAndGrouped ? (d(!0), v(q, { key: 2 }, I(m.value.states, (n) => (d(), s(a(G), {
134
143
  key: n,
135
- data: y.value.chartData,
136
- x: (r, v) => v + y.value.positions[n],
137
- y: y.value.bars[n],
138
- color: y.value.colorFunctions[n],
144
+ data: m.value.chartData,
145
+ x: (r, b) => b + m.value.positions[n],
146
+ y: m.value.bars[n],
147
+ color: m.value.colorFunctions[n],
139
148
  "rounded-corners": e.radius ?? 0,
140
149
  "group-padding": e.groupPadding ?? 0,
141
150
  "bar-padding": e.barPadding,
142
- orientation: e.orientation ?? a(u).Vertical
143
- }, null, 8, ["data", "x", "y", "color", "rounded-corners", "group-padding", "bar-padding", "orientation"]))), 128)) : e.stacked ? (d(), c(a(G), {
144
- key: 3,
151
+ orientation: e.orientation ?? a(g).Vertical
152
+ }, null, 8, ["data", "x", "y", "color", "rounded-corners", "group-padding", "bar-padding", "orientation"]))), 128)) : e.stacked ? (d(), s(a(G), {
153
+ key: 4,
145
154
  data: e.data,
146
155
  x: (n, r) => r,
147
156
  y: A.value,
@@ -149,9 +158,9 @@ const ne = {
149
158
  "rounded-corners": e.radius ?? 0,
150
159
  "group-padding": e.groupPadding ?? 0,
151
160
  "bar-padding": e.barPadding ?? 0.2,
152
- orientation: e.orientation ?? a(u).Vertical
153
- }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (d(), c(a(ee), {
154
- key: 2,
161
+ orientation: e.orientation ?? a(g).Vertical
162
+ }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])) : (d(), s(a(ee), {
163
+ key: 3,
155
164
  data: e.data,
156
165
  x: (n, r) => r,
157
166
  y: A.value,
@@ -159,10 +168,10 @@ const ne = {
159
168
  "rounded-corners": e.radius ?? 0,
160
169
  "group-padding": e.groupPadding ?? 0,
161
170
  "bar-padding": e.barPadding ?? 0.2,
162
- orientation: e.orientation ?? a(u).Vertical
171
+ orientation: e.orientation ?? a(g).Vertical
163
172
  }, null, 8, ["data", "x", "y", "rounded-corners", "group-padding", "bar-padding", "orientation"])),
164
- e.hideXAxis ? x("", !0) : (d(), c(a(V), C({
165
- key: 4,
173
+ e.hideXAxis ? c("", !0) : (d(), s(a(V), P({
174
+ key: 5,
166
175
  type: "x",
167
176
  "tick-format": e.xFormatter,
168
177
  label: e.xLabel,
@@ -171,31 +180,33 @@ const ne = {
171
180
  "tick-line": e.xTickLine,
172
181
  "num-ticks": e.xNumTicks,
173
182
  "tick-values": e.xExplicitTicks,
174
- minMaxTicksOnly: e.minMaxTicksOnly
175
- }, e.xAxisConfig), null, 16, ["tick-format", "label", "grid-line", "domain-line", "tick-line", "num-ticks", "tick-values", "minMaxTicksOnly"])),
176
- e.hideYAxis ? x("", !0) : (d(), c(a(V), C({
177
- key: 5,
183
+ minMaxTicksOnly: e.minMaxTicksOnly,
184
+ duration: e.duration
185
+ }, e.xAxisConfig), null, 16, ["tick-format", "label", "grid-line", "domain-line", "tick-line", "num-ticks", "tick-values", "minMaxTicksOnly", "duration"])),
186
+ e.hideYAxis ? c("", !0) : (d(), s(a(V), P({
187
+ key: 6,
178
188
  type: "y",
179
189
  label: e.yLabel,
180
- "grid-line": e.orientation !== a(u).Horizontal && e.yGridLine,
190
+ "grid-line": e.orientation !== a(g).Horizontal && e.yGridLine,
181
191
  "domain-line": !!e.yDomainLine,
182
192
  "tick-format": e.yFormatter,
183
193
  "num-ticks": e.yNumTicks,
184
- "tick-line": e.yTickLine
185
- }, e.yAxisConfig), null, 16, ["label", "grid-line", "domain-line", "tick-format", "num-ticks", "tick-line"]))
194
+ "tick-line": e.yTickLine,
195
+ duration: e.duration
196
+ }, e.yAxisConfig), null, 16, ["label", "grid-line", "domain-line", "tick-format", "num-ticks", "tick-line", "duration"]))
186
197
  ];
187
198
  }),
188
199
  _: 1
189
- }, 8, ["padding", "height"]),
190
- t.hideLegend ? x("", !0) : (d(), p("div", {
200
+ }, 8, ["padding", "height", "duration"]),
201
+ t.hideLegend ? c("", !0) : (d(), v("div", {
191
202
  key: 0,
192
- style: L({
203
+ style: h({
193
204
  display: "flex",
194
- justifyContent: N.value
205
+ justifyContent: E.value
195
206
  })
196
207
  }, [
197
- b(a(te), {
198
- style: L([
208
+ p(a(te), {
209
+ style: h([
199
210
  t.legendStyle,
200
211
  "display: flex; gap: var(--vis-legend-spacing);"
201
212
  ]),
@@ -208,19 +219,19 @@ const ne = {
208
219
  j("div", ne, [
209
220
  a(D).tooltip ? F(i.$slots, "tooltip", {
210
221
  key: 0,
211
- values: g.value
212
- }) : g.value ? F(i.$slots, "fallback", { key: 1 }, () => [
213
- b(ae, {
214
- data: g.value,
222
+ values: y.value
223
+ }) : y.value ? F(i.$slots, "fallback", { key: 1 }, () => [
224
+ p(ae, {
225
+ data: y.value,
215
226
  categories: t.categories,
216
227
  "title-formatter": t.tooltipTitleFormatter,
217
- yFormatter: t.orientation === a(u).Horizontal ? t.xFormatter : t.yFormatter
228
+ yFormatter: t.orientation === a(g).Horizontal ? t.xFormatter : t.yFormatter
218
229
  }, null, 8, ["data", "categories", "title-formatter", "yFormatter"])
219
- ]) : x("", !0)
230
+ ]) : c("", !0)
220
231
  ], 512)
221
232
  ], 4));
222
233
  }
223
234
  });
224
235
  export {
225
- ue as default
236
+ ce as default
226
237
  };
@@ -1,4 +1,4 @@
1
- import { BulletLegendItemInterface, Orientation, LegendPosition, axisFormatter, AxisConfig } from '../../types';
1
+ import { BulletLegendItemInterface, Orientation, LegendPosition, axisFormatter, AxisConfig, TooltipConfig } from '../../types';
2
2
  type BarChartPropsBase<T> = {
3
3
  /**
4
4
  * The data to be displayed in the bar chart.
@@ -105,6 +105,14 @@ type BarChartPropsBase<T> = {
105
105
  * See `LegendPosition` for available options.
106
106
  */
107
107
  legendPosition?: LegendPosition;
108
+ /**
109
+ * Animation duration in milliseconds for the chart components.
110
+ */
111
+ duration?: number;
112
+ /**
113
+ * Configuration object for the chart tooltip.
114
+ */
115
+ tooltip?: TooltipConfig;
108
116
  /**
109
117
  * Optional style object for the legend container. Allows custom CSS styling.
110
118
  */
@@ -1,12 +1,12 @@
1
- import { defineComponent as O, useSlots as S, useTemplateRef as D, ref as R, computed as g, createElementBlock as p, openBlock as l, normalizeStyle as d, createVNode as s, createCommentVNode as r, createElementVNode as w, unref as t, withCtx as K, createBlock as u, mergeProps as x, renderSlot as k } from "vue";
1
+ import { defineComponent as D, useSlots as N, useTemplateRef as O, ref as S, computed as p, createElementBlock as g, openBlock as r, normalizeStyle as d, createVNode as c, createCommentVNode as n, createElementVNode as R, unref as t, withCtx as K, createBlock as u, mergeProps as x, renderSlot as k } from "vue";
2
2
  import { Scatter as M, Position as E } from "@unovis/ts";
3
3
  import { VisXYContainer as G, VisTooltip as W, VisScatter as $, VisAxis as L, VisBulletLegend as j } from "@unovis/vue";
4
4
  import { LegendPosition as X } from "../../types.js";
5
5
  import Y from "../Tooltip.js";
6
- const _ = {
6
+ const q = {
7
7
  ref: "slotWrapper",
8
8
  class: "hidden"
9
- }, Q = /* @__PURE__ */ O({
9
+ }, Q = /* @__PURE__ */ D({
10
10
  __name: "BubbleChart",
11
11
  props: {
12
12
  xAccessor: {},
@@ -46,61 +46,69 @@ const _ = {
46
46
  color: "#666"
47
47
  }) },
48
48
  xAxisConfig: {},
49
- yAxisConfig: {}
49
+ yAxisConfig: {},
50
+ duration: { default: 600 },
51
+ tooltip: { default: () => ({
52
+ followCursor: !0
53
+ }) }
50
54
  },
51
55
  emits: ["click"],
52
- setup(c, { emit: h }) {
53
- const e = c, T = S(), y = D("slotWrapper"), n = R(), v = e.xAccessor, b = e.yAccessor, B = e.sizeAccessor || ((i) => typeof i.comments == "number" ? i.comments : 1), A = (i) => {
56
+ setup(s, { emit: h }) {
57
+ const e = s, T = N(), y = O("slotWrapper"), l = S(), v = e.xAccessor, b = e.yAccessor, C = e.sizeAccessor || ((o) => typeof o.comments == "number" ? o.comments : 1), B = (o) => {
54
58
  var f, m;
55
59
  if (!e.categories || !e.categoryKey)
56
60
  return console.warn(
57
61
  "BubbleChart: categories and categoryKey are required for color mapping"
58
62
  ), "#cccccc";
59
- const a = String(i[e.categoryKey]);
60
- let o = (f = e.categories[a]) == null ? void 0 : f.color;
61
- return Object.keys(e.categories).length === 1 && (o = (m = e.categories[e.categoryKey]) == null ? void 0 : m.color), o || (console.warn(
63
+ const a = String(o[e.categoryKey]);
64
+ let i = (f = e.categories[a]) == null ? void 0 : f.color;
65
+ return Object.keys(e.categories).length === 1 && (i = (m = e.categories[e.categoryKey]) == null ? void 0 : m.color), i || (console.warn(
62
66
  `BubbleChart: No color defined for category "${a}"`
63
67
  ), "#cccccc");
64
- }, C = h;
65
- function F(i) {
66
- return n.value = i, V();
68
+ }, A = h;
69
+ function F(o) {
70
+ return l.value = o, w();
67
71
  }
68
- function V(i) {
72
+ function w(o) {
69
73
  return typeof window > "u" ? "" : y.value ? y.value.innerHTML : "";
70
74
  }
71
- const z = {
75
+ const V = {
72
76
  [M.selectors.point]: F
73
- }, P = g(() => e.legendPosition.startsWith("top")), N = g(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center");
74
- return (i, a) => (l(), p("div", {
77
+ }, z = p(() => e.legendPosition.startsWith("top")), P = p(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center");
78
+ return (o, a) => (r(), g("div", {
75
79
  style: d({
76
80
  display: "flex",
77
- flexDirection: P.value ? "column-reverse" : "column",
81
+ flexDirection: z.value ? "column-reverse" : "column",
78
82
  gap: "var(--vis-legend-spacing)"
79
83
  })
80
84
  }, [
81
- s(t(G), {
85
+ c(t(G), {
82
86
  data: e.data,
83
87
  height: e.height || 600,
84
88
  padding: e.padding,
89
+ duration: s.duration,
85
90
  scaleByDomain: !0,
86
- onClick: a[0] || (a[0] = (o) => C("click", o, n.value))
91
+ onClick: a[0] || (a[0] = (i) => A("click", i, l.value))
87
92
  }, {
88
93
  default: K(() => [
89
- e.hideTooltip ? r("", !0) : (l(), u(t(W), {
94
+ e.hideTooltip ? n("", !0) : (r(), u(t(W), {
90
95
  key: 0,
91
- triggers: z
92
- })),
93
- s(t($), {
96
+ triggers: V,
97
+ followCursor: e.tooltip.followCursor,
98
+ "show-delay": e.tooltip.showDelay,
99
+ "hide-delay": e.tooltip.hideDelay
100
+ }, null, 8, ["followCursor", "show-delay", "hide-delay"])),
101
+ c(t($), {
94
102
  x: t(v),
95
103
  y: t(b),
96
- color: A,
97
- size: t(B),
104
+ color: B,
105
+ size: t(C),
98
106
  labelPosition: e.labelPosition || t(E).Bottom,
99
107
  sizeRange: e.sizeRange || [1, 20],
100
108
  opacity: e.opacity,
101
109
  cursor: "pointer"
102
110
  }, null, 8, ["x", "y", "size", "labelPosition", "sizeRange", "opacity"]),
103
- e.hideXAxis ? r("", !0) : (l(), u(t(L), x({
111
+ e.hideXAxis ? n("", !0) : (r(), u(t(L), x({
104
112
  key: 1,
105
113
  type: "x",
106
114
  label: e.xLabel,
@@ -110,9 +118,10 @@ const _ = {
110
118
  tickLine: e.xTickLine,
111
119
  numTicks: e.xNumTicks,
112
120
  tickValues: e.xExplicitTicks,
113
- minMaxTicksOnly: e.minMaxTicksOnly
114
- }, c.xAxisConfig), null, 16, ["label", "tickFormat", "gridLine", "domainLine", "tickLine", "numTicks", "tickValues", "minMaxTicksOnly"])),
115
- e.hideYAxis ? r("", !0) : (l(), u(t(L), x({
121
+ minMaxTicksOnly: e.minMaxTicksOnly,
122
+ duration: e.duration
123
+ }, s.xAxisConfig), null, 16, ["label", "tickFormat", "gridLine", "domainLine", "tickLine", "numTicks", "tickValues", "minMaxTicksOnly", "duration"])),
124
+ e.hideYAxis ? n("", !0) : (r(), u(t(L), x({
116
125
  key: 2,
117
126
  type: "y",
118
127
  label: e.yLabel,
@@ -120,42 +129,43 @@ const _ = {
120
129
  gridLine: e.yGridLine,
121
130
  domainLine: !!e.yDomainLine,
122
131
  tickLine: e.yTickLine,
123
- numTicks: e.yNumTicks
124
- }, c.yAxisConfig), null, 16, ["label", "tickFormat", "gridLine", "domainLine", "tickLine", "numTicks"]))
132
+ numTicks: e.yNumTicks,
133
+ duration: e.duration
134
+ }, s.yAxisConfig), null, 16, ["label", "tickFormat", "gridLine", "domainLine", "tickLine", "numTicks", "duration"]))
125
135
  ]),
126
136
  _: 1
127
- }, 8, ["data", "height", "padding"]),
128
- e.hideLegend ? r("", !0) : (l(), p("div", {
137
+ }, 8, ["data", "height", "padding", "duration"]),
138
+ e.hideLegend ? n("", !0) : (r(), g("div", {
129
139
  key: 0,
130
140
  style: d({
131
141
  display: "flex",
132
- justifyContent: N.value
142
+ justifyContent: P.value
133
143
  })
134
144
  }, [
135
- s(t(j), {
145
+ c(t(j), {
136
146
  class: "bulletLegendOverrides",
137
147
  style: d([
138
148
  e.legendStyle,
139
149
  "display: flex; gap: var(--vis-legend-spacing);"
140
150
  ]),
141
- items: Object.values(e.categories).map((o) => ({
142
- ...o,
143
- color: Array.isArray(o.color) ? o.color[0] : o.color
151
+ items: Object.values(e.categories).map((i) => ({
152
+ ...i,
153
+ color: Array.isArray(i.color) ? i.color[0] : i.color
144
154
  }))
145
155
  }, null, 8, ["style", "items"])
146
156
  ], 4)),
147
- w("div", _, [
148
- t(T).tooltip ? k(i.$slots, "tooltip", {
157
+ R("div", q, [
158
+ t(T).tooltip ? k(o.$slots, "tooltip", {
149
159
  key: 0,
150
- values: n.value
151
- }) : n.value ? k(i.$slots, "fallback", { key: 1 }, () => [
152
- s(Y, {
153
- data: n.value,
160
+ values: l.value
161
+ }) : l.value ? k(o.$slots, "fallback", { key: 1 }, () => [
162
+ c(Y, {
163
+ data: l.value,
154
164
  categories: e.categories || {},
155
165
  "title-formatter": e.tooltipTitleFormatter,
156
166
  yFormatter: e.yFormatter
157
167
  }, null, 8, ["data", "categories", "title-formatter", "yFormatter"])
158
- ]) : r("", !0)
168
+ ]) : n("", !0)
159
169
  ], 512)
160
170
  ], 4));
161
171
  }
@@ -1,4 +1,4 @@
1
- import { axisFormatter, BulletLegendItemInterface, LegendPosition, CrosshairConfig, AxisConfig } from '../../types';
1
+ import { axisFormatter, BulletLegendItemInterface, LegendPosition, CrosshairConfig, AxisConfig, TooltipConfig } from '../../types';
2
2
  import { NumericAccessor, Position } from '@unovis/ts';
3
3
  export interface SizeOptions {
4
4
  minRadius?: number;
@@ -161,4 +161,12 @@ export interface BubbleChartProps<T> {
161
161
  * Axis configuration object for customizing the appearance of the axes.
162
162
  */
163
163
  yAxisConfig?: AxisConfig;
164
+ /**
165
+ * Animation duration in milliseconds for the chart components.
166
+ */
167
+ duration?: number;
168
+ /**
169
+ * Configuration object for the chart tooltip.
170
+ */
171
+ tooltip?: TooltipConfig;
164
172
  }
@@ -0,0 +1,171 @@
1
+ import { defineComponent as E, useSlots as M, useTemplateRef as N, ref as V, computed as l, createElementBlock as c, openBlock as u, normalizeStyle as f, createVNode as k, createCommentVNode as s, createElementVNode as g, unref as a, withCtx as P, createBlock as G, renderSlot as h, toDisplayString as y } from "vue";
2
+ import { VisSingleContainer as I, VisTooltip as Z, VisGraph as $, VisBulletLegend as j } from "@unovis/vue";
3
+ import { Graph as m, GraphLayoutType as R } from "@unovis/ts";
4
+ import { LegendPosition as q } from "../../types.js";
5
+ const H = {
6
+ ref: "slotWrapper",
7
+ style: { display: "none" }
8
+ }, J = { class: "dagre-tooltip" }, K = { class: "font-semibold" }, O = {
9
+ key: 0,
10
+ class: "text-sm text-gray-500"
11
+ }, _ = /* @__PURE__ */ E({
12
+ __name: "DagreGraph",
13
+ props: {
14
+ data: {},
15
+ height: { default: 600 },
16
+ width: { default: void 0 },
17
+ dagreLayoutSettings: { default: () => ({
18
+ rankdir: "TB",
19
+ nodesep: 50,
20
+ ranksep: 100,
21
+ ranker: "network-simplex",
22
+ marginx: 20,
23
+ marginy: 20
24
+ }) },
25
+ nodeSize: { type: [Number, Function], default: 40 },
26
+ nodeLabel: {},
27
+ nodeShape: { type: [String, Function], default: "circle" },
28
+ nodeFill: { type: [String, Function], default: "#3b82f6" },
29
+ nodeStroke: { type: [String, Function], default: "#1e40af" },
30
+ nodeStrokeWidth: { type: [Number, Function], default: 2 },
31
+ linkArrow: { default: "end" },
32
+ linkLabel: {},
33
+ linkStroke: { type: [String, Function], default: "#9ca3af" },
34
+ linkWidth: { type: [Number, Function], default: 2 },
35
+ linkCurvature: { default: 0 },
36
+ padding: { default: () => ({ top: 20, right: 20, bottom: 20, left: 20 }) },
37
+ hideTooltip: { type: Boolean, default: !1 },
38
+ zoomEnabled: { type: Boolean, default: !0 },
39
+ zoomScaleExtent: { default: () => [0.1, 10] },
40
+ nodeDraggingEnabled: { type: Boolean, default: !1 },
41
+ hideLegend: { type: Boolean, default: !0 },
42
+ legendPosition: { default: q.BottomCenter },
43
+ legendStyle: { default: void 0 },
44
+ legendItems: { default: () => [] },
45
+ tooltipTitleFormatter: {},
46
+ tooltipContentFormatter: {},
47
+ tooltip: { default: () => ({
48
+ followCursor: !0
49
+ }) },
50
+ duration: { default: 600 }
51
+ },
52
+ emits: ["nodeClick", "nodeMouseover", "nodeMouseout", "linkClick", "linkMouseover", "linkMouseout"],
53
+ setup(t, { emit: S }) {
54
+ const e = t, r = S, p = M();
55
+ N("slotWrapper");
56
+ const i = V(), v = l(() => typeof e.nodeSize == "function" ? e.nodeSize : () => e.nodeSize), b = l(() => e.nodeLabel ? e.nodeLabel : (o) => o.label || o.id), C = l(() => typeof e.nodeShape == "function" ? e.nodeShape : () => e.nodeShape), L = l(() => typeof e.nodeFill == "function" ? e.nodeFill : () => e.nodeFill), F = l(() => typeof e.nodeStroke == "function" ? e.nodeStroke : () => e.nodeStroke), w = l(() => typeof e.nodeStrokeWidth == "function" ? e.nodeStrokeWidth : () => e.nodeStrokeWidth), A = l(() => e.linkLabel ? e.linkLabel : (o) => o.label || ""), W = l(() => typeof e.linkStroke == "function" ? e.linkStroke : () => e.linkStroke), x = l(() => typeof e.linkWidth == "function" ? e.linkWidth : () => e.linkWidth), z = l(() => {
57
+ switch (e.linkArrow) {
58
+ case "start":
59
+ return "start";
60
+ case "end":
61
+ return "end";
62
+ case "both":
63
+ return "both";
64
+ case "none":
65
+ return;
66
+ default:
67
+ return "end";
68
+ }
69
+ }), T = l(() => e.legendPosition.startsWith("top")), B = l(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), D = {
70
+ [m.selectors.node]: {
71
+ click: (o, n) => {
72
+ r("nodeClick", o, n);
73
+ },
74
+ mouseover: (o, n) => {
75
+ i.value = o, r("nodeMouseover", o, n);
76
+ },
77
+ mouseout: (o, n) => {
78
+ i.value = void 0, r("nodeMouseout", o, n);
79
+ }
80
+ },
81
+ [m.selectors.link]: {
82
+ click: (o, n) => {
83
+ r("linkClick", o, n);
84
+ },
85
+ mouseover: (o, n) => {
86
+ r("linkMouseover", o, n);
87
+ },
88
+ mouseout: (o, n) => {
89
+ r("linkMouseout", o, n);
90
+ }
91
+ }
92
+ };
93
+ return (o, n) => (u(), c("div", {
94
+ style: f({
95
+ display: "flex",
96
+ flexDirection: T.value ? "column-reverse" : "column",
97
+ gap: "var(--vis-legend-spacing)"
98
+ }),
99
+ class: "dagre-graph-container"
100
+ }, [
101
+ k(a(I), {
102
+ data: t.data,
103
+ height: t.height,
104
+ width: t.width,
105
+ duration: t.duration,
106
+ padding: t.padding
107
+ }, {
108
+ default: P(() => [
109
+ t.hideTooltip ? s("", !0) : (u(), G(a(Z), {
110
+ key: 0,
111
+ followCursor: e.tooltip.followCursor,
112
+ "show-delay": e.tooltip.showDelay,
113
+ "hide-delay": e.tooltip.hideDelay
114
+ }, null, 8, ["followCursor", "show-delay", "hide-delay"])),
115
+ k(a($), {
116
+ layoutType: a(R).Dagre,
117
+ dagreLayoutSettings: t.dagreLayoutSettings,
118
+ nodeSize: v.value,
119
+ nodeLabel: b.value,
120
+ nodeShape: C.value,
121
+ nodeFill: L.value,
122
+ nodeStroke: F.value,
123
+ nodeStrokeWidth: w.value,
124
+ linkArrow: z.value,
125
+ linkLabel: A.value,
126
+ linkStroke: W.value,
127
+ linkWidth: x.value,
128
+ linkCurvature: t.linkCurvature,
129
+ zoomScaleExtent: t.zoomScaleExtent,
130
+ disableZoom: !t.zoomEnabled,
131
+ disableDrag: !t.nodeDraggingEnabled,
132
+ events: D
133
+ }, null, 8, ["layoutType", "dagreLayoutSettings", "nodeSize", "nodeLabel", "nodeShape", "nodeFill", "nodeStroke", "nodeStrokeWidth", "linkArrow", "linkLabel", "linkStroke", "linkWidth", "linkCurvature", "zoomScaleExtent", "disableZoom", "disableDrag"])
134
+ ]),
135
+ _: 1
136
+ }, 8, ["data", "height", "width", "duration", "padding"]),
137
+ !t.hideLegend && t.legendItems && t.legendItems.length > 0 ? (u(), c("div", {
138
+ key: 0,
139
+ style: f({
140
+ display: "flex",
141
+ justifyContent: B.value
142
+ })
143
+ }, [
144
+ k(a(j), {
145
+ style: f([
146
+ t.legendStyle,
147
+ "display: flex; gap: var(--vis-legend-spacing);"
148
+ ]),
149
+ items: t.legendItems.map((d) => ({
150
+ ...d,
151
+ color: Array.isArray(d.color) ? d.color[0] : d.color
152
+ }))
153
+ }, null, 8, ["style", "items"])
154
+ ], 4)) : s("", !0),
155
+ g("div", H, [
156
+ a(p).tooltip ? h(o.$slots, "tooltip", {
157
+ key: 0,
158
+ node: i.value
159
+ }) : i.value ? h(o.$slots, "fallback", { key: 1 }, () => [
160
+ g("div", J, [
161
+ g("div", K, y(t.tooltipTitleFormatter ? t.tooltipTitleFormatter(i.value) : i.value.label || i.value.id), 1),
162
+ t.tooltipContentFormatter ? (u(), c("div", O, y(t.tooltipContentFormatter(i.value)), 1)) : s("", !0)
163
+ ])
164
+ ]) : s("", !0)
165
+ ], 512)
166
+ ], 4));
167
+ }
168
+ });
169
+ export {
170
+ _ as default
171
+ };