@antv/g2plot 2.4.8 → 2.4.11

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 (273) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +1 -1
  3. package/dist/g2plot.min.js +4 -4
  4. package/dist/g2plot.min.js.map +1 -1
  5. package/esm/core/plot.d.ts +2 -2
  6. package/esm/core/plot.js +4 -3
  7. package/esm/core/plot.js.map +1 -1
  8. package/esm/index.d.ts +2 -2
  9. package/esm/index.js +2 -2
  10. package/esm/index.js.map +1 -1
  11. package/esm/plots/area/types.d.ts +35 -10
  12. package/esm/plots/area/types.js.map +1 -1
  13. package/esm/plots/bar/types.d.ts +16 -3
  14. package/esm/plots/bar/types.js.map +1 -1
  15. package/esm/plots/bidirectional-bar/types.d.ts +21 -6
  16. package/esm/plots/bidirectional-bar/types.js.map +1 -1
  17. package/esm/plots/box/types.d.ts +20 -6
  18. package/esm/plots/box/types.js.map +1 -1
  19. package/esm/plots/bullet/types.d.ts +36 -9
  20. package/esm/plots/bullet/types.js.map +1 -1
  21. package/esm/plots/chord/types.d.ts +14 -10
  22. package/esm/plots/chord/types.js.map +1 -1
  23. package/esm/plots/circle-packing/types.d.ts +25 -8
  24. package/esm/plots/circle-packing/types.js.map +1 -1
  25. package/esm/plots/column/types.d.ts +57 -16
  26. package/esm/plots/column/types.js.map +1 -1
  27. package/esm/plots/dual-axes/types.d.ts +31 -6
  28. package/esm/plots/dual-axes/types.js.map +1 -1
  29. package/esm/plots/facet/types.d.ts +54 -34
  30. package/esm/plots/facet/types.js.map +1 -1
  31. package/esm/plots/funnel/geometries/compare.js +2 -1
  32. package/esm/plots/funnel/geometries/compare.js.map +1 -1
  33. package/esm/plots/funnel/geometries/facet.js +2 -1
  34. package/esm/plots/funnel/geometries/facet.js.map +1 -1
  35. package/esm/plots/funnel/types.d.ts +45 -11
  36. package/esm/plots/funnel/types.js.map +1 -1
  37. package/esm/plots/gauge/adaptor.js +31 -3
  38. package/esm/plots/gauge/adaptor.js.map +1 -1
  39. package/esm/plots/gauge/types.d.ts +84 -22
  40. package/esm/plots/gauge/types.js.map +1 -1
  41. package/esm/plots/heatmap/types.d.ts +47 -12
  42. package/esm/plots/heatmap/types.js.map +1 -1
  43. package/esm/plots/histogram/types.d.ts +17 -6
  44. package/esm/plots/histogram/types.js.map +1 -1
  45. package/esm/plots/line/types.d.ts +42 -12
  46. package/esm/plots/line/types.js.map +1 -1
  47. package/esm/plots/liquid/index.d.ts +1 -0
  48. package/esm/plots/liquid/index.js +1 -0
  49. package/esm/plots/liquid/index.js.map +1 -1
  50. package/esm/plots/liquid/shapes/liquid.d.ts +16 -1
  51. package/esm/plots/liquid/shapes/liquid.js +13 -8
  52. package/esm/plots/liquid/shapes/liquid.js.map +1 -1
  53. package/esm/plots/liquid/types.d.ts +56 -16
  54. package/esm/plots/liquid/types.js.map +1 -1
  55. package/esm/plots/mix/types.d.ts +31 -22
  56. package/esm/plots/mix/types.js.map +1 -1
  57. package/esm/plots/pie/types.d.ts +27 -10
  58. package/esm/plots/pie/types.js.map +1 -1
  59. package/esm/plots/progress/types.d.ts +13 -4
  60. package/esm/plots/progress/types.js.map +1 -1
  61. package/esm/plots/radar/types.d.ts +39 -12
  62. package/esm/plots/radar/types.js.map +1 -1
  63. package/esm/plots/radial-bar/types.d.ts +39 -12
  64. package/esm/plots/radial-bar/types.js.map +1 -1
  65. package/esm/plots/ring-progress/types.d.ts +18 -6
  66. package/esm/plots/ring-progress/types.js.map +1 -1
  67. package/esm/plots/rose/types.d.ts +32 -12
  68. package/esm/plots/rose/types.js.map +1 -1
  69. package/esm/plots/sankey/types.d.ts +51 -32
  70. package/esm/plots/sankey/types.js.map +1 -1
  71. package/esm/plots/scatter/types.d.ts +76 -22
  72. package/esm/plots/scatter/types.js.map +1 -1
  73. package/esm/plots/stock/types.d.ts +20 -7
  74. package/esm/plots/stock/types.js.map +1 -1
  75. package/esm/plots/sunburst/types.d.ts +40 -12
  76. package/esm/plots/sunburst/types.js.map +1 -1
  77. package/esm/plots/tiny-area/types.d.ts +16 -5
  78. package/esm/plots/tiny-area/types.js.map +1 -1
  79. package/esm/plots/tiny-column/types.d.ts +10 -3
  80. package/esm/plots/tiny-column/types.js.map +1 -1
  81. package/esm/plots/tiny-line/types.d.ts +17 -5
  82. package/esm/plots/tiny-line/types.js.map +1 -1
  83. package/esm/plots/treemap/types.d.ts +17 -6
  84. package/esm/plots/treemap/types.js.map +1 -1
  85. package/esm/plots/venn/types.d.ts +20 -6
  86. package/esm/plots/venn/types.js.map +1 -1
  87. package/esm/plots/violin/types.d.ts +52 -17
  88. package/esm/plots/violin/types.js.map +1 -1
  89. package/esm/plots/waterfall/types.d.ts +42 -10
  90. package/esm/plots/waterfall/types.js.map +1 -1
  91. package/esm/plots/word-cloud/types.d.ts +91 -44
  92. package/esm/plots/word-cloud/types.js.map +1 -1
  93. package/esm/types/button.d.ts +8 -4
  94. package/esm/types/button.js.map +1 -1
  95. package/esm/types/common.d.ts +145 -33
  96. package/esm/types/common.js.map +1 -1
  97. package/esm/types/drill-down.d.ts +28 -7
  98. package/esm/types/drill-down.js.map +1 -1
  99. package/esm/types/interaction.d.ts +26 -6
  100. package/esm/types/interaction.js.map +1 -1
  101. package/esm/types/label.d.ts +11 -3
  102. package/esm/types/label.js.map +1 -1
  103. package/esm/types/meta.d.ts +4 -7
  104. package/esm/types/meta.js.map +1 -1
  105. package/esm/types/pattern.d.ts +58 -18
  106. package/esm/types/pattern.js.map +1 -1
  107. package/esm/types/state.d.ts +11 -3
  108. package/esm/types/state.js.map +1 -1
  109. package/esm/types/statistic.d.ts +38 -6
  110. package/esm/types/statistic.js.map +1 -1
  111. package/esm/types/tooltip.d.ts +7 -2
  112. package/esm/types/tooltip.js.map +1 -1
  113. package/lib/core/plot.d.ts +2 -2
  114. package/lib/core/plot.js +4 -3
  115. package/lib/core/plot.js.map +1 -1
  116. package/lib/index.d.ts +2 -2
  117. package/lib/index.js +2 -1
  118. package/lib/index.js.map +1 -1
  119. package/lib/plots/area/types.d.ts +35 -10
  120. package/lib/plots/area/types.js.map +1 -1
  121. package/lib/plots/bar/types.d.ts +16 -3
  122. package/lib/plots/bar/types.js.map +1 -1
  123. package/lib/plots/bidirectional-bar/types.d.ts +21 -6
  124. package/lib/plots/bidirectional-bar/types.js.map +1 -1
  125. package/lib/plots/box/types.d.ts +20 -6
  126. package/lib/plots/box/types.js.map +1 -1
  127. package/lib/plots/bullet/types.d.ts +36 -9
  128. package/lib/plots/bullet/types.js.map +1 -1
  129. package/lib/plots/chord/types.d.ts +14 -10
  130. package/lib/plots/chord/types.js.map +1 -1
  131. package/lib/plots/circle-packing/types.d.ts +25 -8
  132. package/lib/plots/circle-packing/types.js.map +1 -1
  133. package/lib/plots/column/types.d.ts +57 -16
  134. package/lib/plots/column/types.js.map +1 -1
  135. package/lib/plots/dual-axes/types.d.ts +31 -6
  136. package/lib/plots/dual-axes/types.js.map +1 -1
  137. package/lib/plots/facet/types.d.ts +54 -34
  138. package/lib/plots/facet/types.js.map +1 -1
  139. package/lib/plots/funnel/geometries/compare.js +2 -1
  140. package/lib/plots/funnel/geometries/compare.js.map +1 -1
  141. package/lib/plots/funnel/geometries/facet.js +2 -1
  142. package/lib/plots/funnel/geometries/facet.js.map +1 -1
  143. package/lib/plots/funnel/types.d.ts +45 -11
  144. package/lib/plots/funnel/types.js.map +1 -1
  145. package/lib/plots/gauge/adaptor.js +30 -2
  146. package/lib/plots/gauge/adaptor.js.map +1 -1
  147. package/lib/plots/gauge/types.d.ts +84 -22
  148. package/lib/plots/gauge/types.js.map +1 -1
  149. package/lib/plots/heatmap/types.d.ts +47 -12
  150. package/lib/plots/heatmap/types.js.map +1 -1
  151. package/lib/plots/histogram/types.d.ts +17 -6
  152. package/lib/plots/histogram/types.js.map +1 -1
  153. package/lib/plots/line/types.d.ts +42 -12
  154. package/lib/plots/line/types.js.map +1 -1
  155. package/lib/plots/liquid/index.d.ts +1 -0
  156. package/lib/plots/liquid/index.js +2 -0
  157. package/lib/plots/liquid/index.js.map +1 -1
  158. package/lib/plots/liquid/shapes/liquid.d.ts +16 -1
  159. package/lib/plots/liquid/shapes/liquid.js +14 -7
  160. package/lib/plots/liquid/shapes/liquid.js.map +1 -1
  161. package/lib/plots/liquid/types.d.ts +56 -16
  162. package/lib/plots/liquid/types.js.map +1 -1
  163. package/lib/plots/mix/types.d.ts +31 -22
  164. package/lib/plots/mix/types.js.map +1 -1
  165. package/lib/plots/pie/types.d.ts +27 -10
  166. package/lib/plots/pie/types.js.map +1 -1
  167. package/lib/plots/progress/types.d.ts +13 -4
  168. package/lib/plots/progress/types.js.map +1 -1
  169. package/lib/plots/radar/types.d.ts +39 -12
  170. package/lib/plots/radar/types.js.map +1 -1
  171. package/lib/plots/radial-bar/types.d.ts +39 -12
  172. package/lib/plots/radial-bar/types.js.map +1 -1
  173. package/lib/plots/ring-progress/types.d.ts +18 -6
  174. package/lib/plots/ring-progress/types.js.map +1 -1
  175. package/lib/plots/rose/types.d.ts +32 -12
  176. package/lib/plots/rose/types.js.map +1 -1
  177. package/lib/plots/sankey/types.d.ts +51 -32
  178. package/lib/plots/sankey/types.js.map +1 -1
  179. package/lib/plots/scatter/types.d.ts +76 -22
  180. package/lib/plots/scatter/types.js.map +1 -1
  181. package/lib/plots/stock/types.d.ts +20 -7
  182. package/lib/plots/stock/types.js.map +1 -1
  183. package/lib/plots/sunburst/types.d.ts +40 -12
  184. package/lib/plots/sunburst/types.js.map +1 -1
  185. package/lib/plots/tiny-area/types.d.ts +16 -5
  186. package/lib/plots/tiny-area/types.js.map +1 -1
  187. package/lib/plots/tiny-column/types.d.ts +10 -3
  188. package/lib/plots/tiny-column/types.js.map +1 -1
  189. package/lib/plots/tiny-line/types.d.ts +17 -5
  190. package/lib/plots/tiny-line/types.js.map +1 -1
  191. package/lib/plots/treemap/types.d.ts +17 -6
  192. package/lib/plots/treemap/types.js.map +1 -1
  193. package/lib/plots/venn/types.d.ts +20 -6
  194. package/lib/plots/venn/types.js.map +1 -1
  195. package/lib/plots/violin/types.d.ts +52 -17
  196. package/lib/plots/violin/types.js.map +1 -1
  197. package/lib/plots/waterfall/types.d.ts +42 -10
  198. package/lib/plots/waterfall/types.js.map +1 -1
  199. package/lib/plots/word-cloud/types.d.ts +91 -44
  200. package/lib/plots/word-cloud/types.js.map +1 -1
  201. package/lib/types/button.d.ts +8 -4
  202. package/lib/types/button.js.map +1 -1
  203. package/lib/types/common.d.ts +145 -33
  204. package/lib/types/common.js.map +1 -1
  205. package/lib/types/drill-down.d.ts +28 -7
  206. package/lib/types/drill-down.js.map +1 -1
  207. package/lib/types/interaction.d.ts +26 -6
  208. package/lib/types/interaction.js.map +1 -1
  209. package/lib/types/label.d.ts +11 -3
  210. package/lib/types/label.js.map +1 -1
  211. package/lib/types/meta.d.ts +4 -7
  212. package/lib/types/meta.js.map +1 -1
  213. package/lib/types/pattern.d.ts +58 -18
  214. package/lib/types/pattern.js.map +1 -1
  215. package/lib/types/state.d.ts +11 -3
  216. package/lib/types/state.js.map +1 -1
  217. package/lib/types/statistic.d.ts +38 -6
  218. package/lib/types/statistic.js.map +1 -1
  219. package/lib/types/tooltip.d.ts +7 -2
  220. package/lib/types/tooltip.js.map +1 -1
  221. package/package.json +1 -1
  222. package/src/core/plot.ts +5 -4
  223. package/src/index.ts +2 -2
  224. package/src/plots/area/types.ts +35 -10
  225. package/src/plots/bar/types.ts +16 -3
  226. package/src/plots/bidirectional-bar/types.ts +21 -6
  227. package/src/plots/box/types.ts +20 -6
  228. package/src/plots/bullet/types.ts +36 -17
  229. package/src/plots/chord/types.ts +14 -11
  230. package/src/plots/circle-packing/types.ts +25 -14
  231. package/src/plots/column/types.ts +57 -20
  232. package/src/plots/dual-axes/types.ts +31 -16
  233. package/src/plots/facet/types.ts +54 -49
  234. package/src/plots/funnel/geometries/compare.ts +2 -0
  235. package/src/plots/funnel/geometries/facet.ts +2 -1
  236. package/src/plots/funnel/types.ts +45 -14
  237. package/src/plots/gauge/adaptor.ts +38 -2
  238. package/src/plots/gauge/types.ts +87 -28
  239. package/src/plots/heatmap/types.ts +49 -14
  240. package/src/plots/histogram/types.ts +17 -9
  241. package/src/plots/line/types.ts +42 -14
  242. package/src/plots/liquid/index.ts +2 -0
  243. package/src/plots/liquid/shapes/liquid.ts +16 -8
  244. package/src/plots/liquid/types.ts +56 -16
  245. package/src/plots/mix/types.ts +31 -35
  246. package/src/plots/pie/types.ts +27 -10
  247. package/src/plots/progress/types.ts +13 -4
  248. package/src/plots/radar/types.ts +39 -12
  249. package/src/plots/radial-bar/types.ts +39 -12
  250. package/src/plots/ring-progress/types.ts +18 -6
  251. package/src/plots/rose/types.ts +32 -12
  252. package/src/plots/sankey/types.ts +52 -32
  253. package/src/plots/scatter/types.ts +77 -24
  254. package/src/plots/stock/types.ts +21 -8
  255. package/src/plots/sunburst/types.ts +42 -12
  256. package/src/plots/tiny-area/types.ts +16 -5
  257. package/src/plots/tiny-column/types.ts +10 -3
  258. package/src/plots/tiny-line/types.ts +17 -5
  259. package/src/plots/treemap/types.ts +17 -7
  260. package/src/plots/venn/types.ts +21 -6
  261. package/src/plots/violin/types.ts +52 -17
  262. package/src/plots/waterfall/types.ts +42 -10
  263. package/src/plots/word-cloud/types.ts +91 -44
  264. package/src/types/button.ts +8 -4
  265. package/src/types/common.ts +145 -37
  266. package/src/types/drill-down.ts +28 -7
  267. package/src/types/interaction.ts +26 -6
  268. package/src/types/label.ts +11 -3
  269. package/src/types/meta.ts +4 -7
  270. package/src/types/pattern.ts +58 -18
  271. package/src/types/state.ts +11 -3
  272. package/src/types/statistic.ts +38 -6
  273. package/src/types/tooltip.ts +7 -2
