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
@@ -0,0 +1,254 @@
1
+ import { BulletLegendItemInterface, TooltipConfig } from '../../types';
2
+ import { LegendPosition } from '../../enums';
3
+ /**
4
+ * Dagre layout direction options
5
+ */
6
+ export type DagreRankDir = "TB" | "BT" | "LR" | "RL";
7
+ /**
8
+ * Dagre layout alignment options
9
+ */
10
+ export type DagreAlign = "UL" | "UR" | "DL" | "DR";
11
+ /**
12
+ * Dagre ranking algorithm options
13
+ */
14
+ export type DagreRanker = "network-simplex" | "tight-tree" | "longest-path";
15
+ /**
16
+ * Node shape options
17
+ */
18
+ export type NodeShape = "circle" | "square" | "triangle" | "diamond";
19
+ /**
20
+ * Link arrow position options
21
+ */
22
+ export type LinkArrowPosition = "start" | "end" | "both" | "none";
23
+ /**
24
+ * Configuration for Dagre layout algorithm
25
+ */
26
+ export interface DagreLayoutSettings {
27
+ /**
28
+ * Direction of the layout: 'TB' (top-to-bottom), 'BT' (bottom-to-top),
29
+ * 'LR' (left-to-right), 'RL' (right-to-left)
30
+ * @default 'TB'
31
+ */
32
+ rankdir?: DagreRankDir;
33
+ /**
34
+ * Alignment of nodes: 'UL' (up-left), 'UR' (up-right), 'DL' (down-left), 'DR' (down-right)
35
+ */
36
+ align?: DagreAlign;
37
+ /**
38
+ * Horizontal spacing between nodes in pixels
39
+ * @default 50
40
+ */
41
+ nodesep?: number;
42
+ /**
43
+ * Spacing between edges in pixels
44
+ * @default 10
45
+ */
46
+ edgesep?: number;
47
+ /**
48
+ * Vertical spacing between ranks in pixels
49
+ * @default 50
50
+ */
51
+ ranksep?: number;
52
+ /**
53
+ * Algorithm to use for ranking nodes
54
+ * @default 'network-simplex'
55
+ */
56
+ ranker?: DagreRanker;
57
+ /**
58
+ * Horizontal margin in pixels
59
+ * @default 0
60
+ */
61
+ marginx?: number;
62
+ /**
63
+ * Vertical margin in pixels
64
+ * @default 0
65
+ */
66
+ marginy?: number;
67
+ }
68
+ /**
69
+ * Node data structure for the graph
70
+ */
71
+ export interface GraphNodeDatum {
72
+ /**
73
+ * Unique identifier for the node
74
+ */
75
+ id: string;
76
+ /**
77
+ * Display label for the node
78
+ */
79
+ label?: string;
80
+ /**
81
+ * Node level (for hierarchical data)
82
+ */
83
+ level?: number;
84
+ /**
85
+ * Additional data associated with the node
86
+ */
87
+ [key: string]: any;
88
+ }
89
+ /**
90
+ * Link/Edge data structure for the graph
91
+ */
92
+ export interface GraphLinkDatum {
93
+ /**
94
+ * Source node ID
95
+ */
96
+ source: string;
97
+ /**
98
+ * Target node ID
99
+ */
100
+ target: string;
101
+ /**
102
+ * Label for the link
103
+ */
104
+ label?: string;
105
+ /**
106
+ * Additional data associated with the link
107
+ */
108
+ [key: string]: any;
109
+ }
110
+ /**
111
+ * Graph data structure containing nodes and links
112
+ */
113
+ export interface GraphData<N = GraphNodeDatum, L = GraphLinkDatum> {
114
+ /**
115
+ * Array of node data
116
+ */
117
+ nodes: N[];
118
+ /**
119
+ * Array of link data
120
+ */
121
+ links: L[];
122
+ }
123
+ /**
124
+ * Props for the DagreGraph component
125
+ */
126
+ export interface DagreGraphProps<N = GraphNodeDatum, L = GraphLinkDatum> {
127
+ /**
128
+ * The graph data containing nodes and links
129
+ */
130
+ data: GraphData<N, L>;
131
+ /**
132
+ * The height of the graph container in pixels
133
+ * @default 600
134
+ */
135
+ height?: number;
136
+ /**
137
+ * The width of the graph container in pixels
138
+ * @default undefined (auto)
139
+ */
140
+ width?: number;
141
+ /**
142
+ * Dagre layout configuration
143
+ */
144
+ dagreLayoutSettings?: DagreLayoutSettings;
145
+ /**
146
+ * Function or value to determine node size
147
+ * @default 40
148
+ */
149
+ nodeSize?: number | ((node: N, index: number) => number);
150
+ /**
151
+ * Function to extract node label
152
+ */
153
+ nodeLabel?: (node: N, index: number) => string;
154
+ /**
155
+ * Function or value to determine node shape
156
+ */
157
+ nodeShape?: NodeShape | ((node: N, index: number) => NodeShape);
158
+ /**
159
+ * Function or value to determine node fill color
160
+ */
161
+ nodeFill?: string | ((node: N, index: number) => string);
162
+ /**
163
+ * Function or value to determine node stroke color
164
+ */
165
+ nodeStroke?: string | ((node: N, index: number) => string);
166
+ /**
167
+ * Function or value to determine node stroke width
168
+ */
169
+ nodeStrokeWidth?: number | ((node: N, index: number) => number);
170
+ /**
171
+ * Link arrow configuration
172
+ * @default 'end'
173
+ */
174
+ linkArrow?: LinkArrowPosition;
175
+ /**
176
+ * Function to extract link label
177
+ */
178
+ linkLabel?: (link: L, index: number) => string;
179
+ /**
180
+ * Function or value to determine link color
181
+ */
182
+ linkStroke?: string | ((link: L, index: number) => string);
183
+ /**
184
+ * Function or value to determine link width
185
+ */
186
+ linkWidth?: number | ((link: L, index: number) => number);
187
+ /**
188
+ * Link curvature amount (0-1)
189
+ * @default 0
190
+ */
191
+ linkCurvature?: number;
192
+ /**
193
+ * Optional padding applied to the graph
194
+ */
195
+ padding?: {
196
+ top: number;
197
+ right: number;
198
+ bottom: number;
199
+ left: number;
200
+ };
201
+ /**
202
+ * If true, hides the tooltip
203
+ */
204
+ hideTooltip?: boolean;
205
+ /**
206
+ * Enable zoom and pan controls
207
+ * @default true
208
+ */
209
+ zoomEnabled?: boolean;
210
+ /**
211
+ * Zoom scale extent [min, max]
212
+ * @default [0.1, 10]
213
+ */
214
+ zoomScaleExtent?: [number, number];
215
+ /**
216
+ * Enable node dragging
217
+ * @default false
218
+ */
219
+ nodeDraggingEnabled?: boolean;
220
+ /**
221
+ * If true, hides the legend
222
+ */
223
+ hideLegend?: boolean;
224
+ /**
225
+ * Legend position
226
+ * @default LegendPosition.BottomCenter
227
+ */
228
+ legendPosition?: LegendPosition;
229
+ /**
230
+ * Legend style
231
+ */
232
+ legendStyle?: string | Record<string, string>;
233
+ /**
234
+ * Legend items configuration
235
+ */
236
+ legendItems?: BulletLegendItemInterface[];
237
+ /**
238
+ * Custom formatter for tooltip titles
239
+ */
240
+ tooltipTitleFormatter?: (node: N) => string | number;
241
+ /**
242
+ * Custom formatter for tooltip content
243
+ */
244
+ tooltipContentFormatter?: (node: N) => string;
245
+ /**
246
+ * Configuration object for the chart tooltip.
247
+ */
248
+ tooltip?: TooltipConfig;
249
+ /**
250
+ * Animation duration in milliseconds
251
+ * @default 600
252
+ */
253
+ duration?: number;
254
+ }
@@ -1,14 +1,14 @@
1
- import { defineComponent as E, useSlots as M, useTemplateRef as N, ref as V, computed as l, createElementBlock as c, openBlock as u, normalizeStyle as f, createVNode as k, createCommentVNode as s, createElementVNode as g, unref as a, withCtx as P, createBlock as G, renderSlot as h, toDisplayString as y } from "vue";
2
- import { VisSingleContainer as I, VisTooltip as Z, VisGraph as $, VisBulletLegend as j } from "@unovis/vue";
3
- import { Graph as m, GraphLayoutType as R } from "@unovis/ts";
4
- import { LegendPosition as q } from "../../types.js";
5
- const H = {
1
+ import { defineComponent as N, useSlots as V, useTemplateRef as P, ref as G, computed as l, openBlock as u, createElementBlock as c, normalizeStyle as f, createVNode as k, unref as d, withCtx as I, createBlock as Z, createCommentVNode as s, createElementVNode as g, renderSlot as m, toDisplayString as S } from "vue";
2
+ import { VisSingleContainer as $, VisTooltip as j, VisGraph as R, VisBulletLegend as q } from "@unovis/vue";
3
+ import { Graph as p, GraphLayoutType as H } from "@unovis/ts";
4
+ import { LegendPosition as J } from "../../enums.js";
5
+ const K = {
6
6
  ref: "slotWrapper",
7
7
  style: { display: "none" }
8
- }, J = { class: "dagre-tooltip" }, K = { class: "font-semibold" }, O = {
8
+ }, O = { class: "dagre-tooltip" }, Q = { class: "font-semibold" }, U = {
9
9
  key: 0,
10
10
  class: "text-sm text-gray-500"
11
- }, _ = /* @__PURE__ */ E({
11
+ }, te = /* @__PURE__ */ N({
12
12
  __name: "DagreGraph",
13
13
  props: {
14
14
  data: {},
@@ -39,7 +39,7 @@ const H = {
39
39
  zoomScaleExtent: { default: () => [0.1, 10] },
40
40
  nodeDraggingEnabled: { type: Boolean, default: !1 },
41
41
  hideLegend: { type: Boolean, default: !0 },
42
- legendPosition: { default: q.BottomCenter },
42
+ legendPosition: { default: J.BottomCenter },
43
43
  legendStyle: { default: void 0 },
44
44
  legendItems: { default: () => [] },
45
45
  tooltipTitleFormatter: {},
@@ -50,10 +50,10 @@ const H = {
50
50
  duration: { default: 600 }
51
51
  },
52
52
  emits: ["nodeClick", "nodeMouseover", "nodeMouseout", "linkClick", "linkMouseover", "linkMouseout"],
53
- setup(t, { emit: S }) {
54
- const e = t, r = S, p = M();
55
- N("slotWrapper");
56
- const i = V(), v = l(() => typeof e.nodeSize == "function" ? e.nodeSize : () => e.nodeSize), b = l(() => e.nodeLabel ? e.nodeLabel : (o) => o.label || o.id), C = l(() => typeof e.nodeShape == "function" ? e.nodeShape : () => e.nodeShape), L = l(() => typeof e.nodeFill == "function" ? e.nodeFill : () => e.nodeFill), F = l(() => typeof e.nodeStroke == "function" ? e.nodeStroke : () => e.nodeStroke), w = l(() => typeof e.nodeStrokeWidth == "function" ? e.nodeStrokeWidth : () => e.nodeStrokeWidth), A = l(() => e.linkLabel ? e.linkLabel : (o) => o.label || ""), W = l(() => typeof e.linkStroke == "function" ? e.linkStroke : () => e.linkStroke), x = l(() => typeof e.linkWidth == "function" ? e.linkWidth : () => e.linkWidth), z = l(() => {
53
+ setup(t, { emit: v }) {
54
+ const e = t, a = v, b = V();
55
+ P("slotWrapper");
56
+ const i = G(), C = l(() => typeof e.nodeSize == "function" ? e.nodeSize : () => e.nodeSize), L = l(() => e.nodeLabel ? e.nodeLabel : (o) => o.label || o.id), F = l(() => typeof e.nodeShape == "function" ? e.nodeShape : () => e.nodeShape), w = l(() => typeof e.nodeFill == "function" ? e.nodeFill : () => e.nodeFill), A = l(() => typeof e.nodeStroke == "function" ? e.nodeStroke : () => e.nodeStroke), W = l(() => typeof e.nodeStrokeWidth == "function" ? e.nodeStrokeWidth : () => e.nodeStrokeWidth), x = l(() => e.linkLabel ? e.linkLabel : (o) => o.label || ""), z = l(() => typeof e.linkStroke == "function" ? e.linkStroke : () => e.linkStroke), T = l(() => typeof e.linkWidth == "function" ? e.linkWidth : () => e.linkWidth), B = l(() => {
57
57
  switch (e.linkArrow) {
58
58
  case "start":
59
59
  return "start";
@@ -66,100 +66,103 @@ const H = {
66
66
  default:
67
67
  return "end";
68
68
  }
69
- }), T = l(() => e.legendPosition.startsWith("top")), B = l(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), D = {
70
- [m.selectors.node]: {
69
+ }), D = l(() => e.legendPosition.startsWith("top")), E = l(() => e.legendPosition.includes("left") ? "flex-start" : e.legendPosition.includes("right") ? "flex-end" : "center"), M = {
70
+ [p.selectors.node]: {
71
71
  click: (o, n) => {
72
- r("nodeClick", o, n);
72
+ a("nodeClick", o, n);
73
73
  },
74
74
  mouseover: (o, n) => {
75
- i.value = o, r("nodeMouseover", o, n);
75
+ i.value = o, a("nodeMouseover", o, n);
76
76
  },
77
77
  mouseout: (o, n) => {
78
- i.value = void 0, r("nodeMouseout", o, n);
78
+ i.value = void 0, a("nodeMouseout", o, n);
79
79
  }
80
80
  },
81
- [m.selectors.link]: {
81
+ [p.selectors.link]: {
82
82
  click: (o, n) => {
83
- r("linkClick", o, n);
83
+ a("linkClick", o, n);
84
84
  },
85
85
  mouseover: (o, n) => {
86
- r("linkMouseover", o, n);
86
+ a("linkMouseover", o, n);
87
87
  },
88
88
  mouseout: (o, n) => {
89
- r("linkMouseout", o, n);
89
+ a("linkMouseout", o, n);
90
90
  }
91
91
  }
92
92
  };
93
93
  return (o, n) => (u(), c("div", {
94
94
  style: f({
95
95
  display: "flex",
96
- flexDirection: T.value ? "column-reverse" : "column",
96
+ flexDirection: D.value ? "column-reverse" : "column",
97
97
  gap: "var(--vis-legend-spacing)"
98
98
  }),
99
99
  class: "dagre-graph-container"
100
100
  }, [
101
- k(a(I), {
101
+ k(d($), {
102
102
  data: t.data,
103
103
  height: t.height,
104
104
  width: t.width,
105
105
  duration: t.duration,
106
106
  padding: t.padding
107
107
  }, {
108
- default: P(() => [
109
- t.hideTooltip ? s("", !0) : (u(), G(a(Z), {
110
- key: 0,
111
- followCursor: e.tooltip.followCursor,
112
- "show-delay": e.tooltip.showDelay,
113
- "hide-delay": e.tooltip.hideDelay
114
- }, null, 8, ["followCursor", "show-delay", "hide-delay"])),
115
- k(a($), {
116
- layoutType: a(R).Dagre,
117
- dagreLayoutSettings: t.dagreLayoutSettings,
118
- nodeSize: v.value,
119
- nodeLabel: b.value,
120
- nodeShape: C.value,
121
- nodeFill: L.value,
122
- nodeStroke: F.value,
123
- nodeStrokeWidth: w.value,
124
- linkArrow: z.value,
125
- linkLabel: A.value,
126
- linkStroke: W.value,
127
- linkWidth: x.value,
128
- linkCurvature: t.linkCurvature,
129
- zoomScaleExtent: t.zoomScaleExtent,
130
- disableZoom: !t.zoomEnabled,
131
- disableDrag: !t.nodeDraggingEnabled,
132
- events: D
133
- }, null, 8, ["layoutType", "dagreLayoutSettings", "nodeSize", "nodeLabel", "nodeShape", "nodeFill", "nodeStroke", "nodeStrokeWidth", "linkArrow", "linkLabel", "linkStroke", "linkWidth", "linkCurvature", "zoomScaleExtent", "disableZoom", "disableDrag"])
134
- ]),
108
+ default: I(() => {
109
+ var r, h, y;
110
+ return [
111
+ t.hideTooltip ? s("", !0) : (u(), Z(d(j), {
112
+ key: 0,
113
+ followCursor: (r = e.tooltip) == null ? void 0 : r.followCursor,
114
+ "show-delay": (h = e.tooltip) == null ? void 0 : h.showDelay,
115
+ "hide-delay": (y = e.tooltip) == null ? void 0 : y.hideDelay
116
+ }, null, 8, ["followCursor", "show-delay", "hide-delay"])),
117
+ k(d(R), {
118
+ layoutType: d(H).Dagre,
119
+ dagreLayoutSettings: t.dagreLayoutSettings,
120
+ nodeSize: C.value,
121
+ nodeLabel: L.value,
122
+ nodeShape: F.value,
123
+ nodeFill: w.value,
124
+ nodeStroke: A.value,
125
+ nodeStrokeWidth: W.value,
126
+ linkArrow: B.value,
127
+ linkLabel: x.value,
128
+ linkStroke: z.value,
129
+ linkWidth: T.value,
130
+ linkCurvature: t.linkCurvature,
131
+ zoomScaleExtent: t.zoomScaleExtent,
132
+ disableZoom: !t.zoomEnabled,
133
+ disableDrag: !t.nodeDraggingEnabled,
134
+ events: M
135
+ }, null, 8, ["layoutType", "dagreLayoutSettings", "nodeSize", "nodeLabel", "nodeShape", "nodeFill", "nodeStroke", "nodeStrokeWidth", "linkArrow", "linkLabel", "linkStroke", "linkWidth", "linkCurvature", "zoomScaleExtent", "disableZoom", "disableDrag"])
136
+ ];
137
+ }),
135
138
  _: 1
136
139
  }, 8, ["data", "height", "width", "duration", "padding"]),
137
140
  !t.hideLegend && t.legendItems && t.legendItems.length > 0 ? (u(), c("div", {
138
141
  key: 0,
139
142
  style: f({
140
143
  display: "flex",
141
- justifyContent: B.value
144
+ justifyContent: E.value
142
145
  })
143
146
  }, [
144
- k(a(j), {
147
+ k(d(q), {
145
148
  style: f([
146
149
  t.legendStyle,
147
150
  "display: flex; gap: var(--vis-legend-spacing);"
148
151
  ]),
149
- items: t.legendItems.map((d) => ({
150
- ...d,
151
- color: Array.isArray(d.color) ? d.color[0] : d.color
152
+ items: t.legendItems.map((r) => ({
153
+ ...r,
154
+ color: Array.isArray(r.color) ? r.color[0] : r.color
152
155
  }))
153
156
  }, null, 8, ["style", "items"])
154
157
  ], 4)) : s("", !0),
155
- g("div", H, [
156
- a(p).tooltip ? h(o.$slots, "tooltip", {
158
+ g("div", K, [
159
+ d(b).tooltip ? m(o.$slots, "tooltip", {
157
160
  key: 0,
158
161
  node: i.value
159
- }) : i.value ? h(o.$slots, "fallback", { key: 1 }, () => [
160
- g("div", J, [
161
- g("div", K, y(t.tooltipTitleFormatter ? t.tooltipTitleFormatter(i.value) : i.value.label || i.value.id), 1),
162
- t.tooltipContentFormatter ? (u(), c("div", O, y(t.tooltipContentFormatter(i.value)), 1)) : s("", !0)
162
+ }) : i.value ? m(o.$slots, "fallback", { key: 1 }, () => [
163
+ g("div", O, [
164
+ g("div", Q, S(t.tooltipTitleFormatter ? t.tooltipTitleFormatter(i.value) : i.value.label || i.value.id), 1),
165
+ t.tooltipContentFormatter ? (u(), c("div", U, S(t.tooltipContentFormatter(i.value)), 1)) : s("", !0)
163
166
  ])
164
167
  ]) : s("", !0)
165
168
  ], 512)
@@ -167,5 +170,5 @@ const H = {
167
170
  }
168
171
  });
169
172
  export {
170
- _ as default
173
+ te as default
171
174
  };
@@ -1,4 +1,4 @@
1
- import { DagreGraphProps, GraphNodeDatum, GraphLinkDatum } from './types';
1
+ import { DagreGraphProps, GraphNodeDatum, GraphLinkDatum } from './DagreGraph';
2
2
  declare const _default: <N extends GraphNodeDatum = GraphNodeDatum, L extends GraphLinkDatum = GraphLinkDatum>(__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 onNodeClick?: ((node: N, event?: MouseEvent | undefined) => any) | undefined;
@@ -0,0 +1,2 @@
1
+ export { default as DagreGraph } from './DagreGraph.vue';
2
+ export * from './DagreGraph';
@@ -1,4 +1,5 @@
1
- import { BulletLegendItemInterface, TooltipConfig, LegendPosition } from '../../types';
1
+ import { BulletLegendItemInterface, TooltipConfig } from '../../types';
2
+ import { LegendPosition } from '../../enums';
2
3
  /**
3
4
  * Dagre layout direction options
4
5
  */
@@ -1,4 +1,9 @@
1
- import { BulletLegendItemInterface, LegendPosition, TooltipConfig } from '../../types';
1
+ import { BulletLegendItemInterface, TooltipConfig } from '../../types';
2
+ import { LegendPosition } from '../../enums';
3
+ export declare enum DonutType {
4
+ Half = "half",
5
+ Full = "full"
6
+ }
2
7
  export type DonutChartProps<T> = {
3
8
  /**
4
9
  * The type of donut chart to render.
@@ -17,7 +22,7 @@ export type DonutChartProps<T> = {
17
22
  /**
18
23
  * The height of the chart in pixels.
19
24
  */
20
- height?: number;
25
+ height: number;
21
26
  /**
22
27
  * The radius of the donut in pixels.
23
28
  */
@@ -61,8 +66,3 @@ export type DonutChartProps<T> = {
61
66
  */
62
67
  duration?: number;
63
68
  };
64
- declare enum DonutType {
65
- Half = "half",
66
- Full = "full"
67
- }
68
- export { DonutType };
@@ -1,9 +1,9 @@
1
- import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s, createElementBlock as y, openBlock as d, normalizeStyle as u, createVNode as a, createCommentVNode as c, createElementVNode as h, unref as i, withCtx as b, createBlock as N, renderSlot as f } from "vue";
1
+ import { defineComponent as L, useSlots as S, useTemplateRef as P, ref as W, computed as s, openBlock as d, createElementBlock as y, normalizeStyle as u, createVNode as a, unref as i, withCtx as b, createBlock as N, createCommentVNode as c, createElementVNode as h, renderSlot as f } from "vue";
2
2
  import { Donut as $ } from "@unovis/ts";
3
- import { DonutType as j } from "./types.js";
3
+ import { DonutType as j } from "./DonutChart2.js";
4
4
  import z from "../Tooltip.js";
5
5
  import { VisSingleContainer as H, VisTooltip as E, VisDonut as F, VisBulletLegend as O } from "@unovis/vue";
6
- import { LegendPosition as R } from "../../types.js";
6
+ import { LegendPosition as R } from "../../enums.js";
7
7
  const M = { style: {
8
8
  position: "absolute",
9
9
  top: "50%",
@@ -1,4 +1,4 @@
1
- import { DonutChartProps } from './types';
1
+ import { DonutChartProps } from './DonutChart';
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?: any) => any) | undefined;
@@ -1,4 +1,4 @@
1
- import f from "./DonutChart.js";
1
+ var r = /* @__PURE__ */ ((l) => (l.Half = "half", l.Full = "full", l))(r || {});
2
2
  export {
3
- f as default
3
+ r as DonutType
4
4
  };
@@ -0,0 +1,4 @@
1
+ import f from "./DonutChart.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export { default as DonutChart } from './DonutChart.vue';
2
+ export * from './DonutChart';