@antv/gpt-vis 1.3.2 → 1.4.0

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 (284) hide show
  1. package/README.md +261 -137
  2. package/README.zh-CN.md +263 -116
  3. package/dist/cjs/annotation/components/bottom-n.d.ts +2 -0
  4. package/dist/cjs/annotation/components/bottom-n.js +57 -0
  5. package/dist/cjs/annotation/components/centroid.d.ts +2 -0
  6. package/dist/cjs/annotation/components/centroid.js +75 -0
  7. package/dist/cjs/annotation/components/connector.d.ts +25 -0
  8. package/dist/cjs/annotation/components/connector.js +298 -0
  9. package/dist/cjs/annotation/components/contribution.d.ts +3 -0
  10. package/dist/cjs/annotation/components/contribution.js +136 -0
  11. package/dist/cjs/annotation/components/crossing.d.ts +3 -0
  12. package/dist/cjs/annotation/components/crossing.js +504 -0
  13. package/dist/cjs/annotation/components/event.d.ts +2 -0
  14. package/dist/cjs/annotation/components/event.js +62 -0
  15. package/dist/cjs/annotation/components/first.d.ts +2 -0
  16. package/dist/cjs/annotation/components/first.js +42 -0
  17. package/dist/cjs/annotation/components/group.d.ts +3 -0
  18. package/dist/cjs/annotation/components/group.js +73 -0
  19. package/dist/cjs/annotation/components/highlight.d.ts +14 -0
  20. package/dist/cjs/annotation/components/highlight.js +552 -0
  21. package/dist/cjs/annotation/components/index.d.ts +34 -0
  22. package/dist/cjs/annotation/components/index.js +128 -0
  23. package/dist/cjs/annotation/components/last.d.ts +2 -0
  24. package/dist/cjs/annotation/components/last.js +42 -0
  25. package/dist/cjs/annotation/components/max-x.d.ts +2 -0
  26. package/dist/cjs/annotation/components/max-x.js +41 -0
  27. package/dist/cjs/annotation/components/max-y.d.ts +2 -0
  28. package/dist/cjs/annotation/components/max-y.js +41 -0
  29. package/dist/cjs/annotation/components/mean.d.ts +2 -0
  30. package/dist/cjs/annotation/components/mean.js +50 -0
  31. package/dist/cjs/annotation/components/median.d.ts +2 -0
  32. package/dist/cjs/annotation/components/median.js +49 -0
  33. package/dist/cjs/annotation/components/min-x.d.ts +2 -0
  34. package/dist/cjs/annotation/components/min-x.js +41 -0
  35. package/dist/cjs/annotation/components/min-y.d.ts +2 -0
  36. package/dist/cjs/annotation/components/min-y.js +41 -0
  37. package/dist/cjs/annotation/components/outlier.d.ts +3 -0
  38. package/dist/cjs/annotation/components/outlier.js +83 -0
  39. package/dist/cjs/annotation/components/path.d.ts +20 -0
  40. package/dist/cjs/annotation/components/path.js +147 -0
  41. package/dist/cjs/annotation/components/peak.d.ts +2 -0
  42. package/dist/cjs/annotation/components/peak.js +42 -0
  43. package/dist/cjs/annotation/components/point.d.ts +26 -0
  44. package/dist/cjs/annotation/components/point.js +241 -0
  45. package/dist/cjs/annotation/components/quadrant.d.ts +3 -0
  46. package/dist/cjs/annotation/components/quadrant.js +97 -0
  47. package/dist/cjs/annotation/components/quantile.d.ts +2 -0
  48. package/dist/cjs/annotation/components/quantile.js +49 -0
  49. package/dist/cjs/annotation/components/range-inside.d.ts +2 -0
  50. package/dist/cjs/annotation/components/range-inside.js +65 -0
  51. package/dist/cjs/annotation/components/range-outside.d.ts +2 -0
  52. package/dist/cjs/annotation/components/range-outside.js +65 -0
  53. package/dist/cjs/annotation/components/range-x.d.ts +2 -0
  54. package/dist/cjs/annotation/components/range-x.js +39 -0
  55. package/dist/cjs/annotation/components/range-y.d.ts +2 -0
  56. package/dist/cjs/annotation/components/range-y.js +39 -0
  57. package/dist/cjs/annotation/components/range.d.ts +15 -0
  58. package/dist/cjs/annotation/components/range.js +87 -0
  59. package/dist/cjs/annotation/components/target.d.ts +2 -0
  60. package/dist/cjs/annotation/components/target.js +51 -0
  61. package/dist/cjs/annotation/components/text.d.ts +15 -0
  62. package/dist/cjs/annotation/components/text.js +74 -0
  63. package/dist/cjs/annotation/components/threshold-highlight.d.ts +3 -0
  64. package/dist/cjs/annotation/components/threshold-highlight.js +223 -0
  65. package/dist/cjs/annotation/components/threshold-x.d.ts +2 -0
  66. package/dist/cjs/annotation/components/threshold-x.js +39 -0
  67. package/dist/cjs/annotation/components/threshold-y.d.ts +2 -0
  68. package/dist/cjs/annotation/components/threshold-y.js +40 -0
  69. package/dist/cjs/annotation/components/top-n.d.ts +2 -0
  70. package/dist/cjs/annotation/components/top-n.js +57 -0
  71. package/dist/cjs/annotation/components/valley.d.ts +2 -0
  72. package/dist/cjs/annotation/components/valley.js +42 -0
  73. package/dist/cjs/annotation/index.d.ts +1 -0
  74. package/dist/cjs/annotation/index.js +29 -0
  75. package/dist/cjs/annotation/label.d.ts +38 -0
  76. package/dist/cjs/annotation/label.js +347 -0
  77. package/dist/cjs/annotation/layout.d.ts +12 -0
  78. package/dist/cjs/annotation/layout.js +142 -0
  79. package/dist/cjs/annotation/merge.d.ts +19 -0
  80. package/dist/cjs/annotation/merge.js +60 -0
  81. package/dist/cjs/annotation/registry.d.ts +190 -0
  82. package/dist/cjs/annotation/registry.js +134 -0
  83. package/dist/cjs/annotation/runtime/g2.d.ts +90 -0
  84. package/dist/cjs/annotation/runtime/g2.js +521 -0
  85. package/dist/cjs/annotation/runtime/g6.d.ts +40 -0
  86. package/dist/cjs/annotation/runtime/g6.js +310 -0
  87. package/dist/cjs/annotation/runtime/index.d.ts +11 -0
  88. package/dist/cjs/annotation/runtime/index.js +41 -0
  89. package/dist/cjs/annotation/runtime/summary.d.ts +17 -0
  90. package/dist/cjs/annotation/runtime/summary.js +39 -0
  91. package/dist/cjs/annotation/runtime/table.d.ts +16 -0
  92. package/dist/cjs/annotation/runtime/table.js +39 -0
  93. package/dist/cjs/annotation/utils.d.ts +40 -0
  94. package/dist/cjs/annotation/utils.js +275 -0
  95. package/dist/cjs/theme/annotation.d.ts +236 -0
  96. package/dist/cjs/theme/annotation.js +167 -0
  97. package/dist/cjs/theme/g2.js +13 -15
  98. package/dist/cjs/theme/g6.js +2 -2
  99. package/dist/cjs/theme/summary.js +2 -2
  100. package/dist/cjs/types/annotation.d.ts +310 -0
  101. package/dist/cjs/types/annotation.js +17 -0
  102. package/dist/cjs/types/index.d.ts +1 -0
  103. package/dist/cjs/util/axis.d.ts +28 -0
  104. package/dist/cjs/util/axis.js +184 -0
  105. package/dist/cjs/util/components.d.ts +0 -10
  106. package/dist/cjs/util/components.js +9 -64
  107. package/dist/cjs/util/index.d.ts +7 -4
  108. package/dist/cjs/util/index.js +53 -9
  109. package/dist/cjs/vis/area/index.d.ts +2 -0
  110. package/dist/cjs/vis/area/index.js +30 -13
  111. package/dist/cjs/vis/bar/index.d.ts +2 -0
  112. package/dist/cjs/vis/bar/index.js +37 -7
  113. package/dist/cjs/vis/boxplot/index.js +14 -3
  114. package/dist/cjs/vis/column/index.d.ts +2 -0
  115. package/dist/cjs/vis/column/index.js +28 -9
  116. package/dist/cjs/vis/dual-axes/index.js +9 -9
  117. package/dist/cjs/vis/fishbone-diagram/index.js +2 -2
  118. package/dist/cjs/vis/flow-diagram/index.js +2 -2
  119. package/dist/cjs/vis/funnel/index.js +10 -13
  120. package/dist/cjs/vis/histogram/index.js +2 -2
  121. package/dist/cjs/vis/indented-tree/index.js +2 -2
  122. package/dist/cjs/vis/line/index.d.ts +2 -0
  123. package/dist/cjs/vis/line/index.js +26 -10
  124. package/dist/cjs/vis/liquid/index.js +2 -2
  125. package/dist/cjs/vis/mindmap/index.js +2 -2
  126. package/dist/cjs/vis/network-graph/index.d.ts +2 -0
  127. package/dist/cjs/vis/network-graph/index.js +24 -3
  128. package/dist/cjs/vis/organization-chart/index.js +2 -2
  129. package/dist/cjs/vis/pie/index.d.ts +2 -0
  130. package/dist/cjs/vis/pie/index.js +21 -10
  131. package/dist/cjs/vis/radar/index.js +4 -6
  132. package/dist/cjs/vis/sankey/index.js +14 -1
  133. package/dist/cjs/vis/scatter/index.d.ts +10 -3
  134. package/dist/cjs/vis/scatter/index.js +18 -7
  135. package/dist/cjs/vis/summary/index.d.ts +9 -2
  136. package/dist/cjs/vis/summary/index.js +25 -8
  137. package/dist/cjs/vis/table/index.d.ts +2 -0
  138. package/dist/cjs/vis/table/index.js +48 -30
  139. package/dist/cjs/vis/venn/index.js +2 -2
  140. package/dist/cjs/vis/violin/index.js +14 -3
  141. package/dist/cjs/vis/waterfall/index.js +17 -9
  142. package/dist/cjs/vis/word-cloud/index.js +4 -6
  143. package/dist/esm/annotation/components/bottom-n.d.ts +2 -0
  144. package/dist/esm/annotation/components/bottom-n.js +42 -0
  145. package/dist/esm/annotation/components/centroid.d.ts +2 -0
  146. package/dist/esm/annotation/components/centroid.js +73 -0
  147. package/dist/esm/annotation/components/connector.d.ts +25 -0
  148. package/dist/esm/annotation/components/connector.js +332 -0
  149. package/dist/esm/annotation/components/contribution.d.ts +3 -0
  150. package/dist/esm/annotation/components/contribution.js +174 -0
  151. package/dist/esm/annotation/components/crossing.d.ts +3 -0
  152. package/dist/esm/annotation/components/crossing.js +665 -0
  153. package/dist/esm/annotation/components/event.d.ts +2 -0
  154. package/dist/esm/annotation/components/event.js +46 -0
  155. package/dist/esm/annotation/components/first.d.ts +2 -0
  156. package/dist/esm/annotation/components/first.js +18 -0
  157. package/dist/esm/annotation/components/group.d.ts +3 -0
  158. package/dist/esm/annotation/components/group.js +64 -0
  159. package/dist/esm/annotation/components/highlight.d.ts +14 -0
  160. package/dist/esm/annotation/components/highlight.js +838 -0
  161. package/dist/esm/annotation/components/index.d.ts +34 -0
  162. package/dist/esm/annotation/components/index.js +34 -0
  163. package/dist/esm/annotation/components/last.d.ts +2 -0
  164. package/dist/esm/annotation/components/last.js +18 -0
  165. package/dist/esm/annotation/components/max-x.d.ts +2 -0
  166. package/dist/esm/annotation/components/max-x.js +17 -0
  167. package/dist/esm/annotation/components/max-y.d.ts +2 -0
  168. package/dist/esm/annotation/components/max-y.js +17 -0
  169. package/dist/esm/annotation/components/mean.d.ts +2 -0
  170. package/dist/esm/annotation/components/mean.js +40 -0
  171. package/dist/esm/annotation/components/median.d.ts +2 -0
  172. package/dist/esm/annotation/components/median.js +32 -0
  173. package/dist/esm/annotation/components/min-x.d.ts +2 -0
  174. package/dist/esm/annotation/components/min-x.js +17 -0
  175. package/dist/esm/annotation/components/min-y.d.ts +2 -0
  176. package/dist/esm/annotation/components/min-y.js +17 -0
  177. package/dist/esm/annotation/components/outlier.d.ts +3 -0
  178. package/dist/esm/annotation/components/outlier.js +98 -0
  179. package/dist/esm/annotation/components/path.d.ts +20 -0
  180. package/dist/esm/annotation/components/path.js +165 -0
  181. package/dist/esm/annotation/components/peak.d.ts +2 -0
  182. package/dist/esm/annotation/components/peak.js +20 -0
  183. package/dist/esm/annotation/components/point.d.ts +26 -0
  184. package/dist/esm/annotation/components/point.js +277 -0
  185. package/dist/esm/annotation/components/quadrant.d.ts +3 -0
  186. package/dist/esm/annotation/components/quadrant.js +83 -0
  187. package/dist/esm/annotation/components/quantile.d.ts +2 -0
  188. package/dist/esm/annotation/components/quantile.js +32 -0
  189. package/dist/esm/annotation/components/range-inside.d.ts +2 -0
  190. package/dist/esm/annotation/components/range-inside.js +55 -0
  191. package/dist/esm/annotation/components/range-outside.d.ts +2 -0
  192. package/dist/esm/annotation/components/range-outside.js +55 -0
  193. package/dist/esm/annotation/components/range-x.d.ts +2 -0
  194. package/dist/esm/annotation/components/range-x.js +15 -0
  195. package/dist/esm/annotation/components/range-y.d.ts +2 -0
  196. package/dist/esm/annotation/components/range-y.js +15 -0
  197. package/dist/esm/annotation/components/range.d.ts +15 -0
  198. package/dist/esm/annotation/components/range.js +92 -0
  199. package/dist/esm/annotation/components/target.d.ts +2 -0
  200. package/dist/esm/annotation/components/target.js +44 -0
  201. package/dist/esm/annotation/components/text.d.ts +15 -0
  202. package/dist/esm/annotation/components/text.js +78 -0
  203. package/dist/esm/annotation/components/threshold-highlight.d.ts +3 -0
  204. package/dist/esm/annotation/components/threshold-highlight.js +297 -0
  205. package/dist/esm/annotation/components/threshold-x.d.ts +2 -0
  206. package/dist/esm/annotation/components/threshold-x.js +23 -0
  207. package/dist/esm/annotation/components/threshold-y.d.ts +2 -0
  208. package/dist/esm/annotation/components/threshold-y.js +24 -0
  209. package/dist/esm/annotation/components/top-n.d.ts +2 -0
  210. package/dist/esm/annotation/components/top-n.js +42 -0
  211. package/dist/esm/annotation/components/valley.d.ts +2 -0
  212. package/dist/esm/annotation/components/valley.js +20 -0
  213. package/dist/esm/annotation/index.d.ts +1 -0
  214. package/dist/esm/annotation/index.js +1 -0
  215. package/dist/esm/annotation/label.d.ts +38 -0
  216. package/dist/esm/annotation/label.js +449 -0
  217. package/dist/esm/annotation/layout.d.ts +12 -0
  218. package/dist/esm/annotation/layout.js +182 -0
  219. package/dist/esm/annotation/merge.d.ts +19 -0
  220. package/dist/esm/annotation/merge.js +67 -0
  221. package/dist/esm/annotation/registry.d.ts +190 -0
  222. package/dist/esm/annotation/registry.js +220 -0
  223. package/dist/esm/annotation/runtime/g2.d.ts +90 -0
  224. package/dist/esm/annotation/runtime/g2.js +754 -0
  225. package/dist/esm/annotation/runtime/g6.d.ts +40 -0
  226. package/dist/esm/annotation/runtime/g6.js +447 -0
  227. package/dist/esm/annotation/runtime/index.d.ts +11 -0
  228. package/dist/esm/annotation/runtime/index.js +26 -0
  229. package/dist/esm/annotation/runtime/summary.d.ts +17 -0
  230. package/dist/esm/annotation/runtime/summary.js +21 -0
  231. package/dist/esm/annotation/runtime/table.d.ts +16 -0
  232. package/dist/esm/annotation/runtime/table.js +21 -0
  233. package/dist/esm/annotation/utils.d.ts +40 -0
  234. package/dist/esm/annotation/utils.js +370 -0
  235. package/dist/esm/theme/annotation.d.ts +236 -0
  236. package/dist/esm/theme/annotation.js +186 -0
  237. package/dist/esm/theme/g2.js +2 -10
  238. package/dist/esm/theme/g6.js +1 -1
  239. package/dist/esm/theme/summary.js +1 -1
  240. package/dist/esm/types/annotation.d.ts +310 -0
  241. package/dist/esm/types/annotation.js +1 -0
  242. package/dist/esm/types/index.d.ts +1 -0
  243. package/dist/esm/util/axis.d.ts +28 -0
  244. package/dist/esm/util/axis.js +222 -0
  245. package/dist/esm/util/components.d.ts +0 -10
  246. package/dist/esm/util/components.js +24 -69
  247. package/dist/esm/util/index.d.ts +7 -4
  248. package/dist/esm/util/index.js +7 -4
  249. package/dist/esm/vis/area/index.d.ts +2 -0
  250. package/dist/esm/vis/area/index.js +32 -9
  251. package/dist/esm/vis/bar/index.d.ts +2 -0
  252. package/dist/esm/vis/bar/index.js +37 -6
  253. package/dist/esm/vis/boxplot/index.js +10 -2
  254. package/dist/esm/vis/column/index.d.ts +2 -0
  255. package/dist/esm/vis/column/index.js +33 -12
  256. package/dist/esm/vis/dual-axes/index.js +10 -10
  257. package/dist/esm/vis/fishbone-diagram/index.js +1 -1
  258. package/dist/esm/vis/flow-diagram/index.js +1 -1
  259. package/dist/esm/vis/funnel/index.js +2 -7
  260. package/dist/esm/vis/histogram/index.js +4 -3
  261. package/dist/esm/vis/indented-tree/index.js +1 -1
  262. package/dist/esm/vis/line/index.d.ts +2 -0
  263. package/dist/esm/vis/line/index.js +31 -9
  264. package/dist/esm/vis/liquid/index.js +1 -1
  265. package/dist/esm/vis/mindmap/index.js +1 -1
  266. package/dist/esm/vis/network-graph/index.d.ts +2 -0
  267. package/dist/esm/vis/network-graph/index.js +29 -2
  268. package/dist/esm/vis/organization-chart/index.js +1 -1
  269. package/dist/esm/vis/pie/index.d.ts +2 -0
  270. package/dist/esm/vis/pie/index.js +25 -8
  271. package/dist/esm/vis/radar/index.js +1 -3
  272. package/dist/esm/vis/sankey/index.js +15 -1
  273. package/dist/esm/vis/scatter/index.d.ts +10 -3
  274. package/dist/esm/vis/scatter/index.js +28 -5
  275. package/dist/esm/vis/summary/index.d.ts +9 -2
  276. package/dist/esm/vis/summary/index.js +31 -13
  277. package/dist/esm/vis/table/index.d.ts +2 -0
  278. package/dist/esm/vis/table/index.js +50 -33
  279. package/dist/esm/vis/venn/index.js +1 -1
  280. package/dist/esm/vis/violin/index.js +10 -2
  281. package/dist/esm/vis/waterfall/index.js +16 -13
  282. package/dist/esm/vis/word-cloud/index.js +1 -3
  283. package/dist/umd/index.min.js +1 -1
  284. package/package.json +1 -1