@@ -1,30 +1,50 @@
1
1
  import { Options, StyleAttr } from '../../types';
2
2
 
3
3
  export interface RoseOptions extends Options {
4
- /** 扇形切片分类所对应的数据字段名(每个扇形的弧度相等) */
4
+ /**
5
+ * @title 扇形切片分类所对应的数据字段名
6
+ * @description 每个扇形的弧度相等
7
+ */
5
8
  readonly xField: string;
6
- /** 扇形切片半径长度所对应的数据字段名 */
9
+ /**
10
+ * @title 扇形切片半径长度所对应的数据字段名
11
+ */
7
12
  readonly yField: string;
8
- /** 拆分字段 */
13
+ /**
14
+ * @title 拆分字段
15
+ */
9
16
  readonly seriesField?: string;
10
- /** 是否分组玫瑰图 */
17
+ /**
18
+ * @title 是否分组玫瑰图
19
+ * @default false
20
+ */
11
21
  readonly isGroup?: boolean;
12
- /** 是否堆积玫瑰图 */
22
+ /**
23
+ * @title 是否堆积玫瑰图
24
+ * @default false
25
+ */
13
26
  readonly isStack?: boolean;
14
27
  /**
15
- * 玫瑰图的半径,原点为画布中心。配置值域为 (0,1]
16
- * 1 代表玫瑰图大小为 1,即撑满绘图区域
28
+ * @title 玫瑰图的半径
29
+ * @description 原点为画布中心。配置值域为 (0,1] 1 代表玫瑰图大小为 1,即撑满绘图区域
17
30
  */
18
31
  readonly radius?: number;
19
- /** 内部空心圆的半径,规则与 radius 一致 */
32
+ /**
33
+ * @title 内部空心圆的半径
34
+ * @description 规则与 radius 一致
35
+ */
20
36
  readonly innerRadius?: number;
21
- /** 玫瑰图开始角度 */
37
+ /**
38
+ * @title 玫瑰图开始角度
39
+ */
22
40
  readonly startAngle?: number;
23
- /** 玫瑰图结束角度 */
41
+ /**
42
+ * @title 玫瑰图结束角度
43
+ */
24
44
  readonly endAngle?: number;
25
45
  /**
26
- * 设置扇形样式。sectorStyle 中的fill会覆盖 color 的配置
27
- * sectorStyle 可以直接指定,也可以通过 callback 的方式,根据数据为每个扇形切片指定单独的样式
46
+ * @title 设置扇形样式
47
+ * @description sectorStyle 中的fill会覆盖 color 的配置,sectorStyle 可以直接指定,也可以通过 callback 的方式,根据数据为每个扇形切片指定单独的样式
28
48
  */
29
49
  readonly sectorStyle?: StyleAttr;
30
50
  }
