@antv/gpt-vis 0.6.1 → 1.0.0-beta.2

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 (524) hide show
  1. package/README.md +185 -114
  2. package/README.zh-CN.md +187 -112
  3. package/dist/cjs/gpt-vis/index.d.ts +115 -0
  4. package/dist/cjs/gpt-vis/index.js +196 -0
  5. package/dist/cjs/index.d.ts +57 -13
  6. package/dist/cjs/index.js +85 -35
  7. package/dist/cjs/syntax/index.d.ts +2 -0
  8. package/dist/cjs/{Text/mini-charts/hooks → syntax}/index.js +9 -7
  9. package/dist/cjs/syntax/parser.d.ts +82 -0
  10. package/dist/cjs/syntax/parser.js +348 -0
  11. package/dist/cjs/types/index.d.ts +33 -2
  12. package/dist/cjs/types/index.js +0 -6
  13. package/dist/cjs/util/container.d.ts +5 -0
  14. package/dist/cjs/{utils/map/util.js → util/container.js} +18 -13
  15. package/dist/cjs/util/theme.d.ts +26 -0
  16. package/dist/cjs/{theme.js → util/theme.js} +70 -14
  17. package/dist/cjs/vis/area/index.d.ts +60 -0
  18. package/dist/cjs/vis/area/index.js +152 -0
  19. package/dist/cjs/vis/bar/index.d.ts +60 -0
  20. package/dist/cjs/vis/bar/index.js +123 -0
  21. package/dist/cjs/vis/boxplot/index.d.ts +59 -0
  22. package/dist/cjs/vis/boxplot/index.js +111 -0
  23. package/dist/cjs/vis/column/index.d.ts +60 -0
  24. package/dist/cjs/vis/column/index.js +122 -0
  25. package/dist/cjs/vis/dual-axes/index.d.ts +64 -0
  26. package/dist/cjs/vis/dual-axes/index.js +148 -0
  27. package/dist/cjs/vis/fishbone-diagram/index.d.ts +35 -0
  28. package/dist/cjs/vis/fishbone-diagram/index.js +183 -0
  29. package/dist/cjs/vis/flow-diagram/index.d.ts +27 -0
  30. package/dist/cjs/vis/flow-diagram/index.js +271 -0
  31. package/dist/cjs/vis/funnel/index.d.ts +54 -0
  32. package/dist/cjs/vis/funnel/index.js +190 -0
  33. package/dist/cjs/vis/histogram/index.d.ts +47 -0
  34. package/dist/cjs/vis/histogram/index.js +108 -0
  35. package/dist/cjs/vis/indented-tree/index.d.ts +40 -0
  36. package/dist/cjs/vis/indented-tree/index.js +375 -0
  37. package/dist/cjs/vis/line/index.d.ts +59 -0
  38. package/dist/cjs/vis/line/index.js +105 -0
  39. package/dist/cjs/vis/liquid/index.d.ts +44 -0
  40. package/dist/cjs/vis/liquid/index.js +88 -0
  41. package/dist/cjs/vis/mindmap/index.d.ts +32 -0
  42. package/dist/cjs/vis/mindmap/index.js +214 -0
  43. package/dist/cjs/vis/network-graph/index.d.ts +59 -0
  44. package/dist/cjs/vis/network-graph/index.js +166 -0
  45. package/dist/cjs/vis/organization-chart/index.d.ts +64 -0
  46. package/dist/cjs/vis/organization-chart/index.js +191 -0
  47. package/dist/cjs/vis/pie/index.d.ts +55 -0
  48. package/dist/cjs/vis/pie/index.js +108 -0
  49. package/dist/cjs/vis/radar/index.d.ts +58 -0
  50. package/dist/cjs/vis/radar/index.js +153 -0
  51. package/dist/cjs/vis/sankey/index.d.ts +56 -0
  52. package/dist/cjs/vis/sankey/index.js +94 -0
  53. package/dist/cjs/vis/scatter/index.d.ts +54 -0
  54. package/dist/cjs/vis/scatter/index.js +95 -0
  55. package/dist/cjs/vis/summary/index.d.ts +41 -0
  56. package/dist/cjs/vis/summary/index.js +71 -0
  57. package/dist/cjs/vis/table/index.d.ts +50 -0
  58. package/dist/cjs/vis/table/index.js +209 -0
  59. package/dist/cjs/vis/treemap/index.d.ts +68 -0
  60. package/dist/cjs/vis/treemap/index.js +106 -0
  61. package/dist/cjs/vis/venn/index.d.ts +55 -0
  62. package/dist/cjs/vis/venn/index.js +115 -0
  63. package/dist/cjs/vis/violin/index.d.ts +59 -0
  64. package/dist/cjs/vis/violin/index.js +156 -0
  65. package/dist/cjs/vis/waterfall/index.d.ts +64 -0
  66. package/dist/cjs/vis/waterfall/index.js +195 -0
  67. package/dist/cjs/vis/word-cloud/index.d.ts +53 -0
  68. package/dist/cjs/vis/word-cloud/index.js +90 -0
  69. package/dist/cjs/vis-wrapper/icons.d.ts +8 -0
  70. package/dist/cjs/vis-wrapper/icons.js +63 -0
  71. package/dist/cjs/vis-wrapper/index.d.ts +25 -0
  72. package/dist/cjs/vis-wrapper/index.js +242 -0
  73. package/dist/cjs/vis-wrapper/styles.d.ts +8 -0
  74. package/dist/cjs/vis-wrapper/styles.js +221 -0
  75. package/dist/esm/gpt-vis/index.d.ts +115 -0
  76. package/dist/esm/gpt-vis/index.js +245 -0
  77. package/dist/esm/index.d.ts +57 -13
  78. package/dist/esm/index.js +28 -15
  79. package/dist/esm/syntax/index.d.ts +2 -0
  80. package/dist/esm/syntax/index.js +1 -0
  81. package/dist/esm/syntax/parser.d.ts +82 -0
  82. package/dist/esm/syntax/parser.js +559 -0
  83. package/dist/esm/types/index.d.ts +33 -2
  84. package/dist/esm/types/index.js +0 -1
  85. package/dist/esm/util/container.d.ts +5 -0
  86. package/dist/esm/util/container.js +20 -0
  87. package/dist/esm/util/theme.d.ts +26 -0
  88. package/dist/esm/util/theme.js +150 -0
  89. package/dist/esm/vis/area/index.d.ts +60 -0
  90. package/dist/esm/vis/area/index.js +231 -0
  91. package/dist/esm/vis/bar/index.d.ts +60 -0
  92. package/dist/esm/vis/bar/index.js +204 -0
  93. package/dist/esm/vis/boxplot/index.d.ts +59 -0
  94. package/dist/esm/vis/boxplot/index.js +177 -0
  95. package/dist/esm/vis/column/index.d.ts +60 -0
  96. package/dist/esm/vis/column/index.js +199 -0
  97. package/dist/esm/vis/dual-axes/index.d.ts +64 -0
  98. package/dist/esm/vis/dual-axes/index.js +235 -0
  99. package/dist/esm/vis/fishbone-diagram/index.d.ts +35 -0
  100. package/dist/esm/vis/fishbone-diagram/index.js +218 -0
  101. package/dist/esm/vis/flow-diagram/index.d.ts +27 -0
  102. package/dist/esm/vis/flow-diagram/index.js +342 -0
  103. package/dist/esm/vis/funnel/index.d.ts +54 -0
  104. package/dist/esm/vis/funnel/index.js +247 -0
  105. package/dist/esm/vis/histogram/index.d.ts +47 -0
  106. package/dist/esm/vis/histogram/index.js +147 -0
  107. package/dist/esm/vis/indented-tree/index.d.ts +40 -0
  108. package/dist/esm/vis/indented-tree/index.js +564 -0
  109. package/dist/esm/vis/line/index.d.ts +59 -0
  110. package/dist/esm/vis/line/index.js +173 -0
  111. package/dist/esm/vis/liquid/index.d.ts +44 -0
  112. package/dist/esm/vis/liquid/index.js +131 -0
  113. package/dist/esm/vis/mindmap/index.d.ts +32 -0
  114. package/dist/esm/vis/mindmap/index.js +315 -0
  115. package/dist/esm/vis/network-graph/index.d.ts +59 -0
  116. package/dist/esm/vis/network-graph/index.js +240 -0
  117. package/dist/esm/vis/organization-chart/index.d.ts +64 -0
  118. package/dist/esm/vis/organization-chart/index.js +269 -0
  119. package/dist/esm/vis/pie/index.d.ts +55 -0
  120. package/dist/esm/vis/pie/index.js +164 -0
  121. package/dist/esm/vis/radar/index.d.ts +58 -0
  122. package/dist/esm/vis/radar/index.js +238 -0
  123. package/dist/esm/vis/sankey/index.d.ts +56 -0
  124. package/dist/esm/vis/sankey/index.js +136 -0
  125. package/dist/esm/vis/scatter/index.d.ts +54 -0
  126. package/dist/esm/vis/scatter/index.js +159 -0
  127. package/dist/esm/vis/summary/index.d.ts +41 -0
  128. package/dist/esm/vis/summary/index.js +101 -0
  129. package/dist/esm/vis/table/index.d.ts +50 -0
  130. package/dist/esm/vis/table/index.js +167 -0
  131. package/dist/esm/vis/treemap/index.d.ts +68 -0
  132. package/dist/esm/vis/treemap/index.js +159 -0
  133. package/dist/esm/vis/venn/index.d.ts +55 -0
  134. package/dist/esm/vis/venn/index.js +167 -0
  135. package/dist/esm/vis/violin/index.d.ts +59 -0
  136. package/dist/esm/vis/violin/index.js +246 -0
  137. package/dist/esm/vis/waterfall/index.d.ts +64 -0
  138. package/dist/esm/vis/waterfall/index.js +263 -0
  139. package/dist/esm/vis/word-cloud/index.d.ts +53 -0
  140. package/dist/esm/vis/word-cloud/index.js +129 -0
  141. package/dist/esm/vis-wrapper/icons.d.ts +8 -0
  142. package/dist/esm/vis-wrapper/icons.js +29 -0
  143. package/dist/esm/vis-wrapper/index.d.ts +25 -0
  144. package/dist/esm/vis-wrapper/index.js +242 -0
  145. package/dist/esm/vis-wrapper/styles.d.ts +8 -0
  146. package/dist/esm/vis-wrapper/styles.js +21 -0
  147. package/dist/umd/index.min.js +1 -1
  148. package/package.json +18 -59
  149. package/README.ja-JP.md +0 -164
  150. package/dist/cjs/Area/index.d.ts +0 -11
  151. package/dist/cjs/Area/index.js +0 -105
  152. package/dist/cjs/Bar/index.d.ts +0 -14
  153. package/dist/cjs/Bar/index.js +0 -101
  154. package/dist/cjs/Boxplot/index.d.ts +0 -11
  155. package/dist/cjs/Boxplot/index.js +0 -88
  156. package/dist/cjs/ChartCodeRender/Loading.d.ts +0 -6
  157. package/dist/cjs/ChartCodeRender/Loading.js +0 -54
  158. package/dist/cjs/ChartCodeRender/VisChart.d.ts +0 -19
  159. package/dist/cjs/ChartCodeRender/VisChart.js +0 -338
  160. package/dist/cjs/ChartCodeRender/icon.d.ts +0 -10
  161. package/dist/cjs/ChartCodeRender/icon.js +0 -162
  162. package/dist/cjs/ChartCodeRender/index.d.ts +0 -8
  163. package/dist/cjs/ChartCodeRender/index.js +0 -113
  164. package/dist/cjs/ChartCodeRender/styles.d.ts +0 -19
  165. package/dist/cjs/ChartCodeRender/styles.js +0 -232
  166. package/dist/cjs/ChartCodeRender/type.d.ts +0 -176
  167. package/dist/cjs/ChartCodeRender/type.js +0 -17
  168. package/dist/cjs/ChartCodeRender/utils.d.ts +0 -1
  169. package/dist/cjs/ChartCodeRender/utils.js +0 -51
  170. package/dist/cjs/Column/index.d.ts +0 -14
  171. package/dist/cjs/Column/index.js +0 -102
  172. package/dist/cjs/ConfigProvider/context.d.ts +0 -3
  173. package/dist/cjs/ConfigProvider/context.js +0 -41
  174. package/dist/cjs/ConfigProvider/hooks/index.d.ts +0 -1
  175. package/dist/cjs/ConfigProvider/hooks/index.js +0 -23
  176. package/dist/cjs/ConfigProvider/hooks/useConfig.d.ts +0 -13
  177. package/dist/cjs/ConfigProvider/hooks/useConfig.js +0 -109
  178. package/dist/cjs/ConfigProvider/index.d.ts +0 -7
  179. package/dist/cjs/ConfigProvider/index.js +0 -43
  180. package/dist/cjs/DualAxes/index.d.ts +0 -20
  181. package/dist/cjs/DualAxes/index.js +0 -84
  182. package/dist/cjs/DualAxes/util.d.ts +0 -9
  183. package/dist/cjs/DualAxes/util.js +0 -77
  184. package/dist/cjs/FishboneDiagram/index.d.ts +0 -7
  185. package/dist/cjs/FishboneDiagram/index.js +0 -66
  186. package/dist/cjs/FlowDiagram/helper.d.ts +0 -7
  187. package/dist/cjs/FlowDiagram/helper.js +0 -83
  188. package/dist/cjs/FlowDiagram/index.d.ts +0 -6
  189. package/dist/cjs/FlowDiagram/index.js +0 -107
  190. package/dist/cjs/Funnel/index.d.ts +0 -12
  191. package/dist/cjs/Funnel/index.js +0 -173
  192. package/dist/cjs/GPTVis/Lite.d.ts +0 -19
  193. package/dist/cjs/GPTVis/Lite.js +0 -81
  194. package/dist/cjs/GPTVis/hooks/useContext.d.ts +0 -8
  195. package/dist/cjs/GPTVis/hooks/useContext.js +0 -49
  196. package/dist/cjs/GPTVis/hooks/useEvent.d.ts +0 -1
  197. package/dist/cjs/GPTVis/hooks/useEvent.js +0 -33
  198. package/dist/cjs/GPTVis/index.d.ts +0 -6
  199. package/dist/cjs/GPTVis/index.js +0 -42
  200. package/dist/cjs/HeatMap/index.d.ts +0 -12
  201. package/dist/cjs/HeatMap/index.js +0 -67
  202. package/dist/cjs/Histogram/index.d.ts +0 -8
  203. package/dist/cjs/Histogram/index.js +0 -79
  204. package/dist/cjs/IndentedTree/index.d.ts +0 -7
  205. package/dist/cjs/IndentedTree/index.js +0 -78
  206. package/dist/cjs/Line/index.d.ts +0 -11
  207. package/dist/cjs/Line/index.js +0 -94
  208. package/dist/cjs/Liquid/index.d.ts +0 -11
  209. package/dist/cjs/Liquid/index.js +0 -85
  210. package/dist/cjs/Map/Component/MapView.d.ts +0 -3
  211. package/dist/cjs/Map/Component/MapView.js +0 -40
  212. package/dist/cjs/Map/Component/Marker.d.ts +0 -3
  213. package/dist/cjs/Map/Component/Marker.js +0 -53
  214. package/dist/cjs/Map/Component/Polyline.d.ts +0 -3
  215. package/dist/cjs/Map/Component/Polyline.js +0 -50
  216. package/dist/cjs/Map/Component/index.d.ts +0 -4
  217. package/dist/cjs/Map/Component/index.js +0 -45
  218. package/dist/cjs/Map/data.json +0 -305
  219. package/dist/cjs/Map/index.d.ts +0 -5
  220. package/dist/cjs/Map/index.js +0 -61
  221. package/dist/cjs/MindMap/index.d.ts +0 -7
  222. package/dist/cjs/MindMap/index.js +0 -75
  223. package/dist/cjs/NetworkGraph/index.d.ts +0 -6
  224. package/dist/cjs/NetworkGraph/index.js +0 -75
  225. package/dist/cjs/OrganizationChart/index.d.ts +0 -6
  226. package/dist/cjs/OrganizationChart/index.js +0 -95
  227. package/dist/cjs/PathMap/index.d.ts +0 -6
  228. package/dist/cjs/PathMap/index.js +0 -58
  229. package/dist/cjs/Pie/index.d.ts +0 -23
  230. package/dist/cjs/Pie/index.js +0 -94
  231. package/dist/cjs/PinMap/index.d.ts +0 -6
  232. package/dist/cjs/PinMap/index.js +0 -44
  233. package/dist/cjs/PinMap/maker.svg +0 -1
  234. package/dist/cjs/Radar/index.d.ts +0 -13
  235. package/dist/cjs/Radar/index.js +0 -153
  236. package/dist/cjs/Sankey/index.d.ts +0 -14
  237. package/dist/cjs/Sankey/index.js +0 -110
  238. package/dist/cjs/Scatter/index.d.ts +0 -13
  239. package/dist/cjs/Scatter/index.js +0 -103
  240. package/dist/cjs/Spreadsheet/index.d.ts +0 -28
  241. package/dist/cjs/Spreadsheet/index.js +0 -113
  242. package/dist/cjs/Table/index.d.ts +0 -9
  243. package/dist/cjs/Table/index.js +0 -91
  244. package/dist/cjs/Text/VisText.d.ts +0 -4
  245. package/dist/cjs/Text/VisText.js +0 -82
  246. package/dist/cjs/Text/config.d.ts +0 -18
  247. package/dist/cjs/Text/config.js +0 -91
  248. package/dist/cjs/Text/custom-icons/index.d.ts +0 -3
  249. package/dist/cjs/Text/custom-icons/index.js +0 -66
  250. package/dist/cjs/Text/index.d.ts +0 -3
  251. package/dist/cjs/Text/index.js +0 -42
  252. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
  253. package/dist/cjs/Text/mini-charts/hooks/getElementFontSize.js +0 -65
  254. package/dist/cjs/Text/mini-charts/hooks/index.d.ts +0 -1
  255. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
  256. package/dist/cjs/Text/mini-charts/hooks/useSvgWrapper.js +0 -65
  257. package/dist/cjs/Text/mini-charts/index.d.ts +0 -2
  258. package/dist/cjs/Text/mini-charts/index.js +0 -25
  259. package/dist/cjs/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
  260. package/dist/cjs/Text/mini-charts/line/SingleLineChart.js +0 -63
  261. package/dist/cjs/Text/mini-charts/line/index.d.ts +0 -1
  262. package/dist/cjs/Text/mini-charts/line/index.js +0 -29
  263. package/dist/cjs/Text/mini-charts/line/scaleLinear.d.ts +0 -4
  264. package/dist/cjs/Text/mini-charts/line/scaleLinear.js +0 -35
  265. package/dist/cjs/Text/mini-charts/line/useLineCompute.d.ts +0 -6
  266. package/dist/cjs/Text/mini-charts/line/useLineCompute.js +0 -103
  267. package/dist/cjs/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
  268. package/dist/cjs/Text/mini-charts/proportion/getArcPath.js +0 -51
  269. package/dist/cjs/Text/mini-charts/proportion/index.d.ts +0 -3
  270. package/dist/cjs/Text/mini-charts/proportion/index.js +0 -71
  271. package/dist/cjs/Text/theme.d.ts +0 -24
  272. package/dist/cjs/Text/theme.js +0 -52
  273. package/dist/cjs/Text/types.d.ts +0 -20
  274. package/dist/cjs/Text/types.js +0 -17
  275. package/dist/cjs/Text/utils/getThemeColor.d.ts +0 -11
  276. package/dist/cjs/Text/utils/getThemeColor.js +0 -46
  277. package/dist/cjs/Text/utils/index.d.ts +0 -2
  278. package/dist/cjs/Text/utils/index.js +0 -25
  279. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
  280. package/dist/cjs/Text/utils/useAntdDarkAlgorithm.js +0 -40
  281. package/dist/cjs/Treemap/index.d.ts +0 -10
  282. package/dist/cjs/Treemap/index.js +0 -93
  283. package/dist/cjs/Venn/index.d.ts +0 -32
  284. package/dist/cjs/Venn/index.js +0 -87
  285. package/dist/cjs/Violin/index.d.ts +0 -10
  286. package/dist/cjs/Violin/index.js +0 -190
  287. package/dist/cjs/Waterfall/index.d.ts +0 -25
  288. package/dist/cjs/Waterfall/index.js +0 -184
  289. package/dist/cjs/WordCloud/index.d.ts +0 -9
  290. package/dist/cjs/WordCloud/index.js +0 -76
  291. package/dist/cjs/constants/index.d.ts +0 -2
  292. package/dist/cjs/constants/index.js +0 -35
  293. package/dist/cjs/export-map.browser.d.ts +0 -4
  294. package/dist/cjs/export-map.browser.js +0 -48
  295. package/dist/cjs/export-map.d.ts +0 -10
  296. package/dist/cjs/export-map.js +0 -41
  297. package/dist/cjs/export.d.ts +0 -76
  298. package/dist/cjs/export.js +0 -159
  299. package/dist/cjs/render.d.ts +0 -2
  300. package/dist/cjs/render.js +0 -67
  301. package/dist/cjs/theme.d.ts +0 -2
  302. package/dist/cjs/types/chart.d.ts +0 -88
  303. package/dist/cjs/types/chart.js +0 -61
  304. package/dist/cjs/types/config.d.ts +0 -25
  305. package/dist/cjs/types/config.js +0 -17
  306. package/dist/cjs/types/map.d.ts +0 -242
  307. package/dist/cjs/types/map.js +0 -17
  308. package/dist/cjs/utils/config.d.ts +0 -5
  309. package/dist/cjs/utils/config.js +0 -76
  310. package/dist/cjs/utils/graph.d.ts +0 -18
  311. package/dist/cjs/utils/graph.js +0 -64
  312. package/dist/cjs/utils/index.d.ts +0 -1
  313. package/dist/cjs/utils/index.js +0 -23
  314. package/dist/cjs/utils/map/context.d.ts +0 -3
  315. package/dist/cjs/utils/map/context.js +0 -45
  316. package/dist/cjs/utils/map/controls.d.ts +0 -0
  317. package/dist/cjs/utils/map/controls.js +0 -0
  318. package/dist/cjs/utils/map/index.d.ts +0 -6
  319. package/dist/cjs/utils/map/index.js +0 -33
  320. package/dist/cjs/utils/map/markers.d.ts +0 -2
  321. package/dist/cjs/utils/map/markers.js +0 -88
  322. package/dist/cjs/utils/map/polyline.d.ts +0 -2
  323. package/dist/cjs/utils/map/polyline.js +0 -52
  324. package/dist/cjs/utils/map/style.d.ts +0 -45
  325. package/dist/cjs/utils/map/style.js +0 -112
  326. package/dist/cjs/utils/map/util.d.ts +0 -1
  327. package/dist/cjs/utils/map/view.d.ts +0 -5
  328. package/dist/cjs/utils/map/view.js +0 -100
  329. package/dist/cjs/utils/palette.d.ts +0 -2
  330. package/dist/cjs/utils/palette.js +0 -54
  331. package/dist/cjs/utils/plot.d.ts +0 -5
  332. package/dist/cjs/utils/plot.js +0 -90
  333. package/dist/cjs/version.d.ts +0 -2
  334. package/dist/cjs/version.js +0 -25
  335. package/dist/esm/Area/index.d.ts +0 -11
  336. package/dist/esm/Area/index.js +0 -108
  337. package/dist/esm/Bar/index.d.ts +0 -14
  338. package/dist/esm/Bar/index.js +0 -92
  339. package/dist/esm/Boxplot/index.d.ts +0 -11
  340. package/dist/esm/Boxplot/index.js +0 -86
  341. package/dist/esm/ChartCodeRender/Loading.d.ts +0 -6
  342. package/dist/esm/ChartCodeRender/Loading.js +0 -21
  343. package/dist/esm/ChartCodeRender/VisChart.d.ts +0 -19
  344. package/dist/esm/ChartCodeRender/VisChart.js +0 -450
  345. package/dist/esm/ChartCodeRender/icon.d.ts +0 -10
  346. package/dist/esm/ChartCodeRender/icon.js +0 -103
  347. package/dist/esm/ChartCodeRender/index.d.ts +0 -8
  348. package/dist/esm/ChartCodeRender/index.js +0 -99
  349. package/dist/esm/ChartCodeRender/styles.d.ts +0 -19
  350. package/dist/esm/ChartCodeRender/styles.js +0 -61
  351. package/dist/esm/ChartCodeRender/type.d.ts +0 -176
  352. package/dist/esm/ChartCodeRender/type.js +0 -1
  353. package/dist/esm/ChartCodeRender/utils.d.ts +0 -1
  354. package/dist/esm/ChartCodeRender/utils.js +0 -37
  355. package/dist/esm/Column/index.d.ts +0 -14
  356. package/dist/esm/Column/index.js +0 -93
  357. package/dist/esm/ConfigProvider/context.d.ts +0 -3
  358. package/dist/esm/ConfigProvider/context.js +0 -3
  359. package/dist/esm/ConfigProvider/hooks/index.d.ts +0 -1
  360. package/dist/esm/ConfigProvider/hooks/index.js +0 -1
  361. package/dist/esm/ConfigProvider/hooks/useConfig.d.ts +0 -13
  362. package/dist/esm/ConfigProvider/hooks/useConfig.js +0 -71
  363. package/dist/esm/ConfigProvider/index.d.ts +0 -7
  364. package/dist/esm/ConfigProvider/index.js +0 -17
  365. package/dist/esm/DualAxes/index.d.ts +0 -20
  366. package/dist/esm/DualAxes/index.js +0 -77
  367. package/dist/esm/DualAxes/util.d.ts +0 -9
  368. package/dist/esm/DualAxes/util.js +0 -77
  369. package/dist/esm/FishboneDiagram/index.d.ts +0 -7
  370. package/dist/esm/FishboneDiagram/index.js +0 -43
  371. package/dist/esm/FlowDiagram/helper.d.ts +0 -7
  372. package/dist/esm/FlowDiagram/helper.js +0 -76
  373. package/dist/esm/FlowDiagram/index.d.ts +0 -6
  374. package/dist/esm/FlowDiagram/index.js +0 -72
  375. package/dist/esm/Funnel/index.d.ts +0 -12
  376. package/dist/esm/Funnel/index.js +0 -171
  377. package/dist/esm/GPTVis/Lite.d.ts +0 -19
  378. package/dist/esm/GPTVis/Lite.js +0 -57
  379. package/dist/esm/GPTVis/hooks/useContext.d.ts +0 -8
  380. package/dist/esm/GPTVis/hooks/useContext.js +0 -9
  381. package/dist/esm/GPTVis/hooks/useEvent.d.ts +0 -1
  382. package/dist/esm/GPTVis/hooks/useEvent.js +0 -6
  383. package/dist/esm/GPTVis/index.d.ts +0 -6
  384. package/dist/esm/GPTVis/index.js +0 -25
  385. package/dist/esm/HeatMap/index.d.ts +0 -12
  386. package/dist/esm/HeatMap/index.js +0 -45
  387. package/dist/esm/Histogram/index.d.ts +0 -8
  388. package/dist/esm/Histogram/index.js +0 -75
  389. package/dist/esm/IndentedTree/index.d.ts +0 -7
  390. package/dist/esm/IndentedTree/index.js +0 -68
  391. package/dist/esm/Line/index.d.ts +0 -11
  392. package/dist/esm/Line/index.js +0 -92
  393. package/dist/esm/Liquid/index.d.ts +0 -11
  394. package/dist/esm/Liquid/index.js +0 -100
  395. package/dist/esm/Map/Component/MapView.d.ts +0 -3
  396. package/dist/esm/Map/Component/MapView.js +0 -18
  397. package/dist/esm/Map/Component/Marker.d.ts +0 -3
  398. package/dist/esm/Map/Component/Marker.js +0 -40
  399. package/dist/esm/Map/Component/Polyline.d.ts +0 -3
  400. package/dist/esm/Map/Component/Polyline.js +0 -35
  401. package/dist/esm/Map/Component/index.d.ts +0 -4
  402. package/dist/esm/Map/Component/index.js +0 -4
  403. package/dist/esm/Map/data.json +0 -305
  404. package/dist/esm/Map/index.d.ts +0 -5
  405. package/dist/esm/Map/index.js +0 -50
  406. package/dist/esm/MindMap/index.d.ts +0 -7
  407. package/dist/esm/MindMap/index.js +0 -69
  408. package/dist/esm/NetworkGraph/index.d.ts +0 -6
  409. package/dist/esm/NetworkGraph/index.js +0 -64
  410. package/dist/esm/OrganizationChart/index.d.ts +0 -6
  411. package/dist/esm/OrganizationChart/index.js +0 -75
  412. package/dist/esm/PathMap/index.d.ts +0 -6
  413. package/dist/esm/PathMap/index.js +0 -41
  414. package/dist/esm/Pie/index.d.ts +0 -23
  415. package/dist/esm/Pie/index.js +0 -96
  416. package/dist/esm/PinMap/index.d.ts +0 -6
  417. package/dist/esm/PinMap/index.js +0 -22
  418. package/dist/esm/PinMap/maker.svg +0 -1
  419. package/dist/esm/Radar/index.d.ts +0 -13
  420. package/dist/esm/Radar/index.js +0 -150
  421. package/dist/esm/Sankey/index.d.ts +0 -14
  422. package/dist/esm/Sankey/index.js +0 -98
  423. package/dist/esm/Scatter/index.d.ts +0 -13
  424. package/dist/esm/Scatter/index.js +0 -95
  425. package/dist/esm/Spreadsheet/index.d.ts +0 -28
  426. package/dist/esm/Spreadsheet/index.js +0 -129
  427. package/dist/esm/Table/index.d.ts +0 -9
  428. package/dist/esm/Table/index.js +0 -30
  429. package/dist/esm/Text/VisText.d.ts +0 -4
  430. package/dist/esm/Text/VisText.js +0 -55
  431. package/dist/esm/Text/config.d.ts +0 -18
  432. package/dist/esm/Text/config.js +0 -82
  433. package/dist/esm/Text/custom-icons/index.d.ts +0 -3
  434. package/dist/esm/Text/custom-icons/index.js +0 -37
  435. package/dist/esm/Text/index.d.ts +0 -3
  436. package/dist/esm/Text/index.js +0 -2
  437. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.d.ts +0 -1
  438. package/dist/esm/Text/mini-charts/hooks/getElementFontSize.js +0 -32
  439. package/dist/esm/Text/mini-charts/hooks/index.d.ts +0 -1
  440. package/dist/esm/Text/mini-charts/hooks/index.js +0 -1
  441. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.d.ts +0 -5
  442. package/dist/esm/Text/mini-charts/hooks/useSvgWrapper.js +0 -37
  443. package/dist/esm/Text/mini-charts/index.d.ts +0 -2
  444. package/dist/esm/Text/mini-charts/index.js +0 -2
  445. package/dist/esm/Text/mini-charts/line/SingleLineChart.d.ts +0 -3
  446. package/dist/esm/Text/mini-charts/line/SingleLineChart.js +0 -62
  447. package/dist/esm/Text/mini-charts/line/index.d.ts +0 -1
  448. package/dist/esm/Text/mini-charts/line/index.js +0 -1
  449. package/dist/esm/Text/mini-charts/line/scaleLinear.d.ts +0 -4
  450. package/dist/esm/Text/mini-charts/line/scaleLinear.js +0 -19
  451. package/dist/esm/Text/mini-charts/line/useLineCompute.d.ts +0 -6
  452. package/dist/esm/Text/mini-charts/line/useLineCompute.js +0 -118
  453. package/dist/esm/Text/mini-charts/proportion/getArcPath.d.ts +0 -1
  454. package/dist/esm/Text/mini-charts/proportion/getArcPath.js +0 -19
  455. package/dist/esm/Text/mini-charts/proportion/index.d.ts +0 -3
  456. package/dist/esm/Text/mini-charts/proportion/index.js +0 -64
  457. package/dist/esm/Text/theme.d.ts +0 -24
  458. package/dist/esm/Text/theme.js +0 -24
  459. package/dist/esm/Text/types.d.ts +0 -20
  460. package/dist/esm/Text/types.js +0 -1
  461. package/dist/esm/Text/utils/getThemeColor.d.ts +0 -11
  462. package/dist/esm/Text/utils/getThemeColor.js +0 -29
  463. package/dist/esm/Text/utils/index.d.ts +0 -2
  464. package/dist/esm/Text/utils/index.js +0 -2
  465. package/dist/esm/Text/utils/useAntdDarkAlgorithm.d.ts +0 -2
  466. package/dist/esm/Text/utils/useAntdDarkAlgorithm.js +0 -14
  467. package/dist/esm/Treemap/index.d.ts +0 -10
  468. package/dist/esm/Treemap/index.js +0 -88
  469. package/dist/esm/Venn/index.d.ts +0 -32
  470. package/dist/esm/Venn/index.js +0 -69
  471. package/dist/esm/Violin/index.d.ts +0 -10
  472. package/dist/esm/Violin/index.js +0 -199
  473. package/dist/esm/Waterfall/index.d.ts +0 -25
  474. package/dist/esm/Waterfall/index.js +0 -185
  475. package/dist/esm/WordCloud/index.d.ts +0 -9
  476. package/dist/esm/WordCloud/index.js +0 -59
  477. package/dist/esm/constants/index.d.ts +0 -2
  478. package/dist/esm/constants/index.js +0 -9
  479. package/dist/esm/export-map.browser.d.ts +0 -4
  480. package/dist/esm/export-map.browser.js +0 -5
  481. package/dist/esm/export-map.d.ts +0 -10
  482. package/dist/esm/export-map.js +0 -9
  483. package/dist/esm/export.d.ts +0 -76
  484. package/dist/esm/export.js +0 -51
  485. package/dist/esm/render.d.ts +0 -2
  486. package/dist/esm/render.js +0 -32
  487. package/dist/esm/theme.d.ts +0 -2
  488. package/dist/esm/theme.js +0 -103
  489. package/dist/esm/types/chart.d.ts +0 -88
  490. package/dist/esm/types/chart.js +0 -33
  491. package/dist/esm/types/config.d.ts +0 -25
  492. package/dist/esm/types/config.js +0 -1
  493. package/dist/esm/types/map.d.ts +0 -242
  494. package/dist/esm/types/map.js +0 -1
  495. package/dist/esm/utils/config.d.ts +0 -5
  496. package/dist/esm/utils/config.js +0 -53
  497. package/dist/esm/utils/graph.d.ts +0 -18
  498. package/dist/esm/utils/graph.js +0 -55
  499. package/dist/esm/utils/index.d.ts +0 -1
  500. package/dist/esm/utils/index.js +0 -1
  501. package/dist/esm/utils/map/context.d.ts +0 -3
  502. package/dist/esm/utils/map/context.js +0 -42
  503. package/dist/esm/utils/map/controls.d.ts +0 -0
  504. package/dist/esm/utils/map/controls.js +0 -0
  505. package/dist/esm/utils/map/index.d.ts +0 -6
  506. package/dist/esm/utils/map/index.js +0 -6
  507. package/dist/esm/utils/map/markers.d.ts +0 -2
  508. package/dist/esm/utils/map/markers.js +0 -69
  509. package/dist/esm/utils/map/polyline.d.ts +0 -2
  510. package/dist/esm/utils/map/polyline.js +0 -31
  511. package/dist/esm/utils/map/style.d.ts +0 -45
  512. package/dist/esm/utils/map/style.js +0 -80
  513. package/dist/esm/utils/map/util.d.ts +0 -1
  514. package/dist/esm/utils/map/util.js +0 -11
  515. package/dist/esm/utils/map/view.d.ts +0 -5
  516. package/dist/esm/utils/map/view.js +0 -83
  517. package/dist/esm/utils/palette.d.ts +0 -2
  518. package/dist/esm/utils/palette.js +0 -2
  519. package/dist/esm/utils/plot.d.ts +0 -5
  520. package/dist/esm/utils/plot.js +0 -86
  521. package/dist/esm/version.d.ts +0 -2
  522. package/dist/esm/version.js +0 -1
  523. package/dist/umd/376.async.js +0 -1
  524. package/dist/umd/index.min.css +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/gpt-vis",