@@ -0,0 +1,128 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target2, all) => {
6
+ for (var name in all)
7
+ __defProp(target2, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/index.ts
20
+ var components_exports = {};
21
+ __export(components_exports, {
22
+ bottomN: () => import_bottom_n.bottomN,
23
+ centroid: () => import_centroid.centroid,
24
+ connector: () => import_connector.connector,
25
+ contribution: () => import_contribution.contribution,
26
+ crossing: () => import_crossing.crossing,
27
+ event: () => import_event.event,
28
+ first: () => import_first.first,
29
+ group: () => import_group.group,
30
+ highlight: () => import_highlight.highlight,
31
+ last: () => import_last.last,
32
+ maxX: () => import_max_x.maxX,
33
+ maxY: () => import_max_y.maxY,
34
+ mean: () => import_mean.mean,
35
+ median: () => import_median.median,
36
+ minX: () => import_min_x.minX,
37
+ minY: () => import_min_y.minY,
38
+ outlier: () => import_outlier.outlier,
39
+ path: () => import_path.path,
40
+ peak: () => import_peak.peak,
41
+ point: () => import_point.point,
42
+ quadrant: () => import_quadrant.quadrant,
43
+ quantile: () => import_quantile.quantile,
44
+ range: () => import_range.range,
45
+ rangeInside: () => import_range_inside.rangeInside,
46
+ rangeOutside: () => import_range_outside.rangeOutside,
47
+ rangeX: () => import_range_x.rangeX,
48
+ rangeY: () => import_range_y.rangeY,
49
+ target: () => import_target.target,
50
+ text: () => import_text.text,
51
+ thresholdHighlight: () => import_threshold_highlight.thresholdHighlight,
52
+ thresholdX: () => import_threshold_x.thresholdX,
53
+ thresholdY: () => import_threshold_y.thresholdY,
54
+ topN: () => import_top_n.topN,
55
+ valley: () => import_valley.valley
56
+ });
57
+ module.exports = __toCommonJS(components_exports);
58
+ var import_bottom_n = require("./bottom-n");
59
+ var import_centroid = require("./centroid");
60
+ var import_connector = require("./connector");
61
+ var import_contribution = require("./contribution");
62
+ var import_crossing = require("./crossing");
63
+ var import_event = require("./event");
64
+ var import_first = require("./first");
65
+ var import_group = require("./group");
66
+ var import_highlight = require("./highlight");
67
+ var import_last = require("./last");
68
+ var import_max_x = require("./max-x");
69
+ var import_max_y = require("./max-y");
70
+ var import_mean = require("./mean");
71
+ var import_median = require("./median");
72
+ var import_min_x = require("./min-x");
73
+ var import_min_y = require("./min-y");
74
+ var import_outlier = require("./outlier");
75
+ var import_path = require("./path");
76
+ var import_peak = require("./peak");
77
+ var import_point = require("./point");
78
+ var import_quadrant = require("./quadrant");
79
+ var import_quantile = require("./quantile");
80
+ var import_range = require("./range");
81
+ var import_range_inside = require("./range-inside");
82
+ var import_range_outside = require("./range-outside");
83
+ var import_range_x = require("./range-x");
84
+ var import_range_y = require("./range-y");
85
+ var import_target = require("./target");
86
+ var import_text = require("./text");
87
+ var import_threshold_highlight = require("./threshold-highlight");
88
+ var import_threshold_x = require("./threshold-x");
89
+ var import_threshold_y = require("./threshold-y");
90
+ var import_top_n = require("./top-n");
91
+ var import_valley = require("./valley");
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ bottomN,
95
+ centroid,
96
+ connector,
97
+ contribution,
98
+ crossing,
99
+ event,
100
+ first,
101
+ group,
102
+ highlight,
103
+ last,
104
+ maxX,
105
+ maxY,
106
+ mean,
107
+ median,
108
+ minX,
109
+ minY,
110
+ outlier,
111
+ path,
112
+ peak,
113
+ point,
114
+ quadrant,
115
+ quantile,
116
+ range,
117
+ rangeInside,
118
+ rangeOutside,
119
+ rangeX,
120
+ rangeY,
121
+ target,
122
+ text,
123
+ thresholdHighlight,
124
+ thresholdX,
125
+ thresholdY,
126
+ topN,
127
+ valley
128
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const last: AnnotationComponent<'last', 'g2'>;
@@ -0,0 +1,42 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/last.ts
20
+ var last_exports = {};
21
+ __export(last_exports, {
22
+ last: () => last
23
+ });
24
+ module.exports = __toCommonJS(last_exports);
25
+ var import_utils = require("../utils");
26
+ var import_highlight = require("./highlight");
27
+ var last = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap((annotation) => {
29
+ const rows = (0, import_utils.selectRows)(mapping.data, annotation.data);
30
+ return rows.slice(-1).flatMap(
31
+ (row) => import_highlight.highlight.create({
32
+ data: [row],
33
+ label: annotation.label ?? `Last: ${row[mapping.y]}`,
34
+ style: annotation.style
35
+ })
36
+ );
37
+ })
38
+ };
39
+ // Annotate the CommonJS export names for ESM import in node:
40
+ 0 && (module.exports = {
41
+ last
42
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const maxX: AnnotationComponent<'maxX', 'g2'>;
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/max-x.ts
20
+ var max_x_exports = {};
21
+ __export(max_x_exports, {
22
+ maxX: () => maxX
23
+ });
24
+ module.exports = __toCommonJS(max_x_exports);
25
+ var import_utils = require("../utils");
26
+ var import_highlight = require("./highlight");
27
+ var maxX = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap(
29
+ (annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.x, true, true).flatMap(
30
+ (row) => import_highlight.highlight.create({
31
+ data: [row],
32
+ label: annotation.label ?? `Max X: ${row[mapping.x]}`,
33
+ style: annotation.style
34
+ })
35
+ )
36
+ )
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ maxX
41
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const maxY: AnnotationComponent<'maxY', 'g2'>;
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/max-y.ts
20
+ var max_y_exports = {};
21
+ __export(max_y_exports, {
22
+ maxY: () => maxY
23
+ });
24
+ module.exports = __toCommonJS(max_y_exports);
25
+ var import_utils = require("../utils");
26
+ var import_highlight = require("./highlight");
27
+ var maxY = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap(
29
+ (annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.y, true, false).flatMap(
30
+ (row) => import_highlight.highlight.create({
31
+ data: [row],
32
+ label: annotation.label ?? `Max Y: ${row[mapping.y]}`,
33
+ style: annotation.style
34
+ })
35
+ )
36
+ )
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ maxY
41
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const mean: AnnotationComponent<'mean'>;
@@ -0,0 +1,50 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/mean.ts
20
+ var mean_exports = {};
21
+ __export(mean_exports, {
22
+ mean: () => mean
23
+ });
24
+ module.exports = __toCommonJS(mean_exports);
25
+ var import_utils = require("../utils");
26
+ var import_path = require("./path");
27
+ var mean = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap((annotation) => {
29
+ const field = (0, import_utils.annotationField)(mapping, annotation.axis);
30
+ const values = (0, import_utils.numericRows)((0, import_utils.selectRows)(mapping.data, annotation.data), field).map(
31
+ ({ value: value2 }) => value2
32
+ );
33
+ if (!values.length)
34
+ return [];
35
+ const value = meanValue(values);
36
+ return import_path.path.create({
37
+ data: (0, import_utils.axisPosition)(field, value),
38
+ label: annotation.label ?? `Mean: ${(0, import_utils.formatNumber)(value)}`,
39
+ style: { lineDash: [4, 4], ...annotation.style }
40
+ });
41
+ })
42
+ };
43
+ function meanValue(values) {
44
+ const scale = values.reduce((max, value) => Math.max(max, Math.abs(value)), 0);
45
+ return scale === 0 ? 0 : values.reduce((sum, value) => sum + value / scale / values.length, 0) * scale;
46
+ }
47
+ // Annotate the CommonJS export names for ESM import in node:
48
+ 0 && (module.exports = {
49
+ mean
50
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const median: AnnotationComponent<'median'>;
@@ -0,0 +1,49 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/median.ts
20
+ var median_exports = {};
21
+ __export(median_exports, {
22
+ median: () => median
23
+ });
24
+ module.exports = __toCommonJS(median_exports);
25
+ var import_utils = require("../utils");
26
+ var import_path = require("./path");
27
+ var median = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap((annotation) => {
29
+ const field = (0, import_utils.annotationField)(mapping, annotation.axis);
30
+ const values = (0, import_utils.numericRows)((0, import_utils.selectRows)(mapping.data, annotation.data), field).map(
31
+ ({ value: value2 }) => value2
32
+ );
33
+ if (!values.length)
34
+ return [];
35
+ const value = (0, import_utils.quantileValue)(
36
+ values.sort((a, b) => a - b),
37
+ 0.5
38
+ );
39
+ return import_path.path.create({
40
+ data: (0, import_utils.axisPosition)(field, value),
41
+ label: annotation.label ?? `Median: ${(0, import_utils.formatNumber)(value)}`,
42
+ style: { lineDash: [4, 4], ...annotation.style }
43
+ });
44
+ })
45
+ };
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ median
49
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const minX: AnnotationComponent<'minX', 'g2'>;
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/min-x.ts
20
+ var min_x_exports = {};
21
+ __export(min_x_exports, {
22
+ minX: () => minX
23
+ });
24
+ module.exports = __toCommonJS(min_x_exports);
25
+ var import_utils = require("../utils");
26
+ var import_highlight = require("./highlight");
27
+ var minX = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap(
29
+ (annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.x, false, true).flatMap(
30
+ (row) => import_highlight.highlight.create({
31
+ data: [row],
32
+ label: annotation.label ?? `Min X: ${row[mapping.x]}`,
33
+ style: annotation.style
34
+ })
35
+ )
36
+ )
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ minX
41
+ });
@@ -0,0 +1,2 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ export declare const minY: AnnotationComponent<'minY', 'g2'>;
@@ -0,0 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/min-y.ts
20
+ var min_y_exports = {};
21
+ __export(min_y_exports, {
22
+ minY: () => minY
23
+ });
24
+ module.exports = __toCommonJS(min_y_exports);
25
+ var import_utils = require("../utils");
26
+ var import_highlight = require("./highlight");
27
+ var minY = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap(
29
+ (annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.y, false, false).flatMap(
30
+ (row) => import_highlight.highlight.create({
31
+ data: [row],
32
+ label: annotation.label ?? `Min Y: ${row[mapping.y]}`,
33
+ style: annotation.style
34
+ })
35
+ )
36
+ )
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ minY
41
+ });
@@ -0,0 +1,3 @@
1
+ import type { AnnotationComponent } from '../registry';
2
+ /** Tukey's IQR fences, matching G2 boxplots; each series is analyzed independently. */
3
+ export declare const outlier: AnnotationComponent<'outlier', 'g2' | 'table'>;
@@ -0,0 +1,83 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/annotation/components/outlier.ts
20
+ var outlier_exports = {};
21
+ __export(outlier_exports, {
22
+ outlier: () => outlier
23
+ });
24
+ module.exports = __toCommonJS(outlier_exports);
25
+ var import_utils = require("../utils");
26
+ var import_highlight = require("./highlight");
27
+ var outlier = {
28
+ g2: (annotations, { mapping }) => annotations.flatMap(
29
+ (annotation) => selectOutliers(
30
+ (0, import_utils.selectRows)(mapping.data, annotation.data),
31
+ mapping.y,
32
+ annotation.factor,
33
+ mapping.series
34
+ ).flatMap(
35
+ (row) => import_highlight.highlight.create({
36
+ data: [row],
37
+ label: annotation.label ?? `Outlier: ${row[mapping.y]}`,
38
+ style: annotation.style
39
+ })
40
+ )
41
+ ),
42
+ table: (annotations, { data }) => annotations.flatMap(
43
+ (annotation) => selectOutliers(
44
+ (0, import_utils.selectRows)(data, annotation.data.row),
45
+ annotation.data.field,
46
+ annotation.factor
47
+ ).flatMap(
48
+ (row) => import_highlight.highlight.create({
49
+ data: [{ row, column: annotation.data.column }],
50
+ label: annotation.label ?? `Outlier: ${row[annotation.data.field]}`,
51
+ style: annotation.style
52
+ })
53
+ )
54
+ )
55
+ };
56
+ function selectOutliers(data, field, factor = 1.5, series) {
57
+ if (!Number.isFinite(factor) || factor <= 0)
58
+ throw new Error("Invalid annotation: outlier factor must be positive and finite.");
59
+ const groups = /* @__PURE__ */ new Map();
60
+ for (const item of (0, import_utils.numericRows)(data, field)) {
61
+ const key = series ? item.row[series] : void 0;
62
+ if (!groups.has(key))
63
+ groups.set(key, []);
64
+ groups.get(key).push(item);
65
+ }
66
+ const selected = /* @__PURE__ */ new Set();
67
+ for (const items of groups.values()) {
68
+ if (items.length < 4)
69
+ continue;
70
+ const values = items.map(({ value }) => value).sort((a, b) => a - b);
71
+ const q1 = (0, import_utils.quantileValue)(values, 0.25);
72
+ const q3 = (0, import_utils.quantileValue)(values, 0.75);
73
+ const spread = factor * (q3 - q1);
74
+ for (const { row, value } of items)
75
+ if (value < q1 - spread || value > q3 + spread)
76
+ selected.add(row);
77
+ }
78
+ return data.filter((row) => selected.has(row));
79
+ }
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ outlier
83
+ });
@@ -0,0 +1,20 @@
1
+ import type { Annotation } from '../../types/annotation';
2
+ import type { Point } from '../layout';
3
+ import type { AnnotationComponent } from '../registry';
4
+ import type { G2AnnotationContext } from '../runtime';
5
+ /** One axis value spans a chart; multiple anchors form an ordered path. */
6
+ export declare const path: AnnotationComponent<'path', 'g2' | 'g6'> & {
7
+ create: typeof createPath;
8
+ };
9
+ type Region = {
10
+ fill: string;
11
+ fillOpacity: number;
12
+ visible?: () => boolean;
13
+ positions?: (context: Pick<G2AnnotationContext<object>, 'library' | 'axisValue' | 'getScene'>, coordinate: Parameters<G2AnnotationContext<object>['position']>[1]) => Point[][];
14
+ };
15
+ declare function createPath<T extends object>(options: Omit<Extract<Annotation<T>, {
16
+ type: 'path';
17
+ }>, 'type'>, region?: Region): Extract<Annotation<T>, {
18
+ type: 'path';
19
+ }>[];
20
+ export {};