vue-chrts 2.1.0-beta-2 → 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 (159) hide show
  1. package/dist/components/AreaChart/AreaChart.js +127 -107
  2. package/dist/components/AreaChart/types.d.ts +34 -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 +33 -24
  8. package/dist/components/DagreGraph/types.d.ts +5 -1
  9. package/dist/components/DonutChart/DonutChart.js +69 -59
  10. package/dist/components/DonutChart/types.d.ts +14 -2
  11. package/dist/components/DualChart/DualChart.js +56 -46
  12. package/dist/components/DualChart/types.d.ts +10 -1
  13. package/dist/components/GanttChart/GanttChart.js +58 -48
  14. package/dist/components/GanttChart/types.d.ts +9 -1
  15. package/dist/components/LineChart/LineChart.js +17 -9
  16. package/dist/components/Maps/DottedMap/DottedMap.js +170 -0
  17. package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +52 -0
  18. package/dist/components/Maps/DottedMap/DottedMap2.js +4 -0
  19. package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +6 -0
  20. package/dist/components/Maps/DottedMap/MapZoomControls.js +44 -0
  21. package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +13 -0
  22. package/dist/components/Maps/DottedMap/MapZoomControls2.js +4 -0
  23. package/dist/components/Maps/DottedMap/core.js +122 -0
  24. package/dist/components/Maps/DottedMap/core.vue.d.ts +36 -0
  25. package/dist/components/Maps/DottedMap/core2.js +4 -0
  26. package/dist/components/Maps/DottedMap/mapUtils.d.ts +49 -0
  27. package/dist/components/Maps/DottedMap/mapUtils.js +130 -0
  28. package/dist/components/Maps/DottedMap/pins.d.ts +9 -0
  29. package/dist/components/Maps/DottedMap/pins.js +58 -0
  30. package/dist/components/Maps/DottedMap/regions.d.ts +4 -0
  31. package/dist/components/Maps/DottedMap/regions.js +66 -0
  32. package/dist/components/Maps/DottedMap/types.d.ts +127 -0
  33. package/dist/components/Maps/DottedMap/useMapPanZoom.d.ts +22 -0
  34. package/dist/components/Maps/DottedMap/useMapPanZoom.js +41 -0
  35. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +170 -0
  36. package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +30 -0
  37. package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
  38. package/dist/components/Maps/TopoJSONMap/data.d.ts +13 -0
  39. package/dist/components/Maps/TopoJSONMap/types.d.ts +40 -0
  40. package/dist/components/Maps/types.d.ts +48 -0
  41. package/dist/components/SankeyChart/SankeyChart.js +50 -40
  42. package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
  43. package/dist/components/SankeyChart/types.d.ts +14 -1
  44. package/dist/components/Tooltip.js +32 -27
  45. package/dist/data/countries.geo.json.js +9 -0
  46. package/dist/index.d.ts +6 -3
  47. package/dist/index.js +27 -23
  48. 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
  49. package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +20 -0
  50. package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +222 -0
  51. package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +25 -0
  52. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +24 -0
  53. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +46 -0
  54. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +31 -0
  55. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +15 -0
  56. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +8 -0
  57. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +8 -0
  58. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +13 -0
  59. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +9 -0
  60. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +6 -0
  61. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +8 -0
  62. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +10 -0
  63. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +7 -0
  64. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +6 -0
  65. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +6 -0
  66. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +6 -0
  67. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +6 -0
  68. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +7 -0
  69. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +8 -0
  70. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +8 -0
  71. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +11 -0
  72. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +13 -0
  73. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +7 -0
  74. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +6 -0
  75. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +7 -0
  76. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +10 -0
  77. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +10 -0
  78. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +14 -0
  79. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +6 -0
  80. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +7 -0
  81. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +6 -0
  82. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +7 -0
  83. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +6 -0
  84. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +10 -0
  85. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +8 -0
  86. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +33 -0
  87. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +1278 -0
  88. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +226 -0
  89. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +17 -0
  90. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +25 -0
  91. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +22 -0
  92. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +65 -0
  93. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +8 -0
  94. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +82 -0
  95. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +94 -0
  96. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +39 -0
  97. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +30 -0
  98. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +12 -0
  99. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +9 -0
  100. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +25 -0
  101. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +11 -0
  102. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +128 -0
  103. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +47 -0
  104. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +119 -0
  105. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +43 -0
  106. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +36 -0
  107. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +55 -0
  108. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +52 -0
  109. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +36 -0
  110. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +27 -0
  111. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +48 -0
  112. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +30 -0
  113. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +54 -0
  114. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +27 -0
  115. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +26 -0
  116. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +49 -0
  117. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +28 -0
  118. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +31 -0
  119. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +134 -0
  120. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +61 -0
  121. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +19 -0
  122. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +49 -0
  123. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +26 -0
  124. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +37 -0
  125. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +48 -0
  126. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +173 -0
  127. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +58 -0
  128. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +28 -0
  129. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +68 -0
  130. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +67 -0
  131. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +104 -0
  132. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +47 -0
  133. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +34 -0
  134. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +46 -0
  135. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +33 -0
  136. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +60 -0
  137. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +110 -0
  138. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +22 -0
  139. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +34 -0
  140. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +34 -0
  141. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +49 -0
  142. package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +38 -0
  143. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +23 -0
  144. package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +30 -0
  145. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +9 -0
  146. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +20 -0
  147. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +171 -0
  148. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +11 -0
  149. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +7 -0
  150. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +104 -0
  151. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +117 -0
  152. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +89 -0
  153. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +73 -0
  154. package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +12 -0
  155. package/dist/types.d.ts +60 -13
  156. package/dist/types.js +4 -6
  157. package/dist/utils/geoJsonToGrid.d.ts +14 -0
  158. package/dist/utils/index.d.ts +1 -0
  159. package/package.json +8 -2