@@ -2,125 +2,145 @@ import { Data, Options, State, StyleAttr } from '../../types';
2
2
  import { NodeDepth, NodeSort } from './layout';
3
3
 
4
4
  /**
5
- * node-link 数据类型的结构
5
+ * @title node-link 数据类型的结构
6
6
  */
7
7
  export type NodeLinkData = {
8
8
  /**
9
- * 节点数据
9
+ * @title 节点数据
10
10
  */
11
11
  readonly nodes: {
12
12
  /**
13
- * id 唯一即可,一般可以直接等于 name
13
+ * @title id
14
+ * @description 唯一即可,一般可以直接等于 name
14
15
  */
15
16
  readonly id: string;
16
17
  /**
17
- * 节点的名称,用于 UI 上的现实
18
+ * @title 节点的名称
19
+ * @description 用于 UI 上的现实
18
20
  */
19
21
  readonly name: string;
20
22
  /**
21
- * 节点的值,不传则节点大小有来源求和决定
23
+ * @title 节点的值
24
+ * @description 不传则节点大小有来源求和决定
22
25
  */
23
26
  readonly fixedValue?: number;
24
27
  }[];
25
- /**
26
- *
27
- */
28
+
28
29
  readonly links: {
29
30
  /**
30
- * 来源节点在 nodes 中的 index
31
+ * @title 来源节点
32
+ * @description 在 nodes 中的 index
31
33
  */
32
34
  readonly source: number;
33
35
  /**
34
- * 目标节点在 nodes 中的 index
36
+ * @title 目标节点
37
+ * @description 在 nodes 中的 index
35
38
  */
36
39
  readonly target: number;
37
40
  /**
38
- * 边的值
41
+ * @title 边的值
39
42
  */
40
43
  readonly value: number;
41
44
  }[];
42
45
  };