3
- "version": "0.6.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "Components for GPTs, generative AI, and LLM projects. Not only UI Components.",
5
5
  "keywords": [
6
6
  "antv",
@@ -23,86 +23,46 @@
23
23
  "types": "dist/esm/index.d.ts",
24
24
  "jsdelivr": "dist/umd/index.min.js",
25
25
  "unpkg": "dist/umd/index.min.js",
26
- "browser": {
27
- "./src/export-map.ts": "./src/export-map.browser.ts",
28
- "./dist/esm/export-map.js": "./dist/esm/export-map.browser.js"
29
- },
30
26
  "files": [
31
27
  "dist",
32
28
  "README.md",
33
29
  "!dist/umd/report.html"
34
30
  ],
35
31
  "dependencies": {
36
- "@ant-design/graphs": "^2.1.1",
37
- "@ant-design/icons": "^5.6.1",
38
- "@ant-design/plots": "^2.6.5",
39
- "@antv/event-emitter": "^0.1.3",
40
- "@antv/g": "6.1.27",
41
32
  "@antv/g2": "^5.4.1",
42
- "@antv/g6": "^5.0.49",
43
- "@antv/l7": "^2.23.0",
44
- "@antv/larkmap": "^1.5.1",
45
- "@antv/s2": "^2.0.0",
46
- "@playwright/test": "^1.56.0",
33
+ "@antv/g6": "^5.1.0",
34
+ "@antv/t8": "^0.3.0",
47
35
  "@zumer/snapdom": "^1.9.14",
48
- "copy-text-to-clipboard": "^3.2.2",
49
- "lodash": "^4.17.21",
50
- "rc-resize-observer": "^1.4.3",
51
- "react-error-boundary": "6.0.3",
52
- "react-markdown": "^9.1.0",
53
- "react-syntax-highlighter": "^15.6.6",
54
- "rehype-raw": "^7.0.0",
55
- "remark-gfm": "^4.0.1",
56
- "styled-components": "^6.1.19"
36
+ "measury": "^0.1.5"
57
37
  },
58
38
  "devDependencies": {
59
- "@ant-design/x": "^1.6.1",
60
39
  "@changesets/changelog-github": "^0.5.1",
61
40
  "@changesets/cli": "^2.29.7",
62
41
  "@commitlint/cli": "^19.8.1",
63
42
  "@commitlint/config-conventional": "^19.8.1",
64
43
  "@eslint/js": "^9.37.0",
65
- "@playwright/test": "^1.56.0",
66
- "@types/jest": "^29.5.14",
67
- "@types/lodash": "^4.17.20",
68
- "@types/react": "^18.3.26",
69
- "@types/react-dom": "^18.3.1",
70
- "@types/react-syntax-highlighter": "^15.5.13",
71
44
  "@types/webpack-bundle-analyzer": "^4.7.0",
72
- "antd": "^5.27.5",
73
- "dumi": "^2.4.21",
74
45
  "eslint": "^9.37.0",
75
46
  "eslint-config-prettier": "^9.1.2",
76
- "eslint-plugin-jest": "^28.14.0",
77
47
  "eslint-plugin-jsx-a11y": "^6.10.2",
78
48
  "eslint-plugin-react": "^7.37.5",
79
49
  "eslint-plugin-react-hooks": "^5.2.0",
80
50
  "father": "^4.6.7",
81
- "gh-pages": "^6.3.0",
82
51
  "globals": "^15.15.0",
83
52
  "husky": "^9.1.7",
84
- "jest": "^29.7.0",
85
- "jest-environment-jsdom": "^29.7.0",
86
53
  "limit-size": "^0.1.4",
87
54
  "lint-staged": "^15.5.2",
88
55
  "npm-run-all": "^4.1.5",
89
- "prettier": "^3.6.2",
56
+ "prettier": "^3.8.1",
90
57
  "prettier-plugin-organize-imports": "^4.3.0",
91
- "react": "^18.3.1",
92
- "react-dom": "^18.3.1",
93
- "ts-jest": "^29.4.5",
94
58
  "ts-node": "^10.9.2",
95
59
  "typescript": "^5.9.3",
96
60
  "typescript-eslint": "^8.46.1",
61
+ "vitest": "^4.0.18",
97
62
  "webpack-bundle-analyzer": "^4.10.2"
98
63
  },
99
- "peerDependencies": {
100
- "antd": "^5.24.6",
101
- "react": ">=16.9.0",
102
- "react-dom": ">=16.9.0"
103
- },
104
64
  "engines": {
105
- "node": ">=18",
65
+ "node": ">=20",
106
66
  "pnpm": ">=8"
107
67
  },
108
68
  "lint-staged": {
@@ -124,7 +84,12 @@
124
84
  "limit-size": [
125
85
  {
126
86
  "path": "dist/umd/index.min.js",
127
- "limit": "5 Mb"
87
+ "limit": "3 Mb"
88
+ },
89
+ {
90
+ "path": "dist/umd/index.min.js",
91
+ "limit": "1 Mb",
92
+ "gzip": true
128
93
  }
129
94
  ],
130
95
  "publishConfig": {
@@ -132,23 +97,17 @@
132
97
  "registry": "https://registry.npmjs.org"
133
98
  },
134
99
  "scripts": {
135
- "start": "pnpm dev",
136
- "dev": "dumi dev",
137
- "build": "father build",
138
- "docs:build": "dumi build",
139
- "docs:build-analyze": "ANALYZE=1 dumi build",
140
- "docs:deploy": "gh-pages -d docs-dist",
141
- "deploy": "pnpm docs:build && pnpm docs:deploy",
100
+ "build": "father build && limit-size",
101
+ "dev": "father dev",
142
102
  "check-deps": "father doctor",
143
103
  "check-format": "prettier './**/*.{ts,tsx,js,jsx,json,md,css,less}' --check",
144
104
  "format": "prettier './**/*.{ts,tsx,js,jsx,json,md,css,less}' --write",
145
105
  "lint:ts": "eslint src/**",
146
106
  "lint:ts-fix": "pnpm lint:ts --fix",
147
- "test:unit": "jest --config ./jest.config.ts",
148
- "test": "pnpm build && npx playwright test",
149
- "test:size": "pnpm build && limit-size",
107
+ "test": "vitest run",
108
+ "test:watch": "vitest",
150
109
  "changeset": "changeset add",
151
- "publish-version": "changeset version && node scripts/sync-version",
110
+ "publish-version": "changeset version",
152
111
  "publish-package": "pnpm build && changeset publish"
153
112
  }
154
113
  }
package/README.ja-JP.md DELETED
@@ -1,164 +0,0 @@
1
- <img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [English](./README.md) | [简体中文](./README.zh-CN.md) | 日本語
2
-
3
- <div align="center">
4
- <img src="https://github.com/eosphoros-ai/GPT-Vis/assets/17919400/c8804ffb-d3d6-45d3-846f-cf217681ab05" height=70">
5
- </div>
6
-
7
- <h1 align="center">GPT-Vis</h1>
8
-
9
- <div align="center">
10
-
11
- GPTs、生成AI、およびLLMプロジェクトのためのコンポーネント。**UIコンポーネントだけではありません**。[MCP](https://github.com/antvis/mcp-server-chart) の方法で使用する。
12
-
13
- <p align="center">
14
- <a href="https://gpt-vis.antv.vision" target="_blank">ドキュメント</a> •
15
- <a href="/knowledges" target="_blank">知識</a> •
16
- <a href="https://www.tbox.cn/share/202504APmv6c00373739?platform=WebService" target="_blank">エージェントデモ</a> •
17
- <a href="https://github.com/antvis/mcp-server-chart" target="_blank">MCP Server</a>
18
- </p>
19
- </div>
20
-
21
- <div align="center">
22
- <video src="https://github.com/user-attachments/assets/b8eb4a89-b0ed-4a39-8fab-316161949446" />
23
- </div>
24
-
25
- ## ✨ 特徴
26
-
27
- - 🤖 **LLMプロトコル**: LLMエージェントカードのための視覚的プロトコルで、LLMの対話型インタラクションとサービスのシリアライズされた出力のために設計されており、AIアプリケーションへの迅速な統合を容易にします。
28
- - 🍡 **LLMコンポーネント**: LLMアプリケーションのために開発されたコンポーネントで、20以上の一般的なVISコンポーネントが組み込まれており、カスタマイズされたUI要件のための便利な拡張メカニズムとアーキテクチャ設計を提供します。
29
- - 📈 **LLMアクセス**: チャート知識ベースとチャート推奨モデルをシームレスにLLMにアクセスし、LLMのために視覚カードを直接出力し、エージェントのための知識ベースと推奨モデルソリューションを提供します。
30
-
31
- ## 📦 インストール
32
-
33
- ```bash
34
- $ npm i @antv/gpt-vis --save
35
- ```
36
-
37
- ## 🔨 使用方法
38
-
39
- ```jsx
40
- import { GPTVis } from '@antv/gpt-vis';
41
-
42
- const markdownContent = `
43
- # GPT-VIS \n\nGPTs、生成AI、およびLLMプロジェクトのためのコンポーネント。UIコンポーネントだけではありません。
44
-
45
- ここに、2013年から2022年までのHaidilaoのフードデリバリー収益の視覚化があります。年々着実に増加しており、特に最近の年では顕著な*成長*が見られます。
46
-
47
- \`\`\`vis-chart
48
- {
49
- "type": "line",
50
- "data": [
51
- { "time": "2013", "value": 59.3 },
52
- { "time": "2014", "value": 64.4 },
53
- { "time": "2015", "value": 68.9 },
54
- { "time": "2016", "value": 74.4 },
55
- { "time": "2017", "value": 82.7 },
56
- { "time": "2018", "value": 91.9 },
57
- { "time": "2019", "value": 99.1 },
58
- { "time": "2020", "value": 101.6 },
59
- { "time": "2021", "value": 114.4 },
60
- { "time": "2022", "value": 121 }
61
- ]
62
- }
63
- \`\`\`
64
- `;
65
-
66
- export default () => {
67
- return <GPTVis>{markdownContent}</GPTVis>;
68
- };
69
- ```
70
-
71
- <details>
72
- <summary>🛠 レンダラーUIのカスタマイズ</summary>
73
-
74
- ```jsx
75
- import { GPTVisLite, withChartCode, ChartType, Pie } from '@antv/gpt-vis';
76
-
77
- const markdownContent = `
78
- \`\`\`my-ui
79
- my data
80
- \`\`\`
81
-
82
- \`\`\`vis-chart
83
- {
84
- "type": "pie",
85
- "data": [
86
- { "category": "カテゴリ1", "value": 27 },
87
- { "category": "カテゴリ2", "value": 25 },
88
- { "category": "カテゴリ3", "value": 18 },
89
- { "category": "その他", "value": 5 }
90
- ]
91
- }
92
- \`\`\`
93
- `;
94
-
95
- const customRenderers = { 'my-ui': ({ children }) => <div>{children}</div> };
96
- const components = {
97
- code: withChartCode({
98
- languageRenderers: customRenderers, // カスタムブロックレンダラーを登録
99
- components: { [ChartType.Pie]: Pie }, // パイチャートを登録
100
- }),
101
- };
102
-
103
- export default () => {
104
- return <GPTVisLite components={components}>{markdownContent}</GPTVisLite>;
105
- };
106
- ```
107
-
108
- </details>
109
-
110
- ## 🐍 Streamlit
111
-
112
- ```python
113
- import streamlit as st
114
- from streamlit_gpt_vis import set_gpt_vis
115
-
116
- content = '''
117
- ここに、2013年から2022年までのHaidilaoのフードデリバリー収益の視覚化があります。年々着実に増加しており、特に最近の年では顕著な*成長*が見られます。
118
-
119
- \`\`\`vis-chart
120
- {"type": "line","data": [{"time":2013,"value":59.3},{"time":2014,"value":64.4},{"time":2015,"value":68.9},{"time":2016,"value":74.4},{"time":2017,"value":82.7},{"time":2018,"value":91.9},{"time":2019,"value":99.1},{"time":2020,"value":101.6},{"time":2021,"value":114.4},{"time":2022,"value":121}]}
121
- \`\`\`
122
- '''
123
-
124
- set_gpt_vis(content)
125
- ```
126
-
127
- 詳細はこちら 👉 [streamlit-gpt-vis](https://github.com/antvis/GPT-Vis/tree/main/bindings/streamlit-gpt-vis)
128
-
129
- ## ビジュアル知識
130
-
131
- [ビジュアル知識ベース](https://github.com/antvis/GPT-Vis/tree/main/knowledges)の目的は、エージェントがさまざまなデータ可視化チャートを理解、選択、作成するのを支援するための包括的かつ体系的なリソースを提供することです。以下は、RAGを通じて評価データセットに基づいて正確なチャートプロトコルを生成するためのメトリクスです。
132
-
133
- | | | | | | | |
134
- | ------------- | ----------------------- | -------------------- | ------------- | -------------------- | --------------- | ------- |
135
- | Line(Multi) | Column(Grouped/Stacked) | Pie | Area(Stacked) | Bar(Grouped/Stacked) | Scatter(Bubble) | Heatmap |
136
- | 40/40 | 25/27 | 13/14 | 18/18 | 18/20 | 10/10 | 9/10 |
137
- | Histogram | Tree Map | Word Cloud | Radar | Dual Axis | Rich Text NTV | Pin Map |
138
- | 15/16 | 13/15 | 11/12 | 23/23 | 13/14 | 7.3/10 | 10/11 |
139
- | Network Graph | Mind Map | Organizational Chart | Flow Diagram | Fishbone Diagram | | |
140
- | 8/10 | 12/14 | 10/12 | 10/11 | 10/12 | | |
141
- | | | | | | | |
142
-
143
- 注: X/Y形式の数字は、データセットに対して評価されたときのそれぞれのチャートタイプのメトリクスを表しています。
144
-
145
- ## 🤖 チャート推奨データセット
146
-
147
- チャート推奨データセットは、与えられたデータに基づいてチャートタイプを推奨する能力を評価または微調整するために設計されています。データセットは現在、16種類のチャートをカバーしており、各チャートタイプには1〜3の異なるデータシナリオがあり、各シナリオには15以上のチャートデータインスタンスがあります。データセットは継続的に更新されており、使用ケースから収集したチャートデータの提供を歓迎します。データセットの詳細については、[evaluations/recommend](https://github.com/antvis/GPT-Vis/blob/main/evaluations/datastes/recommend/README.en.md)をご覧ください。
148
-
149
- ## 💻 開発
150
-
151
- ```bash
152
- # 依存関係をインストール
153
- $ pnpm install
154
-
155
- # ドキュメントデモでライブラリを開発
156
- $ pnpm dev
157
-
158
- # ライブラリのソースコードをビルド
159
- $ pnpm build
160
- ```
161
-
162
- ## ライセンス
163
-
164
- [MIT](./LICENSE)
@@ -1,11 +0,0 @@
1
- import type { AreaConfig } from '@ant-design/plots';
2
- import React from 'react';
3
- import type { BasePlotProps, Style, Theme } from '../types';
4
- type AreaDataItem = {
5
- time: string | number;
6
- value: number;
7
- [key: string]: string | number;
8
- };
9
- export type AreaProps = BasePlotProps<AreaDataItem> & Partial<AreaConfig> & Theme & Style;
10
- declare const Area: (props: AreaProps) => React.JSX.Element;
11
- export default Area;
@@ -1,105 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/Area/index.tsx
30
- var Area_exports = {};
31
- __export(Area_exports, {
32
- default: () => Area_default
33
- });
34
- module.exports = __toCommonJS(Area_exports);
35
- var import_plots = require("@ant-design/plots");
36
- var import_lodash = require("lodash");
37
- var import_react = __toESM(require("react"));
38
- var import_hooks = require("../ConfigProvider/hooks");
39
- var import_theme = require("../theme");
40
- var getLinearGradientColor = (color) => `linear-gradient(-90deg, white 0%, ${color} 100%)`;
41
- var DEFAULT_COLOR = "#3A95FF";
42
- var defaultConfig = (props) => {
43
- const { data, xField = "time", yField = "value", style = {} } = props;
44
- const { backgroundColor, palette, lineWidth = 2 } = style;
45
- const hasGroupField = (0, import_lodash.get)(data, "[0].group") !== void 0;
46
- const axisYTitle = (0, import_lodash.get)(props, "axis.y.title");
47
- const fillColor = getLinearGradientColor((palette == null ? void 0 : palette[0]) || DEFAULT_COLOR);
48
- const defaultStyle = hasGroupField ? { opacity: 0.6 } : { opacity: 0.6, fill: fillColor };
49
- let paletteConfig = { color: void 0 };
50
- let encode = {};
51
- const hasPalette = !!(palette == null ? void 0 : palette[0]);
52
- if (hasPalette) {
53
- paletteConfig = {
54
- color: {
55
- range: palette
56
- }
57
- };
58
- }
59
- if (hasGroupField) {
60
- encode = { x: xField, y: yField, color: "group" };
61
- } else {
62
- encode = { x: xField, y: yField, color: () => "all" };
63
- }
64
- return {
65
- xField,
66
- yField,
67
- style: defaultStyle,
68
- colorField: hasGroupField ? "group" : void 0,
69
- stack: hasGroupField,
70
- // @ts-ignore
71
- encode,
72
- legend: hasGroupField ? {} : false,
73
- tooltip: (d) => {
74
- const tooltipName = axisYTitle || d[xField];
75
- return {
76
- name: tooltipName,
77
- value: d[yField]
78
- };
79
- },
80
- scale: {
81
- y: {
82
- nice: true
83
- },
84
- ...paletteConfig
85
- },
86
- line: {
87
- encode,
88
- style: {
89
- lineWidth,
90
- strokeOpacity: 0.6
91
- },
92
- ...paletteConfig
93
- },
94
- ...backgroundColor ? { viewStyle: { viewFill: backgroundColor } } : { viewStyle: void 0 }
95
- };
96
- };
97
- var Area = (props) => {
98
- const themeConfig = import_theme.THEME_MAP[props.theme ?? "default"];
99
- const config = (0, import_hooks.usePlotConfig)("Area", defaultConfig, {
100
- ...props,
101
- theme: themeConfig
102
- });
103
- return /* @__PURE__ */ import_react.default.createElement(import_plots.Area, { ...config });
104
- };
105
- var Area_default = Area;
@@ -1,14 +0,0 @@
1
- import type { BarConfig } from '@ant-design/plots';
2
- import React from 'react';
3
- import type { BasePlotProps, Style, Theme } from '../types';
4
- type BarDataItem = {
5
- category: string;
6
- value: number;
7
- [key: string]: string | number;
8
- };
9
- export type BarProps = BasePlotProps<BarDataItem> & Partial<BarConfig> & Theme & Style & {
10
- group?: boolean;
11
- stack?: boolean;
12
- };
13
- declare const Bar: (props: BarProps) => React.JSX.Element;
14
- export default Bar;
@@ -1,101 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/Bar/index.tsx
30
- var Bar_exports = {};
31
- __export(Bar_exports, {
32
- default: () => Bar_default
33
- });
34
- module.exports = __toCommonJS(Bar_exports);
35
- var import_plots = require("@ant-design/plots");
36
- var import_lodash = require("lodash");
37
- var import_react = __toESM(require("react"));
38
- var import_hooks = require("../ConfigProvider/hooks");
39
- var import_theme = require("../theme");
40
- var defaultConfig = (props) => {
41
- const { data, xField = "category", yField = "value", style = {}, theme = {} } = props;
42
- const { backgroundColor, palette } = style;
43
- const hasGroupField = (0, import_lodash.get)(data, "[0].group") !== void 0;
44
- const axisYTitle = (0, import_lodash.get)(props, "axis.y.title");
45
- const hasPalette = !!(palette == null ? void 0 : palette[0]);
46
- let paletteConfig = { color: void 0 };
47
- let radiusStyle = {
48
- radiusTopLeft: 4,
49
- radiusTopRight: 4
50
- };
51
- if ((theme == null ? void 0 : theme.type) === "academy") {
52
- radiusStyle = {
53
- radiusTopLeft: 0,
54
- radiusTopRight: 0
55
- };
56
- }
57
- if (hasPalette) {
58
- paletteConfig = {
59
- color: {
60
- range: palette
61
- }
62
- };
63
- }
64
- return {
65
- xField,
66
- yField,
67
- colorField: hasGroupField ? "group" : xField,
68
- tooltip: (d) => {
69
- const tooltipName = hasGroupField ? d["group"] : axisYTitle || d[xField];
70
- return {
71
- name: tooltipName,
72
- value: d[yField]
73
- };
74
- },
75
- style: {
76
- ...radiusStyle,
77
- columnWidthRatio: 0.8
78
- },
79
- scale: {
80
- y: {
81
- nice: true
82
- },
83
- ...paletteConfig
84
- },
85
- ...backgroundColor ? { viewStyle: { viewFill: backgroundColor } } : { viewStyle: void 0 },
86
- legend: hasGroupField ? {} : false
87
- };
88
- };
89
- var Bar = (props) => {
90
- const themeConfig = import_theme.THEME_MAP[props.theme ?? "default"];
91
- const { data, group = false, stack = false } = props;
92
- const hasGroupField = (0, import_lodash.get)(data, "[0].group") !== void 0;
93
- const config = (0, import_hooks.usePlotConfig)("Bar", defaultConfig, {
94
- ...props,
95
- theme: themeConfig,
96
- group: hasGroupField && group,
97
- stack: hasGroupField && stack
98
- });
99
- return /* @__PURE__ */ import_react.default.createElement(import_plots.Bar, { ...config });
100
- };
101
- var Bar_default = Bar;
@@ -1,11 +0,0 @@
1
- import type { BoxConfig } from '@ant-design/plots';
2
- import React from 'react';
3
- import type { BasePlotProps, Style, Theme } from '../types';
4
- type BoxplotDatum = {
5
- category: string;
6
- value: number;
7
- group?: string;
8
- };
9
- export type BoxplotProps = BasePlotProps<BoxplotDatum> & Partial<BoxConfig> & Theme & Style;
10
- declare const Boxplot: (props: BoxplotProps) => React.JSX.Element;
11
- export default Boxplot;
@@ -1,88 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/Boxplot/index.tsx
30
- var Boxplot_exports = {};
31
- __export(Boxplot_exports, {
32
- default: () => Boxplot_default
33
- });
34
- module.exports = __toCommonJS(Boxplot_exports);
35
- var import_plots = require("@ant-design/plots");
36
- var import_react = __toESM(require("react"));
37
- var import_hooks = require("../ConfigProvider/hooks");
38
- var import_theme = require("../theme");
39
- var defaultConfig = (props) => {
40
- var _a;
41
- const { data, style = {}, axisYTitle, axisXTitle, xField = "category", yField = "value" } = props;
42
- const { backgroundColor, palette, startAtZero = false } = style;
43
- const hasGroupField = ((_a = (data || [])[0]) == null ? void 0 : _a.group) !== void 0;
44
- let paletteConfig = { color: void 0 };
45
- const hasPalette = !!(palette == null ? void 0 : palette[0]);
46
- const colorField = hasGroupField ? "group" : "category";
47
- const seriesField = hasGroupField ? "group" : "category";
48
- if (hasPalette) {
49
- paletteConfig = {
50
- color: {
51
- range: palette
52
- }
53
- };
54
- }
55
- return {
56
- data,
57
- boxType: "boxplot",
58
- xField,
59
- yField,
60
- colorField,
61
- seriesField,
62
- axis: {
63
- y: {
64
- title: axisYTitle || false
65
- },
66
- x: {
67
- title: axisXTitle || false
68
- }
69
- },
70
- scale: {
71
- x: { paddingInner: 0.6, paddingOuter: 0.3 },
72
- series: { paddingInner: 0.3, paddingOuter: 0.1 },
73
- y: { nice: true, zero: startAtZero },
74
- ...paletteConfig
75
- },
76
- style: { stroke: "black" },
77
- ...backgroundColor ? { viewStyle: { viewFill: backgroundColor } } : {}
78
- };
79
- };
80
- var Boxplot = (props) => {
81
- const themeConfig = import_theme.THEME_MAP[props.theme ?? "default"];
82
- const config = (0, import_hooks.usePlotConfig)("Boxplot", defaultConfig, {
83
- ...props,
84
- theme: themeConfig
85
- });
86
- return /* @__PURE__ */ import_react.default.createElement(import_plots.Box, { ...config });
87
- };
88
- var Boxplot_default = Boxplot;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- type LoadingProps = {
3
- text: string;
4
- };
5
- declare const Loading: React.FC<LoadingProps>;
6
- export default Loading;