index.ts 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. export const version = '2.4.31';
  2. // G2 自定义能力透出
  3. import * as G2 from '@antv/g2';
  4. /** 开放一些通用的 adaptor 通道方法,实验阶段:不保证稳定性 */
  5. import { animation, annotation, interaction, legend, scale, theme, tooltip } from './adaptor/common';
  6. // 国际化处理
  7. import { registerLocale } from './core/locale';
  8. import { EN_US_LOCALE } from './locales/en_US';
  9. import { ZH_CN_LOCALE } from './locales/zh_CN';
  10. /** 各个 geometry 的 adaptor,可以让开发者更快的构造图形 */
  11. export { area, interval, line, point, polygon, schema } from './adaptor/geometries';
  12. export type {
  13. AreaGeometryOptions,
  14. IntervalGeometryOptions,
  15. LineGeometryOptions,
  16. PointGeometryOptions,
  17. PolygonGeometryOptions,
  18. SchemaGeometryOptions,
  19. } from './adaptor/geometries';
  20. /** Adaptor 及其参数的类型定义 */
  21. export type { Adaptor, Params } from './core/adaptor';
  22. /** 全局变量 */
  23. export { setGlobal } from './core/global';
  24. /** G2Plot 的 Plot 基类 */
  25. export { Plot } from './core/plot';
  26. /** 对于没有开发完成的图表,可以暂时先放到 Lab 下面,先做体验,稳定后放到根 export */
  27. export { Lab } from './lab';
  28. // 面积图及类型定义 | author by [hustcc](https://github.com/hustcc)
  29. export { Area } from './plots/area';
  30. export type { AreaOptions } from './plots/area';
  31. // 条形图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ)
  32. export { Bar } from './plots/bar';
  33. export type { BarOptions } from './plots/bar';
  34. // 对称条形图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
  35. export { BidirectionalBar } from './plots/bidirectional-bar';
  36. export type { BidirectionalBarOptions } from './plots/bidirectional-bar';
  37. // 箱线图及类型定义 | author by [BBSQQ](https://github.com/BBSQQ), [visiky](https://github.com/visiky)
  38. export { Box } from './plots/box';
  39. export type { BoxOptions } from './plots/box';
  40. // 子弹图及类型定义 | author by [arcsin1](https://github.com/arcsin1)
  41. export { Bullet } from './plots/bullet';
  42. export type { BulletOptions } from './plots/bullet';
  43. // 弦图及类型定义 | author by [MrSmallLiu](https://github.com/MrSmallLiu), [visiky](https://github.com/visiky)
  44. export { Chord } from './plots/chord';
  45. export type { ChordOptions } from './plots/chord';
  46. // circle-packing 及类型定义 | author by [visiky](https://github.com/visiky), [Angeli](https://github.com/Angelii)
  47. export { CirclePacking } from './plots/circle-packing';
  48. export type { CirclePackingOptions } from './plots/circle-packing';
  49. // 柱形图及类型定义 | author by [zqlu](https://github.com/zqlu)
  50. export { Column } from './plots/column';
  51. export type { ColumnOptions } from './plots/column';
  52. // 混合图形 | author by [liuzhenying](https://github.com/liuzhenying)
  53. export { DualAxes } from './plots/dual-axes';
  54. export type { DualAxesOptions } from './plots/dual-axes';
  55. // 分面图及类型定义 | author by [visiky](https://github.com/visiky)
  56. export { Facet } from './plots/facet';
  57. export type { FacetOptions } from './plots/facet';
  58. // 漏斗图及类型定义
  59. export { Funnel, FUNNEL_CONVERSATION_FIELD } from './plots/funnel';
  60. export type { FunnelOptions } from './plots/funnel';
  61. // 仪表盘及类型定义 | author by [hustcc](https://github.com/hustcc)
  62. export { Gauge } from './plots/gauge';
  63. export type { GaugeOptions } from './plots/gauge';
  64. // 热力图及类型定义 | author by [jiazhewang](https://github.com/jiazhewang)
  65. export { Heatmap } from './plots/heatmap';
  66. export type { HeatmapOptions } from './plots/heatmap';
  67. // 直方图及类型定义 | author by [arcsin1](https://github.com/arcsin1), [visiky](https://github.com/visiky)
  68. export { Histogram } from './plots/histogram';
  69. export type { HistogramOptions } from './plots/histogram';
  70. // 折线图及类型定义 | author by [hustcc](https://github.com/hustcc)
  71. export { Line } from './plots/line';
  72. export type { LineOptions } from './plots/line';
  73. // 水波图及类型定义 | author by [CarisL](https://github.com/CarisL), [hustcc](https://github.com/hustcc), [pearmini](https://github.com/pearmini)
  74. export { addWaterWave, Liquid } from './plots/liquid';
  75. export type { LiquidOptions } from './plots/liquid';
  76. // 已经废弃,更名为 Mix
  77. export { Mix as Mix, Mix as MultiView } from './plots/mix';
  78. export type { MixOptions, MixOptions as MultiViewOptions } from './plots/mix';
  79. // 饼图及类型定义 | author by [visiky](https://github.com/visiky)
  80. export { Pie } from './plots/pie';
  81. export type { PieOptions } from './plots/pie';
  82. // 进度图及类型定义 | author by [connono](https://github.com/connono)
  83. export { Progress } from './plots/progress';
  84. export type { ProgressOptions } from './plots/progress';
  85. // 雷达图及类型定义 | author by [visiky](https://github.com/visiky)
  86. export { Radar } from './plots/radar';
  87. export type { RadarOptions } from './plots/radar';
  88. // 玉珏图 | author by [yujs](https://github.com/yujs) | updated by [visiky](https://github.com/visiky)
  89. export { RadialBar } from './plots/radial-bar';
  90. export type { RadialBarOptions } from './plots/radial-bar';
  91. // 环形进度图及类型定义 | author by [connono](https://github.com/connono)
  92. export { RingProgress } from './plots/ring-progress';
  93. export type { RingProgressOptions } from './plots/ring-progress';
  94. // 玫瑰图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
  95. export { Rose } from './plots/rose';
  96. export type { RoseOptions } from './plots/rose';
  97. // 桑基图及类型定义 | author by [hustcc](https://github.com/hustcc)
  98. export { Sankey } from './plots/sankey';
  99. export type { SankeyOptions } from './plots/sankey';
  100. // 散点图及类型定义 | author by [lxfu1](https://github.com/lxfu1)
  101. export { Scatter } from './plots/scatter';
  102. export type { ScatterOptions } from './plots/scatter';
  103. // K线图及类型定义 | author by [jhwong](https://github.com/jinhuiWong), [visiky](https://github.com/visiky)
  104. export { Stock } from './plots/stock';
  105. export type { StockOptions } from './plots/stock';
  106. // 旭日图及类型定义 | author by [lxfu1](https://github.com/lxfu1), [visiky](https://github.com/visiky)
  107. export { Sunburst } from './plots/sunburst';
  108. export type { SunburstOptions } from './plots/sunburst';
  109. // 迷你面积图及类型定义 | author by [connono](https://github.com/connono)
  110. export { TinyArea } from './plots/tiny-area';
  111. export type { TinyAreaOptions } from './plots/tiny-area';
  112. // 迷你柱形图及类型定义 | author by [connono](https://github.com/connono)
  113. export { TinyColumn } from './plots/tiny-column';
  114. export type { TinyColumnOptions } from './plots/tiny-column';
  115. // 迷你折线图及类型定义 | author by [connono](https://github.com/connono)
  116. export { TinyLine } from './plots/tiny-line';
  117. export type { TinyLineOptions } from './plots/tiny-line';
  118. // 矩形树图
  119. export { Treemap } from './plots/treemap';
  120. export type { TreemapOptions } from './plots/treemap';
  121. // 韦恩图及类型定义 | author by [visiky](https://github.com/visiky)
  122. export { Venn } from './plots/venn';
  123. export type { VennOptions } from './plots/venn';
  124. // 小提琴图及类型定义 | author by [YiSiWang](https://github.com/YiSiWang), [visiky](https://github.com/visiky)
  125. export { Violin } from './plots/violin';
  126. export type { ViolinOptions } from './plots/violin';
  127. // 瀑布图 | author by [visiky](https://github.com/visiky)
  128. export { Waterfall } from './plots/waterfall';
  129. export type { WaterfallOptions } from './plots/waterfall';
  130. // 词云图及类型定义 | author by [zhangzhonghe](https://github.com/zhangzhonghe)
  131. export { WordCloud } from './plots/word-cloud';
  132. export type { WordCloudOptions } from './plots/word-cloud';
  133. // 以下开放自定义图表开发的能力(目前仅仅是孵化中)
  134. /** 所有开放图表都使用 G2Plot.P 作为入口开发,理论上官方的所有图表都可以走 G2Plot.P 的入口(暂时不处理) */
  135. export { P } from './plugin';
  136. // 类型定义导出
  137. export * from './types';
  138. /** 开发 adaptor 可能会用到的方法或一些工具方法,不强制使用 */
  139. export { flow, measureTextWidth } from './utils';
  140. /** 开放 getCanvasPatterng 方法 */
  141. export { getCanvasPattern } from './utils/pattern';
  142. export { G2 };
  143. /** 透出 国际化 工具函数,便于使用 */
  144. export { registerLocale };
  145. /** default locale register */
  146. registerLocale('en-US', EN_US_LOCALE);
  147. registerLocale('zh-CN', ZH_CN_LOCALE);
  148. export const adaptors = { scale, legend, tooltip, annotation, interaction, theme, animation };