43
46
 
44
- /** 配置类型定义 */
47
+ /**
48
+ * @title 配置类型定义
49
+ */
45
50
  export interface SankeyOptions extends Omit<Options, 'data' | 'xField' | 'yField' | 'xAxis' | 'yAxis'> {
46
51
  /**
47
- * 数据集的类型,默认为 detail
52
+ * @title 数据集的类型
53
+ * @description 数据集的类型 'node-link' | 'detail'
54
+ * @default "detail"
48
55
  */
49
56
  readonly dataType?: 'node-link' | 'detail';
50
57
  /**
51
- * 来源字段,dataType = 'node-link' 的时候,不用传
58
+ * @title 来源字段
59
+ * @description dataType = 'node-link' 的时候,不用传
52
60
  */
53
61
  readonly sourceField?: string;
54
62
  /**
55
- * 去向字段,dataType = 'node-link' 的时候,不用传
63
+ * @title 去向字段
64
+ * @description dataType = 'node-link' 的时候,不用传
56
65
  */
57
66
  readonly targetField?: string;
58
67
  /**
59
- * 权重字段,dataType = 'node-link' 的时候,不用传
68
+ * @title 权重字段
69
+ * @description dataType = 'node-link' 的时候,不用传
60
70
  */
61
71
  readonly weightField?: string;
62
72
  /**
63
- * 附加的 元字段
73
+ * @title 附加的元字段
64
74
  */
65
75
  readonly rawFields?: string[];
66
76
  /**
67
- * 数据
77
+ * @title 数据
68
78
  */
69
79
  readonly data: Data | NodeLinkData;
70
80
  /**
71
- * 节点宽度的比如,参考画布的宽度,默认值为 0.008
81
+ * @title 节点宽度
82
+ * @description 参考画布的宽度
83
+ * @default 0.008
72
84
  */
73
85
  readonly nodeWidthRatio?: number;
74
86
  /**
75
- * 节点宽度的像素设置,优先级高于 nodeWidthRatio
87
+ * @title 节点宽度的像素设置
88
+ * @description 优先级高于 nodeWidthRatio
76
89
  */
77
90
  readonly nodeWidth?: number;
78
91
  /**
79
- * 节点之间的间距比例,参考画布高度,默认值为 0.03
92
+ * @title 节点之间的间距比例
93
+ * @description 参考画布高度
94
+ * @default 0.03
80
95
  */
81
96
  readonly nodePaddingRatio?: number;
82
97
  /**
83
- * 节点间距的像素设置,优先级高于 nodePaddingRatio
98
+ * @title 节点间距的像素设置
99
+ * @description 优先级高于 nodePaddingRatio
84
100
  */
85
101
  readonly nodePadding?: number;
86
102
  /**
87
- * 节点对齐的方式,默认为 justify
103
+ * @title 节点对齐的方式
104
+ * @description 节点对齐的方式 'left' | 'right' | 'center' | 'justify'
105
+ * @default "justify"
88
106
  */
89
107
  readonly nodeAlign?: 'left' | 'right' | 'center' | 'justify';
90
108
  /**
91
- * 节点排序方式,默认为空
109
+ * @title 节点排序方式
92
110
  */
93
111
  readonly nodeSort?: NodeSort;
94
112
  /**
95
- * 节点排放分层的顺序,从 0 开始,并且返回值需要保证所有的层级都有节点
113
+ * @title 节点排放分层的顺序
114
+ * @description 从 0 开始,并且返回值需要保证所有的层级都有节点
96
115
  */
97
116
  readonly nodeDepth?: NodeDepth;
98
117
  /**
99
- * 节点样式
118
+ * @title 节点样式
100
119
  */
101
120
  readonly nodeStyle?: StyleAttr;
102
121
  /**
103
- * 节点状态样式
122
+ * @title 节点状态样式
104
123
  */
105
124
  readonly nodeState?: State;
106
125
  /**
107
- * 边样式
126
+ * @title 边样式
108
127
  */
109
128
  readonly edgeStyle?: StyleAttr;
110
129
  /**
111
- * 边状态样式
130
+ * @title 边状态样式
112
131
  */
113
132
  readonly edgeState?: State;
114
133
  /**
115
- * 节点位置是否可以拖拽,默认为 false
134
+ * @title 节点位置是否可以拖拽
135
+ * @default false
116
136
  */
117
137
  readonly nodeDraggable?: boolean;
118
138
  /**
119
- * 边交互
139
+ * @title 边交互
120
140
  */
121
141
  readonly edgeInteractions?: Options['interactions'];
122
142
  /**
123
- * 节点交互
143
+ * @title 节点交互
124
144
  */
125
145
  readonly nodeInteractions?: Options['interactions'];
126
146
  }