@@ -1,13 +1,13 @@
1
- import { defineComponent as H, useSlots as I, useTemplateRef as K, ref as q, getCurrentInstance as J, computed as c, createElementBlock as f, openBlock as d, normalizeClass as Q, normalizeStyle as p, createVNode as u, createCommentVNode as m, createElementVNode as Z, unref as l, withCtx as _, createBlock as k, Fragment as T, renderList as ee, mergeProps as v, renderSlot as B } from "vue";
2
- import { Position as D, CurveType as h } from "@unovis/ts";
3
- import { createScopedMarkers as te } from "../../utils.js";
4
- import ie from "../Tooltip.js";
5
- import { VisXYContainer as ne, VisTooltip as ae, VisArea as O, VisLine as V, VisAxis as F, VisCrosshair as oe, VisBulletLegend as re } from "@unovis/vue";
6
- import { LegendPosition as le } from "../../types.js";
7
- const se = ["id"], ce = {
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
- }, S = 0.5, C = "#3b82f6", ke = /* @__PURE__ */ H({
10
+ }, S = 0.5, C = "#3b82f6", ve = /* @__PURE__ */ I({
11
11
  __name: "AreaChart",
12
12
  props: {
13
13
  data: {},
@@ -31,10 +31,16 @@ const se = ["id"], ce = {
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: le.BottomCenter },
43
+ legendPosition: { default: se.BottomCenter },
38
44
  legendStyle: { default: void 0 },
39
45
  xDomainLine: { type: Boolean },
40
46
  yDomainLine: { type: Boolean },
@@ -51,140 +57,150 @@ const se = ["id"], ce = {
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: j }) {
67
+ setup(e, { emit: G }) {
58
68
  var b;
59
- const G = j, a = e, N = I(), A = K("slotWrapper"), y = q(), L = `area-${((b = J()) == null ? void 0 : b.uid) ?? Math.random().toString(36).slice(2)}`, g = c(() => {
60
- const t = Object.values(a.categories).map(
61
- (o, n) => `var(--vis-color${n})`
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})`
62
72
  );
63
- return Object.values(a.categories).map(
64
- (o, n) => o.color ?? t[n]
73
+ return Object.values(t.categories).map(
74
+ (a, n) => a.color ?? i[n]
65
75
  );
66
- }), M = c(() => {
67
- var t;
68
- return (t = a.markerConfig) != null && t.config ? te(a.markerConfig, L) : "";
69
- }), W = c(() => {
70
- var o;
71
- if (!((o = a.markerConfig) != null && o.config)) return {};
72
- const t = {};
73
- for (const n of Object.keys(a.markerConfig.config))
74
- t[`--vis-marker-${n}`] = `url("#${a.markerConfig.id}--${L}--${n}")`;
75
- return t;
76
- }), P = c(() => a.legendPosition.startsWith("top")), w = c(() => a.legendPosition.includes("left") ? "flex-start" : a.legendPosition.includes("right") ? "flex-end" : "center"), X = c(() => {
77
- const t = (n, i) => {
76
+ }), F = d(() => t.yNumTicks !== void 0 ? t.yNumTicks : Math.max(2, Object.keys(t.categories ?? {}).length)), N = d(() => {
77
+ var i;
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) => {
78
88
  var r;
79
89
  return `
80
- <linearGradient id="gradient${n}-${i}" gradientTransform="rotate(90)">
81
- ${((r = a.gradientStops) == null ? void 0 : r.map(
82
- (s) => `<stop offset="${s.offset}" stop-color="${i}" 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}" />`
83
93
  ).join("")) ?? ""}
84
- <stop offset="100%" stop-color="${i}" stop-opacity="0" />
94
+ <stop offset="100%" stop-color="${o}" stop-opacity="0" />
85
95
  </linearGradient>
86
96
  `;
87
- }, o = (n, i) => {
97
+ }, a = (n, o) => {
88
98
  var r;
89
99
  return `
90
- <linearGradient id="gradient${n}-${i}" gradientTransform="rotate(90)">
100
+ <linearGradient id="gradient${n}-${o}" gradientTransform="rotate(90)">
91
101
 
92
- ${((r = a.gradientStops) == null ? void 0 : r.map(
102
+ ${((r = t.gradientStops) == null ? void 0 : r.map(
93
103
  (s) => `
94
- <stop offset="${s.offset}" style="stop-color:var(${i});stop-opacity:${s.stopOpacity}" />
104
+ <stop offset="${s.offset}" style="stop-color:var(${o});stop-opacity:${s.stopOpacity}" />
95
105
  `
96
106
  ).join("")) ?? ""}
97
107
  </linearGradient>
98
108
  `;
99
109
  };
100
110
  return g.value.map(
101
- (n, i) => n != null && n.includes("#") ? t(i, n) : o(i, n ?? C)
111
+ (n, o) => n != null && n.includes("#") ? i(o, n) : a(o, n ?? C)
102
112
  ).join("");
103
113
  });
104
- function E(t) {
105
- var o;
114
+ function Y(i) {
115
+ var a;
106
116
  return {
107
- y: (n) => Number(n[t]),
108
- color: ((o = a.categories[t]) == null ? void 0 : o.color) ?? C
117
+ y: (n) => Number(n[i]),
118
+ color: ((a = t.categories[i]) == null ? void 0 : a.color) ?? C
109
119
  };
110
120
  }
111
- const Y = c(() => Object.keys(a.categories).map(
112
- (t) => (o) => Number(o[t])
113
- )), z = c(() => {
114
- const t = Object.keys(a.categories);
115
- return t.map((o, n) => (i) => {
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) => {
116
126
  let r = 0;
117
127
  for (let s = 0; s <= n; s++)
118
- r += Number(i[t[s]]) || 0;
128
+ r += Number(o[i[s]]) || 0;
119
129
  return r;
120
130
  });
121
- }), $ = c(() => (t, o) => g.value[o] ?? C);
122
- function R(t) {
123
- return typeof window > "u" ? "" : A.value ? A.value.innerHTML : "";
131
+ }), $ = d(() => (i, a) => g.value[a] ?? C);
132
+ function U(i) {
133
+ return typeof window > "u" ? "" : L.value ? L.value.innerHTML : "";
124
134
  }
125
- function U(t) {
126
- return y.value = t, R();
135
+ function H(i) {
136
+ return m.value = i, U();
127
137
  }
128
- return (t, o) => {
138
+ return (i, a) => {
129
139
  var n;
130
- return d(), f("div", {
140
+ return c(), f("div", {
131
141
  style: p({
132
142
  display: "flex",
133
- flexDirection: P.value ? "column-reverse" : "column",
143
+ flexDirection: E.value ? "column-reverse" : "column",
134
144
  gap: "var(--vis-legend-spacing)",
135
145
  ...W.value
136
146
  }),
137
- class: Q({ "stacked-area-chart": e.stacked }),
147
+ class: Z({ "stacked-area-chart": e.stacked }),
138
148
  id: (n = e.markerConfig) == null ? void 0 : n.id,
139
- onClick: o[0] || (o[0] = (i) => G("click", i, y.value))
149
+ onClick: a[0] || (a[0] = (o) => V("click", o, m.value))
140
150
  }, [
141
- u(l(ne), {
151
+ k(l(ne), {
142
152
  data: e.data,
143
153
  height: e.height,
154
+ duration: e.duration,
144
155
  padding: e.padding,
145
- "svg-defs": X.value + M.value,
156
+ "svg-defs": X.value + N.value,
146
157
  "y-domain": e.yDomain,
147
158
  "x-domain": e.xDomain
148
159
  }, {
149
- default: _(() => [
150
- e.hideTooltip ? m("", !0) : (d(), k(l(ae), {
160
+ default: ee(() => [
161
+ e.hideTooltip ? u("", !0) : (c(), y(l(ae), {
151
162
  key: 0,
152
- "horizontal-placement": l(D).Right,
153
- "vertical-placement": l(D).Top
154
- }, null, 8, ["horizontal-placement", "vertical-placement"])),
155
- e.stacked ? (d(), f(T, { key: 1 }, [
156
- u(l(O), {
157
- x: (i, r) => r,
158
- y: Y.value,
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"])),
169
+ e.stacked ? (c(), f(T, { key: 1 }, [
170
+ e.hideArea ? u("", !0) : (c(), y(l(D), {
171
+ key: 0,
172
+ x: (o, r) => r,
173
+ y: z.value,
159
174
  color: $.value,
160
- opacity: e.hideArea ? 0 : S,
175
+ opacity: S,
161
176
  "curve-type": e.curveType ?? l(h).MonotoneX
162
- }, null, 8, ["x", "y", "color", "opacity", "curve-type"]),
163
- u(l(V), {
164
- x: (i, r) => r,
165
- y: z.value,
177
+ }, null, 8, ["x", "y", "color", "curve-type"])),
178
+ k(l(M), {
179
+ x: (o, r) => r,
180
+ y: R.value,
166
181
  color: $.value,
167
182
  "curve-type": e.curveType ?? l(h).MonotoneX,
168
183
  "line-width": e.lineWidth
169
184
  }, null, 8, ["x", "y", "color", "curve-type", "line-width"])
170
- ], 64)) : (d(!0), f(T, { key: 2 }, ee(Object.keys(a.categories), (i, r) => (d(), f(T, { key: i }, [
171
- u(l(O), 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,
172
188
  x: (s, x) => x
173
- }, { ref_for: !0 }, E(i), {
189
+ }, { ref_for: !0 }, Y(o), {
174
190
  color: `url(#gradient${r}-${g.value[r]})`,
175
- opacity: e.hideArea ? 0 : S,
191
+ opacity: S,
176
192
  "curve-type": e.curveType ?? l(h).MonotoneX
177
- }), null, 16, ["x", "color", "opacity", "curve-type"]),
178
- u(l(V), {
193
+ }), null, 16, ["x", "color", "curve-type"])),
194
+ k(l(M), {
179
195
  x: (s, x) => x,
180
- y: (s) => s[i],
196
+ y: (s) => s[o],
181
197
  color: g.value[r],
182
198
  "curve-type": e.curveType ?? l(h).MonotoneX,
183
199
  "line-width": e.lineWidth,
184
200
  lineDashArray: e.lineDashArray ? e.lineDashArray[r] : void 0
185
201
  }, null, 8, ["x", "y", "color", "curve-type", "line-width", "lineDashArray"])
186
202
  ], 64))), 128)),
