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,13 +1,13 @@
1
- import { defineComponent as z, useSlots as R, useTemplateRef as U, ref as H, computed as d, createElementBlock as f, openBlock as c, normalizeClass as K, normalizeStyle as p, createVNode as u, createCommentVNode as y, createElementVNode as q, unref as r, withCtx as J, createBlock as k, Fragment as T, renderList as Q, mergeProps as v, renderSlot as b } from "vue";
2
- import { Position as $, CurveType as h } from "@unovis/ts";
3
- import { createMarkers as Z } from "../../utils.js";
4
- import I from "../Tooltip.js";
5
- import { VisXYContainer as _, VisTooltip as ee, VisArea as B, VisLine as D, VisAxis as O, VisCrosshair as te, VisBulletLegend as ie } from "@unovis/vue";
6
- import { LegendPosition as ae } from "../../types.js";
7
- const ne = ["id"], oe = {
1
+ import { defineComponent as I, useSlots as K, useTemplateRef as q, ref as J, getCurrentInstance as Q, computed as d, createElementBlock as f, openBlock as c, normalizeClass as Z, normalizeStyle as p, createVNode as k, createCommentVNode as u, createElementVNode as _, unref as l, withCtx as ee, createBlock as y, Fragment as T, renderList as te, mergeProps as v, renderSlot as B } from "vue";
2
+ import { Position as O, CurveType as h } from "@unovis/ts";
3
+ import { createScopedMarkers as ie } from "../../utils.js";
4
+ import oe from "../Tooltip.js";
5
+ import { VisXYContainer as ne, VisTooltip as ae, VisArea as D, VisLine as M, VisAxis as w, VisCrosshair as re, VisBulletLegend as le } from "@unovis/vue";
6
+ import { LegendPosition as se } from "../../types.js";
7
+ const ce = ["id"], de = {
8
8
  ref: "slotWrapper",
9
9
  style: { display: "none" }
10
- }, F = 0.5, A = "#3b82f6", ye = /* @__PURE__ */ z({
10
+ }, S = 0.5, C = "#3b82f6", ve = /* @__PURE__ */ I({
11
11
  __name: "AreaChart",
12
12
  props: {
13
13
  data: {},
@@ -31,10 +31,16 @@ const ne = ["id"], oe = {
31
31
  xNumTicks: {},
32
32
  xExplicitTicks: {},
33
33
  minMaxTicksOnly: { type: Boolean },
34
+ xMinMaxTicksOnly: { type: Boolean },
35
+ yMinMaxTicksOnly: { type: Boolean },
36
+ minMaxTicksOnlyShowGridLines: { type: Boolean },
37
+ xMinMaxTicksOnlyShowGridLines: { type: Boolean },
38
+ yMinMaxTicksOnlyShowGridLines: { type: Boolean },
34
39
  yNumTicks: {},
40
+ yExplicitTicks: {},
35
41
  hideLegend: { type: Boolean, default: !1 },
36
42
  hideTooltip: { type: Boolean },
37
- legendPosition: { default: ae.BottomCenter },
43
+ legendPosition: { default: se.BottomCenter },
38
44
  legendStyle: { default: void 0 },
39
45
  xDomainLine: { type: Boolean },
40
46
  yDomainLine: { type: Boolean },
@@ -51,131 +57,150 @@ const ne = ["id"], oe = {
51
57
  yAxisConfig: {},
52
58
  yDomain: {},
53
59
  xDomain: {},
54
- stacked: { type: Boolean }
60
+ stacked: { type: Boolean },
61
+ duration: { default: 600 },
62
+ tooltip: { default: () => ({
63
+ followCursor: !0
64
+ }) }
55
65
  },
56
66
  emits: ["click"],
57
- setup(e, { emit: V }) {
58
- const j = V, n = e, G = R(), C = U("slotWrapper"), m = H(), g = d(() => {
59
- const i = Object.values(n.categories).map(
60
- (l, a) => `var(--vis-color${a})`
67
+ setup(e, { emit: G }) {
68
+ var b;
69
+ const V = G, t = e, j = K(), L = q("slotWrapper"), m = J(), A = `area-${((b = Q()) == null ? void 0 : b.uid) ?? Math.random().toString(36).slice(2)}`, g = d(() => {
70
+ const i = Object.values(t.categories).map(
71
+ (a, n) => `var(--vis-color${n})`
61
72
  );
62
- return Object.values(n.categories).map(
63
- (l, a) => l.color ?? i[a]
73
+ return Object.values(t.categories).map(
74
+ (a, n) => a.color ?? i[n]
64
75
  );
65
- }), N = d(() => {
76
+ }), F = d(() => t.yNumTicks !== void 0 ? t.yNumTicks : Math.max(2, Object.keys(t.categories ?? {}).length)), N = d(() => {
66
77
  var i;
67
- return (i = n.markerConfig) != null && i.config ? Z(n.markerConfig) : "";
68
- }), S = d(() => n.legendPosition.startsWith("top")), W = d(() => n.legendPosition.includes("left") ? "flex-start" : n.legendPosition.includes("right") ? "flex-end" : "center"), M = d(() => {
69
- const i = (a, t) => {
70
- var o;
78
+ return (i = t.markerConfig) != null && i.config ? ie(t.markerConfig, A) : "";
79
+ }), W = d(() => {
80
+ var a;
81
+ if (!((a = t.markerConfig) != null && a.config)) return {};
82
+ const i = {};
83
+ for (const n of Object.keys(t.markerConfig.config))
84
+ i[`--vis-marker-${n}`] = `url("#${t.markerConfig.id}--${A}--${n}")`;
85
+ return i;
86
+ }), E = d(() => t.legendPosition.startsWith("top")), P = d(() => t.legendPosition.includes("left") ? "flex-start" : t.legendPosition.includes("right") ? "flex-end" : "center"), X = d(() => {
87
+ const i = (n, o) => {
88
+ var r;
71
89
  return `
72
- <linearGradient id="gradient${a}-${t}" gradientTransform="rotate(90)">
73
- ${((o = n.gradientStops) == null ? void 0 : o.map(
74
- (s) => `<stop offset="${s.offset}" stop-color="${t}" stop-opacity="${s.stopOpacity}" />`
90
+ <linearGradient id="gradient${n}-${o}" gradientTransform="rotate(90)">
91
+ ${((r = t.gradientStops) == null ? void 0 : r.map(
92
+ (s) => `<stop offset="${s.offset}" stop-color="${o}" stop-opacity="${s.stopOpacity}" />`
75
93
  ).join("")) ?? ""}
76
- <stop offset="100%" stop-color="${t}" stop-opacity="0" />
94
+ <stop offset="100%" stop-color="${o}" stop-opacity="0" />
77
95
  </linearGradient>
78
96
  `;
79
- }, l = (a, t) => {
80
- var o;
97
+ }, a = (n, o) => {
98
+ var r;
81
99
  return `
82
- <linearGradient id="gradient${a}-${t}" gradientTransform="rotate(90)">
100
+ <linearGradient id="gradient${n}-${o}" gradientTransform="rotate(90)">
83
101
 
84
- ${((o = n.gradientStops) == null ? void 0 : o.map(
102
+ ${((r = t.gradientStops) == null ? void 0 : r.map(
85
103
  (s) => `
86
- <stop offset="${s.offset}" style="stop-color:var(${t});stop-opacity:${s.stopOpacity}" />
104
+ <stop offset="${s.offset}" style="stop-color:var(${o});stop-opacity:${s.stopOpacity}" />
87
105
  `
88
106
  ).join("")) ?? ""}
89
107
  </linearGradient>
90
108
  `;
91
109
  };
92
110
  return g.value.map(
93
- (a, t) => a != null && a.includes("#") ? i(t, a) : l(t, a ?? A)
111
+ (n, o) => n != null && n.includes("#") ? i(o, n) : a(o, n ?? C)
94
112
  ).join("");
95
113
  });
96
- function P(i) {
97
- var l;
114
+ function Y(i) {
115
+ var a;
98
116
  return {
99
- y: (a) => Number(a[i]),
100
- color: ((l = n.categories[i]) == null ? void 0 : l.color) ?? A
117
+ y: (n) => Number(n[i]),
118
+ color: ((a = t.categories[i]) == null ? void 0 : a.color) ?? C
101
119
  };
102
120
  }
103
- const w = d(() => Object.keys(n.categories).map(
104
- (i) => (l) => Number(l[i])
105
- )), X = d(() => {
106
- const i = Object.keys(n.categories);
107
- return i.map((l, a) => (t) => {
108
- let o = 0;
109
- for (let s = 0; s <= a; s++)
110
- o += Number(t[i[s]]) || 0;
111
- return o;
121
+ const z = d(() => Object.keys(t.categories).map(
122
+ (i) => (a) => Number(a[i])
123
+ )), R = d(() => {
124
+ const i = Object.keys(t.categories);
125
+ return i.map((a, n) => (o) => {
126
+ let r = 0;
127
+ for (let s = 0; s <= n; s++)
128
+ r += Number(o[i[s]]) || 0;
129
+ return r;
112
130
  });
113
- }), L = d(() => (i, l) => g.value[l] ?? A);
114
- function E(i) {
115
- return typeof window > "u" ? "" : C.value ? C.value.innerHTML : "";
131
+ }), $ = d(() => (i, a) => g.value[a] ?? C);
132
+ function U(i) {
133
+ return typeof window > "u" ? "" : L.value ? L.value.innerHTML : "";
116
134
  }
117
- function Y(i) {
118
- return m.value = i, E();
135
+ function H(i) {
136
+ return m.value = i, U();
119
137
  }
120
- return (i, l) => {
121
- var a;
138
+ return (i, a) => {
139
+ var n;
122
140
  return c(), f("div", {
123
141
  style: p({
124
142
  display: "flex",
125
- flexDirection: S.value ? "column-reverse" : "column",
126
- gap: "var(--vis-legend-spacing)"
143
+ flexDirection: E.value ? "column-reverse" : "column",
144
+ gap: "var(--vis-legend-spacing)",
145
+ ...W.value
127
146
  }),
128
- class: K({ "stacked-area-chart": e.stacked }),
129
- id: (a = e.markerConfig) == null ? void 0 : a.id,
130
- onClick: l[0] || (l[0] = (t) => j("click", t, m.value))
147
+ class: Z({ "stacked-area-chart": e.stacked }),
148
+ id: (n = e.markerConfig) == null ? void 0 : n.id,
149
+ onClick: a[0] || (a[0] = (o) => V("click", o, m.value))
131
150
  }, [
132
- u(r(_), {
151
+ k(l(ne), {
133
152
  data: e.data,
134
153
  height: e.height,
154
+ duration: e.duration,
135
155
  padding: e.padding,
136
- "svg-defs": M.value + N.value,
156
+ "svg-defs": X.value + N.value,
137
157
  "y-domain": e.yDomain,
138
158
  "x-domain": e.xDomain
139
159
  }, {
140
- default: J(() => [
141
- e.hideTooltip ? y("", !0) : (c(), k(r(ee), {
160
+ default: ee(() => [
161
+ e.hideTooltip ? u("", !0) : (c(), y(l(ae), {
142
162
  key: 0,
143
- "horizontal-placement": r($).Right,
144
- "vertical-placement": r($).Top
145
- }, null, 8, ["horizontal-placement", "vertical-placement"])),
163
+ "horizontal-placement": l(O).Right,
164
+ "vertical-placement": l(O).Top,
165
+ "follow-cursor": t.tooltip.followCursor,
166
+ "show-delay": t.tooltip.showDelay,
167
+ "hide-delay": t.tooltip.hideDelay
168
+ }, null, 8, ["horizontal-placement", "vertical-placement", "follow-cursor", "show-delay", "hide-delay"])),
146
169
  e.stacked ? (c(), f(T, { key: 1 }, [
147
- u(r(B), {
148
- x: (t, o) => o,
149
- y: w.value,
150
- color: L.value,
151
- opacity: e.hideArea ? 0 : F,
152
- "curve-type": e.curveType ?? r(h).MonotoneX
153
- }, null, 8, ["x", "y", "color", "opacity", "curve-type"]),
154
- u(r(D), {
155
- x: (t, o) => o,
156
- y: X.value,
157
- color: L.value,
158
- "curve-type": e.curveType ?? r(h).MonotoneX,
170
+ e.hideArea ? u("", !0) : (c(), y(l(D), {
171
+ key: 0,
172
+ x: (o, r) => r,
173
+ y: z.value,
174
+ color: $.value,
175
+ opacity: S,
176
+ "curve-type": e.curveType ?? l(h).MonotoneX
177
+ }, null, 8, ["x", "y", "color", "curve-type"])),
178
+ k(l(M), {
179
+ x: (o, r) => r,
180
+ y: R.value,
181
+ color: $.value,
182
+ "curve-type": e.curveType ?? l(h).MonotoneX,
159
183
  "line-width": e.lineWidth
160
184
  }, null, 8, ["x", "y", "color", "curve-type", "line-width"])
161
- ], 64)) : (c(!0), f(T, { key: 2 }, Q(Object.keys(n.categories), (t, o) => (c(), f(T, { key: t }, [
162
- u(r(B), v({
185
+ ], 64)) : (c(!0), f(T, { key: 2 }, te(Object.keys(t.categories), (o, r) => (c(), f(T, { key: o }, [
186
+ e.hideArea ? u("", !0) : (c(), y(l(D), v({
187
+ key: 0,
163
188
  x: (s, x) => x
164
- }, { ref_for: !0 }, P(t), {
165
- color: `url(#gradient${o}-${g.value[o]})`,
166
- opacity: e.hideArea ? 0 : F,
167
- "curve-type": e.curveType ?? r(h).MonotoneX
168
- }), null, 16, ["x", "color", "opacity", "curve-type"]),
169
- u(r(D), {
189
+ }, { ref_for: !0 }, Y(o), {
190
+ color: `url(#gradient${r}-${g.value[r]})`,
191
+ opacity: S,
192
+ "curve-type": e.curveType ?? l(h).MonotoneX
193
+ }), null, 16, ["x", "color", "curve-type"])),
194
+ k(l(M), {
170
195
  x: (s, x) => x,
171
- y: (s) => s[t],
172
- color: g.value[o],
173
- "curve-type": e.curveType ?? r(h).MonotoneX,
196
+ y: (s) => s[o],
197
+ color: g.value[r],
198
+ "curve-type": e.curveType ?? l(h).MonotoneX,
174
199
  "line-width": e.lineWidth,
175
- lineDashArray: e.lineDashArray ? e.lineDashArray[o] : void 0
200
+ lineDashArray: e.lineDashArray ? e.lineDashArray[r] : void 0
176
201
  }, null, 8, ["x", "y", "color", "curve-type", "line-width", "lineDashArray"])
177
202
  ], 64))), 128)),
178
- e.hideXAxis ? y("", !0) : (c(), k(r(O), v({
203
+ e.hideXAxis ? u("", !0) : (c(), y(l(w), v({
179
204
  key: 3,
180
205
  type: "x",
181
206
  label: e.xLabel,
@@ -186,57 +211,61 @@ const ne = ["id"], oe = {
186
211
  "grid-line": e.xGridLine,
187
212
  "domain-line": e.xDomainLine,
188
213
  "tick-line": e.xTickLine,
189
- "min-max-ticks-only": e.minMaxTicksOnly
190
- }, e.xAxisConfig), null, 16, ["label", "num-ticks", "tick-format", "tick-values", "grid-line", "domain-line", "tick-line", "min-max-ticks-only"])),
191
- e.hideYAxis ? y("", !0) : (c(), k(r(O), v({
214
+ "min-max-ticks-only": e.minMaxTicksOnly,
215
+ duration: e.duration
216
+ }, e.xAxisConfig), null, 16, ["label", "num-ticks", "tick-format", "tick-values", "grid-line", "domain-line", "tick-line", "min-max-ticks-only", "duration"])),
217
+ e.hideYAxis ? u("", !0) : (c(), y(l(w), v({
192
218
  key: 4,
193
219
  type: "y",
194
220
  label: e.yLabel,
195
- "num-ticks": e.yNumTicks,
221
+ "num-ticks": F.value,
196
222
  "tick-format": e.yFormatter,
223
+ "tick-values": e.yExplicitTicks,
197
224
  "grid-line": e.yGridLine,
198
225
  "domain-line": e.yDomainLine,
199
- "tick-line": e.yTickLine
200
- }, e.yAxisConfig), null, 16, ["label", "num-ticks", "tick-format", "grid-line", "domain-line", "tick-line"])),
201
- e.hideTooltip ? y("", !0) : (c(), k(r(te), v({ key: 5 }, e.crosshairConfig, { template: Y }), null, 16))
226
+ "tick-line": e.yTickLine,
227
+ duration: e.duration
228
+ }, e.yAxisConfig), null, 16, ["label", "num-ticks", "tick-format", "tick-values", "grid-line", "domain-line", "tick-line", "duration"])),
229
+ e.hideTooltip ? u("", !0) : (c(), y(l(re), v({ key: 5 }, e.crosshairConfig, { template: H }), null, 16))
202
230
  ]),
203
231
  _: 1
204
- }, 8, ["data", "height", "padding", "svg-defs", "y-domain", "x-domain"]),
205
- n.hideLegend ? y("", !0) : (c(), f("div", {
232
+ }, 8, ["data", "height", "duration", "padding", "svg-defs", "y-domain", "x-domain"]),
233
+ t.hideLegend ? u("", !0) : (c(), f("div", {
206
234
  key: 0,
207
235
  style: p({
208
236
  display: "flex",
209
- justifyContent: W.value
237
+ justifyContent: P.value
210
238
  })
211
239
  }, [
212
- u(r(ie), {
240
+ k(l(le), {
213
241
  style: p([
214
- n.legendStyle,
242
+ t.legendStyle,
215
243
  "display: flex; gap: var(--vis-legend-spacing);"
216
244
  ]),
217
- items: Object.values(n.categories).map((t) => ({
218
- ...t,
219
- color: Array.isArray(t.color) ? t.color[0] : t.color
245
+ items: Object.values(t.categories).map((o) => ({
246
+ ...o,
247
+ color: Array.isArray(o.color) ? o.color[0] : o.color
220
248
  }))
221
249
  }, null, 8, ["style", "items"])
222
250
  ], 4)),
223
- q("div", oe, [
224
- r(G).tooltip ? b(i.$slots, "tooltip", {
251
+ _("div", de, [
252
+ l(j).tooltip ? B(i.$slots, "tooltip", {
225
253
  key: 0,
226
254
  values: m.value
227
- }) : m.value ? b(i.$slots, "fallback", { key: 1 }, () => [
228
- u(I, {
255
+ }) : m.value ? B(i.$slots, "fallback", { key: 1 }, () => [
256
+ k(oe, {
229
257
  data: m.value,
258
+ followCursor: !1,
230
259
  categories: e.categories,
231
- "title-formatter": n.tooltipTitleFormatter,
232
- yFormatter: n.yFormatter
260
+ "title-formatter": t.tooltipTitleFormatter,
261
+ yFormatter: t.yFormatter
233
262
  }, null, 8, ["data", "categories", "title-formatter", "yFormatter"])
234
- ]) : y("", !0)
263
+ ]) : u("", !0)
235
264
  ], 512)
236
- ], 14, ne);
265
+ ], 14, ce);
237
266
  };
238
267
  }
239
268
  });
240
269
  export {
241
- ye as default
270
+ ve as default
242
271
  };
@@ -1,4 +1,4 @@
1
- import { axisFormatter, CrosshairConfig, LegendPosition, MarkerConfig, AxisConfig } from '../../types';
1
+ import { axisFormatter, CrosshairConfig, LegendPosition, MarkerConfig, AxisConfig, TooltipConfig } from '../../types';
2
2
  import { BulletLegendItemInterface, CurveType } from '@unovis/ts';
3
3
  export interface AreaChartProps<T> {
4
4
  /**
@@ -92,10 +92,34 @@ export interface AreaChartProps<T> {
92
92
  * Force only first and last ticks on the x-axis.
93
93
  */
94
94
  minMaxTicksOnly?: boolean;
95
+ /**
96
+ * Force only first and last ticks on the x-axis.
97
+ */
98
+ xMinMaxTicksOnly?: boolean;
99
+ /**
100
+ * Force only first and last ticks on the y-axis.
101
+ */
102
+ yMinMaxTicksOnly?: boolean;
103
+ /**
104
+ * Show grid lines for the min and max axis ticks.
105
+ */
106
+ minMaxTicksOnlyShowGridLines?: boolean;
107
+ /**
108
+ * Show grid lines for the min and max x-axis ticks.
109
+ */
110
+ xMinMaxTicksOnlyShowGridLines?: boolean;
111
+ /**
112
+ * Show grid lines for the min and max y-axis ticks.
113
+ */
114
+ yMinMaxTicksOnlyShowGridLines?: boolean;
95
115
  /**
96
116
  * The desired number of ticks on the y-axis.
97
117
  */
98
118
  yNumTicks?: number;
119
+ /**
120
+ * Force specific ticks on the y-axis.
121
+ */
122
+ yExplicitTicks?: (number | string | Date)[];
99
123
  /**
100
124
  * If `true`, hides the chart legend.
101
125
  */
@@ -170,4 +194,12 @@ export interface AreaChartProps<T> {
170
194
  * When false (default), areas are overlaid on top of each other.
171
195
  */
172
196
  stacked?: boolean;
197
+ /**
198
+ * Animation duration in milliseconds for the chart components.
199
+ */
200
+ duration?: number;
201
+ /**
202
+ * Configuration object for the chart tooltip.
203
+ */
204
+ tooltip?: TooltipConfig;
173
205
  }