@@ -15,59 +15,112 @@ interface Labels extends Omit<TextOption, 'position'> {
15
15
  }
16
16
 
17
17
  interface QuadrantOptions {
18
- /** x 方向上的象限分割基准线,默认为 0 */
18
+ /**
19
+ * @title x 基准线
20
+ * @description x 方向上的象限分割基准线
21
+ * @default 0
22
+ */
19
23
  readonly xBaseline?: number;
20
- /** y 方向上的象限分割基准线,默认为 0 */
24
+ /**
25
+ * @title y 基准线
26
+ * @description y 方向上的象限分割基准线
27
+ * @default 0
28
+ */
21
29
  readonly yBaseline?: number;
22
- /** 配置象限分割线的样式 */
30
+ /**
31
+ * @title 配置象限分割线的样式
32
+ */
23
33
  readonly lineStyle?: RegionPositionBaseOption;
24
- /** 象限样式 */
34
+ /**
35
+ * @title 象限样式
36
+ */
25
37
  readonly regionStyle?: RegionPositionBaseOption[];
26
- /** 象限文本配置 */
38
+ /**
39
+ * @title 象限文本
40
+ */
27
41
  readonly labels?: Labels[];
28
42
  }
29
43
 
30
44
  export interface RegressionLineOptions {
31
- /** 是否顶层显示,默认 false */
45
+ /**
46
+ * @title 是否顶层显示
47
+ * @default false
48
+ */
32
49
  readonly top?: boolean;
33
- /** 回归线类型 */
50
+ /**
51
+ * @title 回归线类型
52
+ */
34
53
  readonly type?: string;
35
- /** 配置回归线样式 */
54
+ /**
55
+ * @title 配置回归线样式
56
+ */
36
57
  readonly style?: ShapeStyle;
37
- /** 自定义算法 [[0,0],[100,100]] */
58
+ /**
59
+ * @title 自定义算法
60
+ * @description [[0,0],[100,100]]
61
+ */
38
62
  readonly algorithm?: Array<[number, number]> | ((data: any) => Array<[number, number]>);
39
63
  }