187
- e.hideXAxis ? m("", !0) : (d(), k(l(F), v({
203
+ e.hideXAxis ? u("", !0) : (c(), y(l(w), v({
188
204
  key: 3,
189
205
  type: "x",
190
206
  label: e.xLabel,
@@ -195,57 +211,61 @@ const se = ["id"], ce = {
195
211
  "grid-line": e.xGridLine,
196
212
  "domain-line": e.xDomainLine,
197
213
  "tick-line": e.xTickLine,
198
- "min-max-ticks-only": e.minMaxTicksOnly
199
- }, e.xAxisConfig), null, 16, ["label", "num-ticks", "tick-format", "tick-values", "grid-line", "domain-line", "tick-line", "min-max-ticks-only"])),
200
- e.hideYAxis ? m("", !0) : (d(), k(l(F), 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({
201
218
  key: 4,
202
219
  type: "y",
203
220
  label: e.yLabel,
204
- "num-ticks": e.yNumTicks,
221
+ "num-ticks": F.value,
205
222
  "tick-format": e.yFormatter,
223
+ "tick-values": e.yExplicitTicks,
206
224
  "grid-line": e.yGridLine,
207
225
  "domain-line": e.yDomainLine,
208
- "tick-line": e.yTickLine
209
- }, e.yAxisConfig), null, 16, ["label", "num-ticks", "tick-format", "grid-line", "domain-line", "tick-line"])),
210
- e.hideTooltip ? m("", !0) : (d(), k(l(oe), v({ key: 5 }, e.crosshairConfig, { template: U }), 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))
211
230
  ]),
212
231
  _: 1
213
- }, 8, ["data", "height", "padding", "svg-defs", "y-domain", "x-domain"]),
214
- a.hideLegend ? m("", !0) : (d(), f("div", {
232
+ }, 8, ["data", "height", "duration", "padding", "svg-defs", "y-domain", "x-domain"]),
233
+ t.hideLegend ? u("", !0) : (c(), f("div", {
215
234
  key: 0,
216
235
  style: p({
217
236
  display: "flex",
218
- justifyContent: w.value
237
+ justifyContent: P.value
219
238
  })
220
239
  }, [
221
- u(l(re), {
240
+ k(l(le), {
222
241
  style: p([
223
- a.legendStyle,
242
+ t.legendStyle,
224
243
  "display: flex; gap: var(--vis-legend-spacing);"
225
244
  ]),
226
- items: Object.values(a.categories).map((i) => ({
227
- ...i,
228
- color: Array.isArray(i.color) ? i.color[0] : i.color
245
+ items: Object.values(t.categories).map((o) => ({
246
+ ...o,
247
+ color: Array.isArray(o.color) ? o.color[0] : o.color
229
248
  }))
230
249
  }, null, 8, ["style", "items"])
231
250
  ], 4)),
232
- Z("div", ce, [
233
- l(N).tooltip ? B(t.$slots, "tooltip", {
251
+ _("div", de, [
252
+ l(j).tooltip ? B(i.$slots, "tooltip", {
234
253
  key: 0,
235
- values: y.value
236
- }) : y.value ? B(t.$slots, "fallback", { key: 1 }, () => [
237
- u(ie, {
238
- data: y.value,
254
+ values: m.value
255
+ }) : m.value ? B(i.$slots, "fallback", { key: 1 }, () => [
256
+ k(oe, {
257
+ data: m.value,
258
+ followCursor: !1,
239
259
  categories: e.categories,
240
- "title-formatter": a.tooltipTitleFormatter,
241
- yFormatter: a.yFormatter
260
+ "title-formatter": t.tooltipTitleFormatter,
261
+ yFormatter: t.yFormatter
242
262
  }, null, 8, ["data", "categories", "title-formatter", "yFormatter"])
243
- ]) : m("", !0)
263
+ ]) : u("", !0)
244
264
  ], 512)
245
- ], 14, se);
265
+ ], 14, ce);
246
266
  };
247
267
  }
248
268
  });
249
269
  export {
250
- ke as default
270
+ ve as default
251
271
  };
@@ -1,4 +1,5 @@
1
- import { axisFormatter, CrosshairConfig, LegendPosition, MarkerConfig, AxisConfig, BulletLegendItemInterface, CurveType } from '../../types';
1
+ import { axisFormatter, CrosshairConfig, LegendPosition, MarkerConfig, AxisConfig, TooltipConfig } from '../../types';
2
+ import { BulletLegendItemInterface, CurveType } from '@unovis/ts';
2
3
  export interface AreaChartProps<T> {
3
4
  /**
4
5
  * The data to be displayed in the area chart.
@@ -91,10 +92,34 @@ export interface AreaChartProps<T> {
91
92
  * Force only first and last ticks on the x-axis.
92
93
  */
93
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;
94
115
  /**
95
116
  * The desired number of ticks on the y-axis.
96
117
  */
97
118
  yNumTicks?: number;
119
+ /**
120
+ * Force specific ticks on the y-axis.
121
+ */
122
+ yExplicitTicks?: (number | string | Date)[];
98
123
  /**
99
124
  * If `true`, hides the chart legend.
100
125
  */
@@ -169,4 +194,12 @@ export interface AreaChartProps<T> {
169
194
  * When false (default), areas are overlaid on top of each other.
170
195
  */
171
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;
172
205
  }