vue-chrts 2.1.0-beta-7 → 2.1.0-beta-9

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