40
64
 
41
65
  export interface ScatterOptions extends Options {
42
- /** x 轴字段 */
66
+ /**
67
+ * @title x 轴字段
68
+ */
43
69
  readonly xField: string;
44
- /** y 轴字段 */
70
+ /**
71
+ * @title y 轴字段
72
+ */
45
73
  readonly yField: string;
46
- /** 数据调整类型 */
74
+ /**
75
+ * @title 数据调整类型
76
+ * @description 数据调整类型 'jitter' | 'stack' | 'symmetric' | 'dodge'
77
+ */
47
78
  readonly type?: 'jitter' | 'stack' | 'symmetric' | 'dodge';
48
- /** 点大小映射对应的数据字段名 */
79
+ /**
80
+ * @title 点大小映射对应的数据字段名
81
+ */
49
82
  readonly sizeField?: string;
50
- /** size 对应的图例 */
83
+ /**
84
+ * @title size 对应的图例
85
+ */
51
86
  readonly sizeLegend?: Options['legend'];
52
- /** 散点图大小 */
87
+ /**
88
+ * @title 散点图大小
89
+ */
53
90
  readonly size?: SizeAttr;
54
- /** 点形状映射对应的数据字段名 */
91
+ /**
92
+ * @title 点形状映射对应的数据字段名
93
+ */
55
94
  readonly shapeField?: string;
56
- /** shape 对应的图例 */
95
+ /**
96
+ * @title shape 对应的图例
97
+ */
57
98
  readonly shapeLegend?: Options['legend'];
58
- /** 散点图形状 */
99
+ /**
100
+ * @title 散点图形状
101
+ */
59
102
  readonly shape?: ShapeAttr;
60
- /** 散点图样式 */
103
+ /**
104
+ * @title 散点图样式
105
+ */
61
106
  readonly pointStyle?: StyleAttr;
62
- /** 点颜色映射对应的数据字段名 */
107
+ /**
108
+ * @title 点颜色映射对应的数据字段名
109
+ */
63
110
  readonly colorField?: string;
64
111
 
65
112
  // 图表标注组件
66
- /** 四象限组件 */
113
+
114
+ /**
115
+ * @title 四象限组件
116
+ */
67
117
  readonly quadrant?: QuadrantOptions;
68
- /** 归曲线 */
118
+ /**
119
+ * @title 归曲线
120
+ */
69
121
  readonly regressionLine?: RegressionLineOptions;
70
-
71
- // 图表交互
122
+ /**
123
+ * @title 图表交互
124
+ */
72
125
  readonly brush?: BrushCfg;
73
126
  }
@@ -1,18 +1,31 @@
1
1
  import { Options, StyleAttr } from '../../types';
2
2
 
3
3
  export interface StockOptions extends Options {
4
- /** x 轴字段 日期*/
4
+ /**
5
+ * @title x 轴字段 日期
6
+ */
5
7
  readonly xField: string;
6
- /** y 轴映射 range 【开盘价/收盘价/最高价/最低价】
7
- * 设置一个指定 [open, close, high, low]【开盘价/收盘价/最高价/最低价】字段的数组 */
8
+ /**
9
+ * @title y 轴映射
10
+ * @description range 【开盘价/收盘价/最高价/最低价】,设置一个指定 [open, close, high, low]【开盘价/收盘价/最高价/最低价】字段的数组
11
+ */
8
12
  readonly yField: [string, string, string, string];
9
13
 
10
- /** 颜色配置, 不支持 color 配置 */
11
- /** 上涨色 */
14
+ /**
15
+ * @title 颜色配置
16
+ * @description 不支持 color 配置
17
+ */
18
+
19
+ /**
20
+ * @title 上涨色
21
+ */
12
22
  readonly risingFill?: string;
13
- /** 下跌色 */
23
+ /**
24
+ * @title 下跌色
25
+ */
14
26
  readonly fallingFill?: string;
15
-
16
- /** 样式配置 */
27
+ /**
28
+ * @title 样式配置
29
+ */
17
30
  readonly stockStyle?: StyleAttr;
18
31
  }
@@ -3,36 +3,66 @@ import { DrillDownCfg } from '../../types/drill-down';
3
3
  import { HierarchyOption } from '../../utils/hierarchy/types';
4
4
 
5
5
  export interface SunburstOptions extends Omit<Options, 'data' | 'slider' | 'scrollbar' | 'xAxis' | 'yAxis'> {
6
- /** 旭日图数据 */
6
+ /**
7
+ * @title 旭日图数据
8
+ */
7
9
  readonly data: any;
8
- /** 径向类型 */
10
+ /**
11
+ * @title 径向类型
12
+ * @description 径向类型'x' | 'y'
13
+ */
9
14
  readonly reflect?: 'x' | 'y';
10
15
 
11
16
  // 样式
12
- /** 内径 */
17
+
18
+ /**
19
+ * @title 内径
20
+ */
13
21
  readonly innerRadius?: number;
14
- /** 半经 */
22
+ /**
23
+ * @title 半经
24
+ */
15
25
  readonly radius?: number;
16
- /** 颜色映射 */
26
+ /**
27
+ * @title 颜色映射
28
+ */
17
29
  readonly colorField?: string;
18
- /** 颜色*/
30
+ /**
31
+ * @title 颜色
32
+ */
19
33
  readonly color?: ColorAttr;
20
- /** 旭日图形样式 */
34
+ /**
35
+ * @title 旭日图形样式
36
+ */
21
37
  readonly sunburstStyle?: StyleAttr;
22
38
 
23
- /** 层级布局配置 */
39
+ /**
40
+ * @title 层级布局
41
+ */
24
42
  readonly hierarchyConfig?: Omit<HierarchyOption, 'as' | 'type'> & {
25
43
  /** default: 'value', required data to be like: { name: 'xx', [field]: 12, children: [] } */
26
44
  readonly field?: string;
27
- /** 是否忽略父节点的权重, 默认: false, 其父节点的权重不由子节点权重总和决定 */
45
+ /**
46
+ * @title 是否忽略父节点的权重
47
+ * @description 其父节点的权重不由子节点权重总和决定
48
+ * @default false
49
+ */
28
50
  readonly ignoreParentValue?: boolean;
29
- /** 默认展示的层级深度. 默认空, 代表全部展示. 取值 > 0 */
51
+ /**
52
+ * @title 展示的层级深度
53
+ * @description 取值 > 0 默认空, 代表全部展示
54
+ */
30
55
  readonly activeDepth?: number;
31
56
  };
32
57
 
33
58
  // 其他
34
- /** 额外的原始字段 */
59
+
60
+ /**
61
+ * @title 额外的原始字段
62
+ */
35
63
  readonly rawFields?: string[];
36
- /** 下钻交互 */
64
+ /**
65
+ * @title 下钻交互
66
+ */
37
67
  readonly drilldown?: DrillDownCfg;
38
68
  }
@@ -4,14 +4,25 @@ import { PointGeometryOptions } from '../../adaptor/geometries/point';
4
4
 
5
5
  /** mini 图类型定义需要 omit 很多的 G2 Options 配置 */
6
6
  export interface TinyAreaOptions extends Omit<Options, 'data' | 'legend' | 'label'> {
7
- /** 具体的数据 */
7
+ /**
8
+ * @title 具体的数据
9
+ */
8
10
  readonly data: number[];
9
- /** 是否平滑 */
11
+ /**
12
+ * @title 是否平滑
13
+ * @default false
14
+ */
10
15
  readonly smooth?: boolean;
11
- /** 面积折线图形样式 */
16
+ /**
17
+ * @title 面积折线图形样式
18
+ */
12
19
  readonly areaStyle?: StyleAttr;
13
- /** 面积折线图形样式 */
20
+ /**
21
+ * @title 面积折线图形样式
22
+ */
14
23
  readonly line?: MappingOptions;
15
- /** 面积点图形样式 */
24
+ /**
25
+ * @title 面积点图形样式
26
+ */
16
27
  readonly point?: MappingOptions & Pick<PointGeometryOptions, 'state'>;
17
28
  }
@@ -2,10 +2,17 @@ import { Options, StyleAttr } from '../../types';
2
2
 
3
3
  /** mini 图类型定义需要 omit 很多的 G2 Options 配置 */
4
4
  export interface TinyColumnOptions extends Omit<Options, 'data' | 'legend' | 'label'> {
5
- /** 具体的数据 */
5
+ /**
6
+ * @title 具体的数据
7
+ */
6
8
  readonly data: number[];
7
- /** 柱状图宽度占比 [0-1] */
9
+ /**
10
+ * @title 柱状图宽度占比
11
+ * @description 范围[0-1]
12
+ */
8
13
  readonly columnWidthRatio?: number;
9
- /** 迷你柱形图形样式 */
14
+ /**
15
+ * @title 迷你柱形图形样式
16
+ */
10
17
  readonly columnStyle?: StyleAttr;
11
18
  }
@@ -4,14 +4,26 @@ import { PointGeometryOptions } from '../../adaptor/geometries/point';
4
4
 
5
5
  /** mini 图类型定义需要 omit 很多的 G2 Options 配置 */
6
6
  export interface TinyLineOptions extends Omit<Options, 'data' | 'legend' | 'label'> {
7
- /** 具体的数据 */
7
+ /**
8
+ * @title 具体的数据
9
+ */
8
10
  readonly data: number[];
9
- /** 是否平滑 */
11
+ /**
12
+ * @title 是否平滑
13
+ * @default false
14
+ */
10
15
  readonly smooth?: boolean;
11
- /** 是否连接空数据 */
16
+ /**
17
+ * @title 是否连接空数据
18
+ * @default false
19
+ */
12
20
  readonly connectNulls?: boolean;
13
- /** 折线图形样式 */
21
+ /**
22
+ * @title 折线图形样式
23
+ */
14
24
  readonly lineStyle?: StyleAttr;
15
- /** 折线点图形样式 */
25
+ /**
26
+ * @title 折线点图形样式
27
+ */
16
28
  readonly point?: MappingOptions & Pick<PointGeometryOptions, 'state'>;
17
29
  }
@@ -3,19 +3,29 @@ import { DrillDownCfg } from '../../types/drill-down';
3
3
  import { HierarchyOption } from '../../utils/hierarchy/types';
4
4
 
5
5
  export interface TreemapOptions extends Omit<Options, 'data'> {
6
- /** 颜色字段 */
6
+ /**
7
+ * @title 颜色字段
8
+ */
7
9
  readonly colorField?: string;
8
- /** 数据字段 */
10
+ /**
11
+ * @title 数据字段
12
+ */
9
13
  readonly data?: Record<string, any>;
10
- /** 图形样式 */
14
+ /**
15
+ * @title 图形样式
16
+ */
11
17
  readonly rectStyle?: StyleAttr;
12
- /** 层级布局配置 */
18
+ /**
19
+ * @title 层级布局
20
+ */
13
21
  readonly hierarchyConfig?: Omit<HierarchyOption, 'as' | 'type' | 'field'>;
14
22
  /**
15
- * 附加的 源字段
23
+ * @title 附加的源字段
16
24
  */
17
25
  readonly rawFields?: string[];
18
- // 矩阵树图 内置一些交互
19
- /** 下钻交互相关配置 */
26
+ /**
27
+ * @title 矩阵树图
28
+ * @description 内置一些交互 下钻交互相关配置
29
+ */
20
30
  readonly drilldown?: DrillDownCfg;
21
31
  }
@@ -6,19 +6,34 @@ export type VennData = (Types.Datum & { sets: string[]; [PATH_FIELD]: string; [I
6
6
 
7
7
  /** 配置类型定义 */
8
8
  export interface VennOptions extends Options {
9
- /** 韦恩图 数据 */
9
+ /**
10
+ * @title 韦恩图数据
11
+ */
10
12
  readonly data: Types.Datum[];
11
- /** 集合字段 */
13
+ /**
14
+ * @title 集合字段
15
+ */
12
16
  readonly setsField: string;
13
- /** 大小字段 */
17
+ /**
18
+ * @title 大小字段
19
+ */
14
20
  readonly sizeField: string;
15
21
 
16
22
  // 韦恩图 样式
17
- /** color */
23
+
24
+ /**
25
+ * @title 颜色
26
+ */
18
27
  readonly color?: string | string[] | ((datum: Datum, defaultColor?: string) => string);
19
- /** 并集合的颜色混合方式, 可选项: 参考 https://gka.github.io/chroma.js/#chroma-blend, 默认: multiply */
28
+ /**
29
+ * @title 并集合的颜色混合方式
30
+ * @description 可选项: 参考 https://gka.github.io/chroma.js/#chroma-blend
31
+ * @default "multiply"
32
+ */
20
33
  readonly blendMode?: string;
21
- /** point 样式 */
34
+ /**
35
+ * @title point 样式
36
+ */
22
37
  readonly pointStyle?: StyleAttr;
23
38
  }
24
39