@visactor/react-vchart 0.11.6-alpha.2 → 0.14.14-vstory.1

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 (245) hide show
  1. package/cjs/charts/AreaChart.d.ts +4 -4
  2. package/cjs/charts/AreaChart.js +2 -2
  3. package/cjs/charts/AreaChart.js.map +1 -1
  4. package/cjs/charts/Bar3dChart.d.ts +4 -4
  5. package/cjs/charts/Bar3dChart.js +2 -2
  6. package/cjs/charts/Bar3dChart.js.map +1 -1
  7. package/cjs/charts/BarChart.d.ts +4 -4
  8. package/cjs/charts/BarChart.js +2 -2
  9. package/cjs/charts/BarChart.js.map +1 -1
  10. package/cjs/charts/BaseChart.d.ts +5 -4
  11. package/cjs/charts/BaseChart.js +11 -12
  12. package/cjs/charts/BaseChart.js.map +1 -1
  13. package/cjs/charts/BoxPlotChart.d.ts +5 -5
  14. package/cjs/charts/BoxPlotChart.js +2 -2
  15. package/cjs/charts/BoxPlotChart.js.map +1 -1
  16. package/cjs/charts/CirclePackingChart.d.ts +5 -5
  17. package/cjs/charts/CirclePackingChart.js +2 -2
  18. package/cjs/charts/CirclePackingChart.js.map +1 -1
  19. package/cjs/charts/CircularProgressChart.d.ts +5 -5
  20. package/cjs/charts/CircularProgressChart.js +2 -2
  21. package/cjs/charts/CircularProgressChart.js.map +1 -1
  22. package/cjs/charts/CommonChart.d.ts +5 -5
  23. package/cjs/charts/CommonChart.js.map +1 -1
  24. package/cjs/charts/CorrelationChart.d.ts +5 -5
  25. package/cjs/charts/CorrelationChart.js +2 -2
  26. package/cjs/charts/CorrelationChart.js.map +1 -1
  27. package/cjs/charts/Funnel3dChart.d.ts +5 -5
  28. package/cjs/charts/Funnel3dChart.js +2 -2
  29. package/cjs/charts/Funnel3dChart.js.map +1 -1
  30. package/cjs/charts/FunnelChart.d.ts +5 -5
  31. package/cjs/charts/FunnelChart.js +2 -2
  32. package/cjs/charts/FunnelChart.js.map +1 -1
  33. package/cjs/charts/GaugeChart.d.ts +4 -4
  34. package/cjs/charts/GaugeChart.js +2 -2
  35. package/cjs/charts/GaugeChart.js.map +1 -1
  36. package/cjs/charts/HeatmapChart.d.ts +4 -4
  37. package/cjs/charts/HeatmapChart.js +2 -2
  38. package/cjs/charts/HeatmapChart.js.map +1 -1
  39. package/cjs/charts/Histogram3dChart.d.ts +5 -5
  40. package/cjs/charts/Histogram3dChart.js +2 -2
  41. package/cjs/charts/Histogram3dChart.js.map +1 -1
  42. package/cjs/charts/HistogramChart.d.ts +5 -5
  43. package/cjs/charts/HistogramChart.js +2 -2
  44. package/cjs/charts/HistogramChart.js.map +1 -1
  45. package/cjs/charts/LineChart.d.ts +4 -4
  46. package/cjs/charts/LineChart.js +2 -2
  47. package/cjs/charts/LineChart.js.map +1 -1
  48. package/cjs/charts/LinearProgressChart.d.ts +5 -5
  49. package/cjs/charts/LinearProgressChart.js +2 -2
  50. package/cjs/charts/LinearProgressChart.js.map +1 -1
  51. package/cjs/charts/LiquidChart.d.ts +4 -4
  52. package/cjs/charts/LiquidChart.js +2 -2
  53. package/cjs/charts/LiquidChart.js.map +1 -1
  54. package/cjs/charts/MapChart.d.ts +4 -4
  55. package/cjs/charts/MapChart.js +2 -2
  56. package/cjs/charts/MapChart.js.map +1 -1
  57. package/cjs/charts/Pie3dChart.d.ts +4 -4
  58. package/cjs/charts/Pie3dChart.js +2 -2
  59. package/cjs/charts/Pie3dChart.js.map +1 -1
  60. package/cjs/charts/PieChart.d.ts +4 -4
  61. package/cjs/charts/PieChart.js +2 -2
  62. package/cjs/charts/PieChart.js.map +1 -1
  63. package/cjs/charts/RadarChart.d.ts +4 -4
  64. package/cjs/charts/RadarChart.js +2 -2
  65. package/cjs/charts/RadarChart.js.map +1 -1
  66. package/cjs/charts/RangeColumn3dChart.d.ts +4 -4
  67. package/cjs/charts/RangeColumn3dChart.js +2 -2
  68. package/cjs/charts/RangeColumn3dChart.js.map +1 -1
  69. package/cjs/charts/RangeColumnChart.d.ts +4 -4
  70. package/cjs/charts/RangeColumnChart.js +2 -2
  71. package/cjs/charts/RangeColumnChart.js.map +1 -1
  72. package/cjs/charts/RoseChart.d.ts +4 -4
  73. package/cjs/charts/RoseChart.js +2 -2
  74. package/cjs/charts/RoseChart.js.map +1 -1
  75. package/cjs/charts/SankeyChart.d.ts +4 -4
  76. package/cjs/charts/SankeyChart.js +2 -2
  77. package/cjs/charts/SankeyChart.js.map +1 -1
  78. package/cjs/charts/ScatterChart.d.ts +4 -4
  79. package/cjs/charts/ScatterChart.js +2 -2
  80. package/cjs/charts/ScatterChart.js.map +1 -1
  81. package/cjs/charts/SequenceChart.d.ts +4 -4
  82. package/cjs/charts/SequenceChart.js +2 -2
  83. package/cjs/charts/SequenceChart.js.map +1 -1
  84. package/cjs/charts/SunburstChart.d.ts +4 -4
  85. package/cjs/charts/SunburstChart.js +2 -2
  86. package/cjs/charts/SunburstChart.js.map +1 -1
  87. package/cjs/charts/TreemapChart.d.ts +4 -4
  88. package/cjs/charts/TreemapChart.js +2 -2
  89. package/cjs/charts/TreemapChart.js.map +1 -1
  90. package/cjs/charts/VennChart.d.ts +10 -0
  91. package/cjs/charts/VennChart.js +12 -0
  92. package/cjs/charts/VennChart.js.map +1 -0
  93. package/cjs/charts/WaterfallChart.d.ts +4 -4
  94. package/cjs/charts/WaterfallChart.js +3 -2
  95. package/cjs/charts/WaterfallChart.js.map +1 -1
  96. package/cjs/charts/WordCloud3dChart.d.ts +4 -4
  97. package/cjs/charts/WordCloud3dChart.js +2 -2
  98. package/cjs/charts/WordCloud3dChart.js.map +1 -1
  99. package/cjs/charts/WordCloudChart.d.ts +4 -4
  100. package/cjs/charts/WordCloudChart.js +2 -2
  101. package/cjs/charts/WordCloudChart.js.map +1 -1
  102. package/cjs/charts/index.d.ts +1 -0
  103. package/cjs/charts/index.js +2 -1
  104. package/cjs/charts/index.js.map +1 -1
  105. package/cjs/charts/registers/cartesian.d.ts +1 -0
  106. package/cjs/charts/registers/cartesian.js +10 -0
  107. package/cjs/charts/registers/cartesian.js.map +1 -0
  108. package/cjs/charts/registers/polar.d.ts +1 -0
  109. package/cjs/charts/registers/polar.js +10 -0
  110. package/cjs/charts/registers/polar.js.map +1 -0
  111. package/cjs/charts/registers/simple.d.ts +1 -0
  112. package/cjs/charts/registers/simple.js +10 -0
  113. package/cjs/charts/registers/simple.js.map +1 -0
  114. package/cjs/components/Player.js +1 -2
  115. package/cjs/components/Region.js +2 -1
  116. package/cjs/index.d.ts +1 -1
  117. package/cjs/index.js +1 -1
  118. package/cjs/index.js.map +1 -1
  119. package/cjs/series/Area.js +1 -1
  120. package/esm/charts/AreaChart.d.ts +4 -4
  121. package/esm/charts/AreaChart.js +3 -3
  122. package/esm/charts/AreaChart.js.map +1 -1
  123. package/esm/charts/Bar3dChart.d.ts +4 -4
  124. package/esm/charts/Bar3dChart.js +2 -2
  125. package/esm/charts/Bar3dChart.js.map +1 -1
  126. package/esm/charts/BarChart.d.ts +4 -4
  127. package/esm/charts/BarChart.js +2 -2
  128. package/esm/charts/BarChart.js.map +1 -1
  129. package/esm/charts/BaseChart.d.ts +5 -4
  130. package/esm/charts/BaseChart.js +11 -12
  131. package/esm/charts/BaseChart.js.map +1 -1
  132. package/esm/charts/BoxPlotChart.d.ts +5 -5
  133. package/esm/charts/BoxPlotChart.js +2 -2
  134. package/esm/charts/BoxPlotChart.js.map +1 -1
  135. package/esm/charts/CirclePackingChart.d.ts +5 -5
  136. package/esm/charts/CirclePackingChart.js +3 -3
  137. package/esm/charts/CirclePackingChart.js.map +1 -1
  138. package/esm/charts/CircularProgressChart.d.ts +5 -5
  139. package/esm/charts/CircularProgressChart.js +3 -3
  140. package/esm/charts/CircularProgressChart.js.map +1 -1
  141. package/esm/charts/CommonChart.d.ts +5 -5
  142. package/esm/charts/CommonChart.js.map +1 -1
  143. package/esm/charts/CorrelationChart.d.ts +5 -5
  144. package/esm/charts/CorrelationChart.js +2 -2
  145. package/esm/charts/CorrelationChart.js.map +1 -1
  146. package/esm/charts/Funnel3dChart.d.ts +5 -5
  147. package/esm/charts/Funnel3dChart.js +2 -2
  148. package/esm/charts/Funnel3dChart.js.map +1 -1
  149. package/esm/charts/FunnelChart.d.ts +5 -5
  150. package/esm/charts/FunnelChart.js +2 -2
  151. package/esm/charts/FunnelChart.js.map +1 -1
  152. package/esm/charts/GaugeChart.d.ts +4 -4
  153. package/esm/charts/GaugeChart.js +2 -2
  154. package/esm/charts/GaugeChart.js.map +1 -1
  155. package/esm/charts/HeatmapChart.d.ts +4 -4
  156. package/esm/charts/HeatmapChart.js +3 -3
  157. package/esm/charts/HeatmapChart.js.map +1 -1
  158. package/esm/charts/Histogram3dChart.d.ts +5 -5
  159. package/esm/charts/Histogram3dChart.js +2 -2
  160. package/esm/charts/Histogram3dChart.js.map +1 -1
  161. package/esm/charts/HistogramChart.d.ts +5 -5
  162. package/esm/charts/HistogramChart.js +2 -2
  163. package/esm/charts/HistogramChart.js.map +1 -1
  164. package/esm/charts/LineChart.d.ts +4 -4
  165. package/esm/charts/LineChart.js +3 -3
  166. package/esm/charts/LineChart.js.map +1 -1
  167. package/esm/charts/LinearProgressChart.d.ts +5 -5
  168. package/esm/charts/LinearProgressChart.js +3 -3
  169. package/esm/charts/LinearProgressChart.js.map +1 -1
  170. package/esm/charts/LiquidChart.d.ts +4 -4
  171. package/esm/charts/LiquidChart.js +3 -3
  172. package/esm/charts/LiquidChart.js.map +1 -1
  173. package/esm/charts/MapChart.d.ts +4 -4
  174. package/esm/charts/MapChart.js +3 -3
  175. package/esm/charts/MapChart.js.map +1 -1
  176. package/esm/charts/Pie3dChart.d.ts +4 -4
  177. package/esm/charts/Pie3dChart.js +3 -3
  178. package/esm/charts/Pie3dChart.js.map +1 -1
  179. package/esm/charts/PieChart.d.ts +4 -4
  180. package/esm/charts/PieChart.js +3 -3
  181. package/esm/charts/PieChart.js.map +1 -1
  182. package/esm/charts/RadarChart.d.ts +4 -4
  183. package/esm/charts/RadarChart.js +3 -3
  184. package/esm/charts/RadarChart.js.map +1 -1
  185. package/esm/charts/RangeColumn3dChart.d.ts +4 -4
  186. package/esm/charts/RangeColumn3dChart.js +3 -3
  187. package/esm/charts/RangeColumn3dChart.js.map +1 -1
  188. package/esm/charts/RangeColumnChart.d.ts +4 -4
  189. package/esm/charts/RangeColumnChart.js +3 -3
  190. package/esm/charts/RangeColumnChart.js.map +1 -1
  191. package/esm/charts/RoseChart.d.ts +4 -4
  192. package/esm/charts/RoseChart.js +2 -2
  193. package/esm/charts/RoseChart.js.map +1 -1
  194. package/esm/charts/SankeyChart.d.ts +4 -4
  195. package/esm/charts/SankeyChart.js +4 -4
  196. package/esm/charts/SankeyChart.js.map +1 -1
  197. package/esm/charts/ScatterChart.d.ts +4 -4
  198. package/esm/charts/ScatterChart.js +3 -3
  199. package/esm/charts/ScatterChart.js.map +1 -1
  200. package/esm/charts/SequenceChart.d.ts +4 -4
  201. package/esm/charts/SequenceChart.js +3 -3
  202. package/esm/charts/SequenceChart.js.map +1 -1
  203. package/esm/charts/SunburstChart.d.ts +4 -4
  204. package/esm/charts/SunburstChart.js +4 -4
  205. package/esm/charts/SunburstChart.js.map +1 -1
  206. package/esm/charts/TreemapChart.d.ts +4 -4
  207. package/esm/charts/TreemapChart.js +4 -2
  208. package/esm/charts/TreemapChart.js.map +1 -1
  209. package/esm/charts/VennChart.d.ts +10 -0
  210. package/esm/charts/VennChart.js +10 -0
  211. package/esm/charts/VennChart.js.map +1 -0
  212. package/esm/charts/WaterfallChart.d.ts +4 -4
  213. package/esm/charts/WaterfallChart.js +4 -3
  214. package/esm/charts/WaterfallChart.js.map +1 -1
  215. package/esm/charts/WordCloud3dChart.d.ts +4 -4
  216. package/esm/charts/WordCloud3dChart.js +3 -3
  217. package/esm/charts/WordCloud3dChart.js.map +1 -1
  218. package/esm/charts/WordCloudChart.d.ts +4 -4
  219. package/esm/charts/WordCloudChart.js +2 -2
  220. package/esm/charts/WordCloudChart.js.map +1 -1
  221. package/esm/charts/index.d.ts +1 -0
  222. package/esm/charts/index.js +2 -0
  223. package/esm/charts/index.js.map +1 -1
  224. package/esm/charts/registers/cartesian.d.ts +1 -0
  225. package/esm/charts/registers/cartesian.js +4 -0
  226. package/esm/charts/registers/cartesian.js.map +1 -0
  227. package/esm/charts/registers/polar.d.ts +1 -0
  228. package/esm/charts/registers/polar.js +4 -0
  229. package/esm/charts/registers/polar.js.map +1 -0
  230. package/esm/charts/registers/simple.d.ts +1 -0
  231. package/esm/charts/registers/simple.js +4 -0
  232. package/esm/charts/registers/simple.js.map +1 -0
  233. package/esm/components/Player.js +1 -2
  234. package/esm/components/Region.js +2 -1
  235. package/esm/index.d.ts +1 -1
  236. package/esm/index.js +1 -1
  237. package/esm/index.js.map +1 -1
  238. package/esm/series/Area.js +1 -1
  239. package/package.json +8 -8
  240. package/cjs/charts/register.d.ts +0 -3
  241. package/cjs/charts/register.js +0 -12
  242. package/cjs/charts/register.js.map +0 -1
  243. package/esm/charts/register.d.ts +0 -3
  244. package/esm/charts/register.js +0 -8
  245. package/esm/charts/register.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  import type { IAreaChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface AreaChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IAreaChartSpec, 'type'> {
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface AreaChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IAreaChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const AreaChart: React.ForwardRefExoticComponent<AreaChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'area';
9
+ type?: 'area';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.AreaChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), cartesian_1 = require("./registers/cartesian");
8
8
 
9
9
  exports.AreaChart = (0, BaseChart_1.createChart)("AreaChart", {
10
10
  type: "area",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerAreaChart, vchart_1.registerLabel, ...register_1.cartesianComponentsRegisters ]);
12
+ }, [ vchart_1.registerAreaChart, vchart_1.registerLabel, vchart_1.registerTotalLabel, ...cartesian_1.registers ]);
13
13
  //# sourceMappingURL=AreaChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/AreaChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA4E;AAC5E,2CAA0D;AAC1D,yCAA0D;AAM7C,QAAA,SAAS,GAAG,IAAA,uBAAW,EAClC,WAAW,EACX;IACE,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,0BAAiB,EAAE,sBAAa,EAAE,GAAG,uCAA4B,CAAC,CACpE,CAAC","file":"AreaChart.js","sourcesContent":["import React from 'react';\nimport type { IAreaChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerAreaChart, registerLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { cartesianComponentsRegisters } from './register';\n\nexport interface AreaChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<IAreaChartSpec, 'type'> {}\n\nexport const AreaChart = createChart<React.PropsWithChildren<AreaChartProps> & { type: 'area' }>(\n 'AreaChart',\n {\n type: 'area',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerAreaChart, registerLabel, ...cartesianComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/AreaChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAgG;AAEhG,2CAA0C;AAC1C,qDAAkD;AAMrC,QAAA,SAAS,GAAG,IAAA,uBAAW,EAClC,WAAW,EACX;IACE,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,0BAAiB,EAAE,sBAAa,EAAE,2BAAkB,EAAE,GAAG,qBAAS,CAAC,CACrE,CAAC","file":"AreaChart.js","sourcesContent":["import type React from 'react';\nimport type { IAreaChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerAreaChart, registerLabel, registerTotalLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/cartesian';\n\nexport interface AreaChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<IAreaChartSpec>, 'type'> {}\n\nexport const AreaChart = createChart<React.PropsWithChildren<AreaChartProps> & { type?: 'area' }>(\n 'AreaChart',\n {\n type: 'area',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerAreaChart, registerLabel, registerTotalLabel, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  import type { IBar3dChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface Bar3dChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IBar3dChartSpec, 'type'> {
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface Bar3dChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IBar3dChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const Bar3dChart: React.ForwardRefExoticComponent<Bar3dChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'bar3d';
9
+ type?: 'bar3d';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.Bar3dChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), cartesian_1 = require("./registers/cartesian");
8
8
 
9
9
  exports.Bar3dChart = (0, BaseChart_1.createChart)("Bar3dChart", {
10
10
  type: "bar3d",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerBar3dChart, vchart_1.registerLabel, vchart_1.registerTotalLabel, ...register_1.cartesianComponentsRegisters ]);
12
+ }, [ vchart_1.registerBar3dChart, vchart_1.registerLabel, vchart_1.registerTotalLabel, ...cartesian_1.registers ]);
13
13
  //# sourceMappingURL=Bar3dChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/Bar3dChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAiG;AACjG,2CAA0D;AAC1D,yCAA0D;AAQ7C,QAAA,UAAU,GAAG,IAAA,uBAAW,EACnC,YAAY,EACZ;IACE,IAAI,EAAE,OAAO;IACb,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,2BAAkB,EAAE,sBAAa,EAAE,2BAAkB,EAAE,GAAG,uCAA4B,CAAC,CACzF,CAAC","file":"Bar3dChart.js","sourcesContent":["import React from 'react';\nimport type { IBar3dChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerBar3dChart, registerLabel, registerTotalLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { cartesianComponentsRegisters } from './register';\n\nexport interface Bar3dChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<IBar3dChartSpec, 'type'> {\n //\n}\n\nexport const Bar3dChart = createChart<React.PropsWithChildren<Bar3dChartProps> & { type: 'bar3d' }>(\n 'Bar3dChart',\n {\n type: 'bar3d',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerBar3dChart, registerLabel, registerTotalLabel, ...cartesianComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/Bar3dChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAiG;AAEjG,2CAA0C;AAC1C,qDAAkD;AAQrC,QAAA,UAAU,GAAG,IAAA,uBAAW,EACnC,YAAY,EACZ;IACE,IAAI,EAAE,OAAO;IACb,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,2BAAkB,EAAE,sBAAa,EAAE,2BAAkB,EAAE,GAAG,qBAAS,CAAC,CACtE,CAAC","file":"Bar3dChart.js","sourcesContent":["import type React from 'react';\nimport type { IBar3dChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerBar3dChart, registerLabel, registerTotalLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/cartesian';\n\nexport interface Bar3dChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<IBar3dChartSpec>, 'type'> {\n //\n}\n\nexport const Bar3dChart = createChart<React.PropsWithChildren<Bar3dChartProps> & { type?: 'bar3d' }>(\n 'Bar3dChart',\n {\n type: 'bar3d',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerBar3dChart, registerLabel, registerTotalLabel, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  import type { IBarChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface BarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IBarChartSpec, 'type'> {
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface BarChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IBarChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'bar';
9
+ type?: 'bar';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.BarChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), cartesian_1 = require("./registers/cartesian");
8
8
 
9
9
  exports.BarChart = (0, BaseChart_1.createChart)("BarChart", {
10
10
  type: "bar",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerBarChart, vchart_1.registerLabel, vchart_1.registerTotalLabel, ...register_1.cartesianComponentsRegisters ]);
12
+ }, [ vchart_1.registerBarChart, vchart_1.registerLabel, vchart_1.registerTotalLabel, ...cartesian_1.registers ]);
13
13
  //# sourceMappingURL=BarChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/BarChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA+F;AAC/F,2CAA0D;AAC1D,yCAA0D;AAQ7C,QAAA,QAAQ,GAAG,IAAA,uBAAW,EACjC,UAAU,EACV;IACE,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,yBAAgB,EAAE,sBAAa,EAAE,2BAAkB,EAAE,GAAG,uCAA4B,CAAC,CACvF,CAAC","file":"BarChart.js","sourcesContent":["import React from 'react';\nimport type { IBarChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerBarChart, registerLabel, registerTotalLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { cartesianComponentsRegisters } from './register';\n\nexport interface BarChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<IBarChartSpec, 'type'> {\n //\n}\n\nexport const BarChart = createChart<React.PropsWithChildren<BarChartProps> & { type: 'bar' }>(\n 'BarChart',\n {\n type: 'bar',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerBarChart, registerLabel, registerTotalLabel, ...cartesianComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/BarChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA+F;AAE/F,2CAA0C;AAC1C,qDAAkD;AAQrC,QAAA,QAAQ,GAAG,IAAA,uBAAW,EACjC,UAAU,EACV;IACE,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,yBAAgB,EAAE,sBAAa,EAAE,2BAAkB,EAAE,GAAG,qBAAS,CAAC,CACpE,CAAC","file":"BarChart.js","sourcesContent":["import type React from 'react';\nimport type { IBarChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerBarChart, registerLabel, registerTotalLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/cartesian';\n\nexport interface BarChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<IBarChartSpec>, 'type'> {\n //\n}\n\nexport const BarChart = createChart<React.PropsWithChildren<BarChartProps> & { type?: 'bar' }>(\n 'BarChart',\n {\n type: 'bar',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerBarChart, registerLabel, registerTotalLabel, ...registers]\n);\n"]}
@@ -1,8 +1,8 @@
1
- import type { IVChart, IData, IInitOption, ISpec, IVChartConstructor, IHierarchyData } from '@visactor/vchart';
1
+ import type { IVChart, IData, IInitOption, ISpec, IVChartConstructor, IHierarchyData, IVChartRenderOption } from '@visactor/vchart';
2
2
  import React from 'react';
3
- import { ContainerProps } from '../containers/withContainer';
4
- import { EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps } from '../eventsUtils';
5
- import { IReactTooltipProps } from '../components/tooltip/interface';
3
+ import type { ContainerProps } from '../containers/withContainer';
4
+ import type { EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps } from '../eventsUtils';
5
+ import type { IReactTooltipProps } from '../components/tooltip/interface';
6
6
  export type ChartOptions = Omit<IInitOption, 'dom'>;
7
7
  export interface BaseChartProps extends EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps, IReactTooltipProps {
8
8
  vchartConstrouctor?: IVChartConstructor;
@@ -14,6 +14,7 @@ export interface BaseChartProps extends EventsProps, LegendEventProps, ScrollBar
14
14
  height?: number;
15
15
  options?: ChartOptions;
16
16
  skipFunctionDiff?: boolean;
17
+ morphConfig?: IVChartRenderOption['morphConfig'];
17
18
  onReady?: (instance: IVChart, isInitial: boolean) => void;
18
19
  onError?: (err: Error) => void;
19
20
  useSyncRender?: boolean;
@@ -33,7 +33,10 @@ Object.defineProperty(exports, "__esModule", {
33
33
  value: !0
34
34
  }), exports.createChart = void 0;
35
35
 
36
- const react_1 = __importStar(require("react")), withContainer_1 = __importDefault(require("../containers/withContainer")), chart_1 = __importDefault(require("../context/chart")), vutils_1 = require("@visactor/vutils"), view_1 = __importDefault(require("../context/view")), util_1 = require("../util"), constants_1 = require("../constants"), eventsUtils_1 = require("../eventsUtils"), util_2 = require("../components/tooltip/util"), notSpecKeys = [ ...constants_1.REACT_PRIVATE_PROPS, ...eventsUtils_1.CHART_EVENTS_KEYS, "vchartConstrouctor", "useSyncRender", "skipFunctionDiff", "onError", "onReady", "spec", "container", "options" ], getComponentId = (child, index) => `${child && child.type && (child.type.displayName || child.type.name)}-${index}`, parseSpecFromChildren = props => {
36
+ const react_1 = __importStar(require("react")), withContainer_1 = __importDefault(require("../containers/withContainer")), chart_1 = __importDefault(require("../context/chart")), vutils_1 = require("@visactor/vutils"), view_1 = __importDefault(require("../context/view")), util_1 = require("../util"), constants_1 = require("../constants"), eventsUtils_1 = require("../eventsUtils"), util_2 = require("../components/tooltip/util"), notSpecKeys = [ ...constants_1.REACT_PRIVATE_PROPS, ...eventsUtils_1.CHART_EVENTS_KEYS, "vchartConstrouctor", "useSyncRender", "skipFunctionDiff", "onError", "onReady", "spec", "container", "options", "morphConfig" ], defaultMorphConfig = {
37
+ morph: !1,
38
+ enableExitAnimation: !1
39
+ }, getComponentId = (child, index) => `${child && child.type && (child.type.displayName || child.type.name)}-${index}`, parseSpecFromChildren = props => {
37
40
  const specFromChildren = {};
38
41
  return (0, util_1.toArray)(props.children).map(((child, index) => {
39
42
  const parseSpec = child && child.type && child.type.parseSpec;
@@ -66,12 +69,12 @@ const react_1 = __importStar(require("react")), withContainer_1 = __importDefaul
66
69
  if (!chartContext.current || !chartContext.current.chart) return;
67
70
  (0, eventsUtils_1.bindEventsToChart)(chartContext.current.chart, props, eventsBinded.current, eventsUtils_1.CHART_EVENTS);
68
71
  const newView = chartContext.current.chart.getCompiler().getVGrammarView();
69
- setUpdateId(updateId + 1), window.vchart = chartContext.current.chart, props.onReady && props.onReady(chartContext.current.chart, 0 === updateId),
72
+ setUpdateId(updateId + 1), props.onReady && props.onReady(chartContext.current.chart, 0 === updateId),
70
73
  setView(newView);
71
74
  }
72
75
  };
73
76
  return (0, react_1.useEffect)((() => {
74
- var _a;
77
+ var _a, _b, _c;
75
78
  const newSpecFromChildren = hasSpec ? null : parseSpecFromChildren(props);
76
79
  if (!(null === (_a = chartContext.current) || void 0 === _a ? void 0 : _a.chart)) return hasSpec || (specFromChildren.current = newSpecFromChildren),
77
80
  (props => {
@@ -89,18 +92,14 @@ const react_1 = __importStar(require("react")), withContainer_1 = __importDefaul
89
92
  if (hasSpec) return void ((0, vutils_1.isEqual)(eventsBinded.current.spec, props.spec, {
90
93
  skipFunction: skipFunctionDiff
91
94
  }) ? eventsBinded.current.data !== props.data && (chartContext.current.chart.updateFullDataSync(props.data),
92
- handleChartRender(), eventsBinded.current = props) : (chartContext.current.chart.updateSpecSync(parseSpec(props), void 0, {
93
- morph: !1,
94
- enableExitAnimation: !1
95
- }), handleChartRender(), eventsBinded.current = props));
95
+ handleChartRender(), eventsBinded.current = props) : (chartContext.current.chart.updateSpecSync(parseSpec(props), void 0, null !== (_b = props.morphConfig) && void 0 !== _b ? _b : defaultMorphConfig),
96
+ handleChartRender(), eventsBinded.current = props));
96
97
  const newSpec = (0, vutils_1.pickWithout)(props, notSpecKeys);
97
98
  (0, vutils_1.isEqual)(newSpec, prevSpec.current, {
98
99
  skipFunction: skipFunctionDiff
99
100
  }) && (0, vutils_1.isEqual)(newSpecFromChildren, specFromChildren.current) || (prevSpec.current = newSpec,
100
- specFromChildren.current = newSpecFromChildren, chartContext.current.chart.updateSpecSync(parseSpec(props), void 0, {
101
- morph: !1,
102
- enableExitAnimation: !1
103
- }), handleChartRender(), eventsBinded.current = props);
101
+ specFromChildren.current = newSpecFromChildren, chartContext.current.chart.updateSpecSync(parseSpec(props), void 0, null !== (_c = props.morphConfig) && void 0 !== _c ? _c : defaultMorphConfig),
102
+ handleChartRender(), eventsBinded.current = props);
104
103
  }), [ props ]), (0, react_1.useEffect)((() => () => {
105
104
  chartContext && chartContext.current && chartContext.current.chart && (chartContext.current.chart.release(),
106
105
  chartContext.current.chart = null), eventsBinded.current = null, isUnmount.current = !0;
@@ -109,7 +108,7 @@ const react_1 = __importStar(require("react")), withContainer_1 = __importDefaul
109
108
  }, react_1.default.createElement(view_1.default.Provider, {
110
109
  value: view
111
110
  }, (0, util_1.toArray)(props.children).map(((child, index) => {
112
- if ("string" == typeof child) return;
111
+ if ("string" == typeof child) return null;
113
112
  const childId = getComponentId(child, index);
114
113
  return react_1.default.createElement(react_1.default.Fragment, {
115
114
  key: childId
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/BaseChart.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA2F;AAC3F,gFAA4E;AAC5E,6DAAsE;AAEtE,6CAAwE;AACxE,2DAA0C;AAC1C,kCAAkC;AAClC,4CAAmD;AACnD,gDAawB;AAExB,qDAA+D;A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kB,EAAE;QACpE,YAAY,CAAC,kBAAkB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;KACzD;IAED,MAAM,GAAG,GAAG,IAAA,uBAAa,EAAoB,SAAgB,EAAE,aAAa,EAAE,CAAC,KAAQ,EAAE,EAAE;QACzF,IAAI,YAAY,EAAE;YAChB,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;SAC3C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAjBW,QAAA,WAAW,eAiBtB","file":"BaseChart.js","sourcesContent":["import type { IVChart, IData, IInitOption, ISpec, IVChartConstructor, IHierarchyData } from '@visactor/vchart';\nimport React, { useState, useEffect, useRef, useImperativeHandle, ReactNode } from 'react';\nimport withContainer, { ContainerProps } from '../containers/withContainer';\nimport RootChartContext, { ChartContextType } from '../context/chart';\nimport type { IView } from '@visactor/vgrammar-core';\nimport { isEqual, isNil, isValid, pickWithout } from '@visactor/vutils';\nimport ViewContext from '../context/view';\nimport { toArray } from '../util';\nimport { REACT_PRIVATE_PROPS } from '../constants';\nimport {\n bindEventsToChart,\n EventsProps,\n CHART_EVENTS_KEYS,\n CHART_EVENTS,\n LegendEventProps,\n ScrollBarEventProps,\n BrushEventProps,\n DataZoomEventProps,\n PlayerEventProps,\n DimensionEventProps,\n HierarchyEventProps,\n ChartLifeCycleEventProps\n} from '../eventsUtils';\nimport { IReactTooltipProps } from '../components/tooltip/interface';\nimport { initCustomTooltip } from '../components/tooltip/util';\n\nexport type ChartOptions = Omit<IInitOption, 'dom'>;\n\nexport interface BaseChartProps\n extends EventsProps,\n LegendEventProps,\n ScrollBarEventProps,\n BrushEventProps,\n DataZoomEventProps,\n PlayerEventProps,\n DimensionEventProps,\n HierarchyEventProps,\n ChartLifeCycleEventProps,\n IReactTooltipProps {\n vchartConstrouctor?: IVChartConstructor;\n type?: string;\n /** 上层container */\n container?: HTMLDivElement;\n /**\n * used only by <VChart />\n */\n spec?: ISpec;\n /** 数据 */\n data?: IData | IHierarchyData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /** 图表配置 */\n options?: ChartOptions;\n /** skip function diff when component update */\n skipFunctionDiff?: boolean;\n /** 图表渲染完成事件 */\n onReady?: (instance: IVChart, isInitial: boolean) => void;\n /** throw error when chart run into an error */\n onError?: (err: Error) => void;\n /**\n * use sync render\n *\n * @since 1.8.3\n * @deprecated 1.9.0\n **/\n useSyncRender?: boolean;\n}\n\ntype Props = React.PropsWithChildren<BaseChartProps>;\n\nconst notSpecKeys = [\n ...REACT_PRIVATE_PROPS,\n ...CHART_EVENTS_KEYS,\n 'vchartConstrouctor',\n 'useSyncRender',\n 'skipFunctionDiff',\n 'onError',\n 'onReady',\n 'spec',\n 'container',\n 'options'\n];\n\nconst getComponentId = (child: React.ReactNode, index: number) => {\n const componentName = child && (child as any).type && ((child as any).type.displayName || (child as any).type.name);\n return `${componentName}-${index}`;\n};\n\nconst parseSpecFromChildren = (props: Props) => {\n const specFromChildren: Omit<ISpec, 'type' | 'data' | 'width' | 'height'> = {};\n\n toArray(props.children).map((child, index) => {\n const parseSpec = child && (child as any).type && (child as any).type.parseSpec;\n\n if (parseSpec && (child as any).props) {\n const childProps = isNil((child as any).props.componentId)\n ? {\n ...(child as any).props,\n componentId: getComponentId(child, index)\n }\n : (child as any).props;\n\n const specResult = parseSpec(childProps);\n\n if (specResult.isSingle) {\n specFromChildren[specResult.specName] = specResult.spec;\n } else {\n if (!specFromChildren[specResult.specName]) {\n specFromChildren[specResult.specName] = [];\n }\n\n specFromChildren[specResult.specName].push(specResult.spec);\n }\n }\n });\n\n return specFromChildren;\n};\n\nconst BaseChart: React.FC<Props> = React.forwardRef((props, ref) => {\n const [updateId, setUpdateId] = useState<number>(0);\n const chartContext = useRef<ChartContextType>({});\n useImperativeHandle(ref, () => chartContext.current?.chart);\n const hasSpec = !!props.spec;\n const [view, setView] = useState<IView>(null);\n const isUnmount = useRef<boolean>(false);\n const prevSpec = useRef(pickWithout(props, notSpecKeys));\n const specFromChildren = useRef<Omit<ISpec, 'type' | 'data' | 'width' | 'height'>>(null);\n const eventsBinded = React.useRef<BaseChartProps>(null);\n const skipFunctionDiff = !!props.skipFunctionDiff;\n const [tooltipNode, setTooltipNode] = useState<ReactNode>(null);\n\n const parseSpec = (props: Props) => {\n let spec: ISpec = undefined;\n\n if (hasSpec && props.spec) {\n spec = props.spec;\n\n if (isValid(props.data)) {\n spec = {\n ...props.spec,\n data: props.data\n } as ISpec;\n }\n } else {\n spec = {\n ...prevSpec.current,\n ...specFromChildren.current\n } as ISpec;\n }\n\n const tooltipSpec = initCustomTooltip(setTooltipNode, props, spec.tooltip);\n if (tooltipSpec) {\n spec.tooltip = tooltipSpec;\n }\n return spec;\n };\n\n const createChart = (props: Props) => {\n const cs = new props.vchartConstrouctor(parseSpec(props), {\n ...props.options,\n onError: props.onError,\n autoFit: true,\n dom: props.container\n });\n chartContext.current = { ...chartContext.current, chart: cs };\n isUnmount.current = false;\n };\n\n const handleChartRender = () => {\n // rebind events after render\n if (!isUnmount.current) {\n if (!chartContext.current || !chartContext.current.chart) {\n return;\n }\n\n bindEventsToChart(chartContext.current.chart, props, eventsBinded.current, CHART_EVENTS);\n\n const newView = chartContext.current.chart.getCompiler().getVGrammarView();\n\n setUpdateId(updateId + 1);\n window.vchart = chartContext.current.chart;\n if (props.onReady) {\n props.onReady(chartContext.current.chart, updateId === 0);\n }\n setView(newView);\n }\n };\n\n const renderChart = () => {\n if (chartContext.current.chart) {\n chartContext.current.chart.renderSync({\n reuse: false\n });\n handleChartRender();\n }\n };\n\n useEffect(() => {\n const newSpecFromChildren = hasSpec ? null : parseSpecFromChildren(props);\n\n if (!chartContext.current?.chart) {\n if (!hasSpec) {\n specFromChildren.current = newSpecFromChildren;\n }\n\n createChart(props);\n renderChart();\n eventsBinded.current = props;\n return;\n }\n\n if (hasSpec) {\n if (!isEqual(eventsBinded.current.spec, props.spec, { skipFunction: skipFunctionDiff })) {\n chartContext.current.chart.updateSpecSync(parseSpec(props), undefined, {\n morph: false,\n enableExitAnimation: false\n });\n handleChartRender();\n eventsBinded.current = props;\n } else if (eventsBinded.current.data !== props.data) {\n chartContext.current.chart.updateFullDataSync(props.data as any);\n handleChartRender();\n eventsBinded.current = props;\n }\n return;\n }\n\n const newSpec = pickWithout(props, notSpecKeys);\n\n if (\n !isEqual(newSpec, prevSpec.current, { skipFunction: skipFunctionDiff }) ||\n !isEqual(newSpecFromChildren, specFromChildren.current)\n ) {\n prevSpec.current = newSpec;\n specFromChildren.current = newSpecFromChildren;\n\n chartContext.current.chart.updateSpecSync(parseSpec(props), undefined, {\n morph: false,\n enableExitAnimation: false\n });\n handleChartRender();\n eventsBinded.current = props;\n }\n }, [props]);\n\n useEffect(() => {\n return () => {\n if (chartContext) {\n if (chartContext.current && chartContext.current.chart) {\n chartContext.current.chart.release();\n chartContext.current.chart = null;\n }\n }\n eventsBinded.current = null;\n isUnmount.current = true;\n };\n }, []);\n\n return (\n <RootChartContext.Provider value={chartContext.current}>\n <ViewContext.Provider value={view}>\n {toArray(props.children).map((child, index) => {\n if (typeof child === 'string') {\n return;\n }\n\n const childId = getComponentId(child, index);\n\n return (\n <React.Fragment key={childId}>\n {React.cloneElement(child as React.ReactElement<any, React.JSXElementConstructor<any>>, {\n updateId: updateId,\n componentId: childId\n })}\n </React.Fragment>\n );\n })}\n {tooltipNode}\n </ViewContext.Provider>\n </RootChartContext.Provider>\n );\n});\n\nexport const createChart = <T extends Props>(\n componentName: string,\n defaultProps?: Partial<T>,\n registers?: (() => void)[]\n) => {\n if (registers && registers.length && defaultProps.vchartConstrouctor) {\n defaultProps.vchartConstrouctor.useRegisters(registers);\n }\n\n const Com = withContainer<ContainerProps, T>(BaseChart as any, componentName, (props: T) => {\n if (defaultProps) {\n return Object.assign(props, defaultProps);\n }\n return props;\n });\n Com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B,CAAC,CACa,CAClB,CAAC;YACJ,CAAC,CAAC;YACD,WAAW,CACS,CACG,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEI,MAAM,WAAW,GAAG,CACzB,aAAqB,EACrB,YAAyB,EACzB,SAA0B,EAC1B,EAAE;IACF,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,IAAI,YAAY,CAAC,kBAAkB,EAAE;QACpE,YAAY,CAAC,kBAAkB,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;KACzD;IAED,MAAM,GAAG,GAAG,IAAA,uBAAa,EAAoB,SAAgB,EAAE,aAAa,EAAE,CAAC,KAAQ,EAAE,EAAE;QACzF,IAAI,YAAY,EAAE;YAChB,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;SAC3C;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAjBW,QAAA,WAAW,eAiBtB","file":"BaseChart.js","sourcesContent":["import type {\n IVChart,\n IData,\n IInitOption,\n ISpec,\n IVChartConstructor,\n IHierarchyData,\n IVChartRenderOption\n} from '@visactor/vchart';\nimport type { ReactNode } from 'react';\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react';\nimport type { ContainerProps } from '../containers/withContainer';\nimport withContainer from '../containers/withContainer';\nimport type { ChartContextType } from '../context/chart';\nimport RootChartContext from '../context/chart';\nimport type { IView } from '@visactor/vgrammar-core';\nimport { isEqual, isNil, isValid, pickWithout } from '@visactor/vutils';\nimport ViewContext from '../context/view';\nimport { toArray } from '../util';\nimport { REACT_PRIVATE_PROPS } from '../constants';\nimport type {\n EventsProps,\n LegendEventProps,\n ScrollBarEventProps,\n BrushEventProps,\n DataZoomEventProps,\n PlayerEventProps,\n DimensionEventProps,\n HierarchyEventProps,\n ChartLifeCycleEventProps\n} from '../eventsUtils';\nimport { bindEventsToChart, CHART_EVENTS_KEYS, CHART_EVENTS } from '../eventsUtils';\nimport type { IReactTooltipProps } from '../components/tooltip/interface';\nimport { initCustomTooltip } from '../components/tooltip/util';\n\nexport type ChartOptions = Omit<IInitOption, 'dom'>;\n\nexport interface BaseChartProps\n extends EventsProps,\n LegendEventProps,\n ScrollBarEventProps,\n BrushEventProps,\n DataZoomEventProps,\n PlayerEventProps,\n DimensionEventProps,\n HierarchyEventProps,\n ChartLifeCycleEventProps,\n IReactTooltipProps {\n vchartConstrouctor?: IVChartConstructor;\n type?: string;\n /** 上层container */\n container?: HTMLDivElement;\n /**\n * used only by <VChart />\n */\n spec?: ISpec;\n /** 数据 */\n data?: IData | IHierarchyData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /** 图表配置 */\n options?: ChartOptions;\n /** skip function diff when component update */\n skipFunctionDiff?: boolean;\n /**\n * add `morphConfig` for chart\n * @since 1.12.7\n */\n morphConfig?: IVChartRenderOption['morphConfig'];\n /** 图表渲染完成事件 */\n onReady?: (instance: IVChart, isInitial: boolean) => void;\n /** throw error when chart run into an error */\n onError?: (err: Error) => void;\n /**\n * use sync render\n *\n * @since 1.8.3\n * @deprecated 1.9.0\n **/\n useSyncRender?: boolean;\n}\n\ntype Props = React.PropsWithChildren<BaseChartProps>;\n\nconst notSpecKeys = [\n ...REACT_PRIVATE_PROPS,\n ...CHART_EVENTS_KEYS,\n 'vchartConstrouctor',\n 'useSyncRender',\n 'skipFunctionDiff',\n 'onError',\n 'onReady',\n 'spec',\n 'container',\n 'options',\n 'morphConfig'\n];\nconst defaultMorphConfig = {\n morph: false,\n enableExitAnimation: false\n};\n\nconst getComponentId = (child: React.ReactNode, index: number) => {\n const componentName = child && (child as any).type && ((child as any).type.displayName || (child as any).type.name);\n return `${componentName}-${index}`;\n};\n\nconst parseSpecFromChildren = (props: Props) => {\n const specFromChildren: Omit<ISpec, 'type' | 'data' | 'width' | 'height'> = {};\n\n toArray(props.children).map((child, index) => {\n const parseSpec = child && (child as any).type && (child as any).type.parseSpec;\n\n if (parseSpec && (child as any).props) {\n const childProps = isNil((child as any).props.componentId)\n ? {\n ...(child as any).props,\n componentId: getComponentId(child, index)\n }\n : (child as any).props;\n\n const specResult = parseSpec(childProps);\n\n if (specResult.isSingle) {\n (specFromChildren as any)[specResult.specName] = specResult.spec;\n } else {\n if (!(specFromChildren as any)[specResult.specName]) {\n (specFromChildren as any)[specResult.specName] = [];\n }\n\n (specFromChildren as any)[specResult.specName].push(specResult.spec);\n }\n }\n });\n\n return specFromChildren;\n};\n\nconst BaseChart: React.FC<Props> = React.forwardRef((props, ref) => {\n const [updateId, setUpdateId] = useState<number>(0);\n const chartContext = useRef<ChartContextType>({});\n useImperativeHandle(ref, () => chartContext.current?.chart);\n const hasSpec = !!props.spec;\n const [view, setView] = useState<IView>(null);\n const isUnmount = useRef<boolean>(false);\n const prevSpec = useRef(pickWithout(props, notSpecKeys));\n const specFromChildren = useRef<Omit<ISpec, 'type' | 'data' | 'width' | 'height'>>(null);\n const eventsBinded = React.useRef<BaseChartProps>(null);\n const skipFunctionDiff = !!props.skipFunctionDiff;\n const [tooltipNode, setTooltipNode] = useState<ReactNode>(null);\n\n const parseSpec = (props: Props) => {\n let spec: ISpec;\n\n if (hasSpec && props.spec) {\n spec = props.spec;\n\n if (isValid(props.data)) {\n spec = {\n ...props.spec,\n data: props.data\n } as ISpec;\n }\n } else {\n spec = {\n ...prevSpec.current,\n ...specFromChildren.current\n } as ISpec;\n }\n\n const tooltipSpec = initCustomTooltip(setTooltipNode, props, spec.tooltip);\n if (tooltipSpec) {\n spec.tooltip = tooltipSpec;\n }\n return spec;\n };\n\n const createChart = (props: Props) => {\n const cs = new props.vchartConstrouctor(parseSpec(props), {\n ...props.options,\n onError: props.onError,\n autoFit: true,\n dom: props.container\n });\n chartContext.current = { ...chartContext.current, chart: cs };\n isUnmount.current = false;\n };\n\n const handleChartRender = () => {\n // rebind events after render\n if (!isUnmount.current) {\n if (!chartContext.current || !chartContext.current.chart) {\n return;\n }\n\n bindEventsToChart(chartContext.current.chart, props, eventsBinded.current, CHART_EVENTS);\n\n const newView = chartContext.current.chart.getCompiler().getVGrammarView();\n\n setUpdateId(updateId + 1);\n if (props.onReady) {\n props.onReady(chartContext.current.chart, updateId === 0);\n }\n setView(newView);\n }\n };\n\n const renderChart = () => {\n if (chartContext.current.chart) {\n chartContext.current.chart.renderSync({\n reuse: false\n });\n handleChartRender();\n }\n };\n\n useEffect(() => {\n const newSpecFromChildren = hasSpec ? null : parseSpecFromChildren(props);\n\n if (!chartContext.current?.chart) {\n if (!hasSpec) {\n specFromChildren.current = newSpecFromChildren;\n }\n\n createChart(props);\n renderChart();\n eventsBinded.current = props;\n return;\n }\n\n if (hasSpec) {\n if (!isEqual(eventsBinded.current.spec, props.spec, { skipFunction: skipFunctionDiff })) {\n chartContext.current.chart.updateSpecSync(parseSpec(props), undefined, props.morphConfig ?? defaultMorphConfig);\n handleChartRender();\n eventsBinded.current = props;\n } else if (eventsBinded.current.data !== props.data) {\n chartContext.current.chart.updateFullDataSync(props.data as any);\n handleChartRender();\n eventsBinded.current = props;\n }\n return;\n }\n\n const newSpec = pickWithout(props, notSpecKeys);\n\n if (\n !isEqual(newSpec, prevSpec.current, { skipFunction: skipFunctionDiff }) ||\n !isEqual(newSpecFromChildren, specFromChildren.current)\n ) {\n prevSpec.current = newSpec;\n specFromChildren.current = newSpecFromChildren;\n\n chartContext.current.chart.updateSpecSync(parseSpec(props), undefined, props.morphConfig ?? defaultMorphConfig);\n handleChartRender();\n eventsBinded.current = props;\n }\n }, [props]);\n\n useEffect(() => {\n return () => {\n if (chartContext) {\n if (chartContext.current && chartContext.current.chart) {\n chartContext.current.chart.release();\n chartContext.current.chart = null;\n }\n }\n eventsBinded.current = null;\n isUnmount.current = true;\n };\n }, []);\n\n return (\n <RootChartContext.Provider value={chartContext.current}>\n <ViewContext.Provider value={view}>\n {toArray(props.children).map((child, index) => {\n if (typeof child === 'string') {\n return null;\n }\n\n const childId = getComponentId(child, index);\n\n return (\n <React.Fragment key={childId}>\n {React.cloneElement(child as React.ReactElement<any, React.JSXElementConstructor<any>>, {\n updateId: updateId,\n componentId: childId\n })}\n </React.Fragment>\n );\n })}\n {tooltipNode}\n </ViewContext.Provider>\n </RootChartContext.Provider>\n );\n});\n\nexport const createChart = <T extends Props>(\n componentName: string,\n defaultProps?: Partial<T>,\n registers?: (() => void)[]\n) => {\n if (registers && registers.length && defaultProps.vchartConstrouctor) {\n defaultProps.vchartConstrouctor.useRegisters(registers);\n }\n\n const Com = withContainer<ContainerProps, T>(BaseChart as any, componentName, (props: T) => {\n if (defaultProps) {\n return Object.assign(props, defaultProps);\n }\n return props;\n });\n Com.displayName = componentName;\n return Com;\n};\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { IBoxPlotChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface BoxPlotChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IBoxPlotChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { IBoxPlotChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface BoxPlotChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IBoxPlotChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const BoxPlotChart: React.ForwardRefExoticComponent<BoxPlotChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'boxPlot';
9
+ type?: 'boxPlot';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.BoxPlotChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), cartesian_1 = require("./registers/cartesian");
8
8
 
9
9
  exports.BoxPlotChart = (0, BaseChart_1.createChart)("BoxPlotChart", {
10
10
  type: "boxPlot",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerBoxplotChart, vchart_1.registerLabel, ...register_1.cartesianComponentsRegisters ]);
12
+ }, [ vchart_1.registerBoxplotChart, vchart_1.registerLabel, ...cartesian_1.registers ]);
13
13
  //# sourceMappingURL=BoxPlotChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/BoxPlotChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA+E;AAC/E,2CAA0D;AAC1D,yCAA0D;AAM7C,QAAA,YAAY,GAAG,IAAA,uBAAW,EACrC,cAAc,EACd;IACE,IAAI,EAAE,SAAS;IACf,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,6BAAoB,EAAE,sBAAa,EAAE,GAAG,uCAA4B,CAAC,CACvE,CAAC","file":"BoxPlotChart.js","sourcesContent":["import React from 'react';\nimport { IBoxPlotChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerBoxplotChart, registerLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { cartesianComponentsRegisters } from './register';\n\nexport interface BoxPlotChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<IBoxPlotChartSpec, 'type'> {}\n\nexport const BoxPlotChart = createChart<React.PropsWithChildren<BoxPlotChartProps> & { type: 'boxPlot' }>(\n 'BoxPlotChart',\n {\n type: 'boxPlot',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerBoxplotChart, registerLabel, ...cartesianComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/BoxPlotChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA+E;AAE/E,2CAA0C;AAC1C,qDAAkD;AAMrC,QAAA,YAAY,GAAG,IAAA,uBAAW,EACrC,cAAc,EACd;IACE,IAAI,EAAE,SAAS;IACf,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,6BAAoB,EAAE,sBAAa,EAAE,GAAG,qBAAS,CAAC,CACpD,CAAC","file":"BoxPlotChart.js","sourcesContent":["import type React from 'react';\nimport type { IBoxPlotChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerBoxplotChart, registerLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/cartesian';\n\nexport interface BoxPlotChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<IBoxPlotChartSpec>, 'type'> {}\n\nexport const BoxPlotChart = createChart<React.PropsWithChildren<BoxPlotChartProps> & { type?: 'boxPlot' }>(\n 'BoxPlotChart',\n {\n type: 'boxPlot',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerBoxplotChart, registerLabel, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { ICirclePackingChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface CirclePackingChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<ICirclePackingChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { ICirclePackingChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface CirclePackingChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<ICirclePackingChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const CirclePackingChart: React.ForwardRefExoticComponent<CirclePackingChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'circlePacking';
9
+ type?: 'circlePacking';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.CirclePackingChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), simple_1 = require("./registers/simple");
8
8
 
9
9
  exports.CirclePackingChart = (0, BaseChart_1.createChart)("CirclePackingChart", {
10
10
  type: "circlePacking",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerCirclePackingChart, ...register_1.simpleComponentsRegisters ]);
12
+ }, [ vchart_1.registerCirclePackingChart, vchart_1.registerLabel, ...simple_1.registers ]);
13
13
  //# sourceMappingURL=CirclePackingChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/CirclePackingChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAsE;AACtE,2CAA0D;AAC1D,yCAAuD;AAM1C,QAAA,kBAAkB,GAAG,IAAA,uBAAW,EAG3C,oBAAoB,EACpB;IACE,IAAI,EAAE,eAAe;IACrB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,mCAA0B,EAAE,GAAG,oCAAyB,CAAC,CAC3D,CAAC","file":"CirclePackingChart.js","sourcesContent":["import React from 'react';\nimport { ICirclePackingChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerCirclePackingChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { simpleComponentsRegisters } from './register';\n\nexport interface CirclePackingChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<ICirclePackingChartSpec, 'type'> {}\n\nexport const CirclePackingChart = createChart<\n React.PropsWithChildren<CirclePackingChartProps> & { type: 'circlePacking' }\n>(\n 'CirclePackingChart',\n {\n type: 'circlePacking',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerCirclePackingChart, ...simpleComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/CirclePackingChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAqF;AAErF,2CAA0C;AAC1C,+CAA+C;AAMlC,QAAA,kBAAkB,GAAG,IAAA,uBAAW,EAG3C,oBAAoB,EACpB;IACE,IAAI,EAAE,eAAe;IACrB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,mCAA0B,EAAE,sBAAa,EAAE,GAAG,kBAAS,CAAC,CAC1D,CAAC","file":"CirclePackingChart.js","sourcesContent":["import type React from 'react';\nimport type { ICirclePackingChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerCirclePackingChart, registerLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/simple';\n\nexport interface CirclePackingChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<ICirclePackingChartSpec>, 'type'> {}\n\nexport const CirclePackingChart = createChart<\n React.PropsWithChildren<CirclePackingChartProps> & { type?: 'circlePacking' }\n>(\n 'CirclePackingChart',\n {\n type: 'circlePacking',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerCirclePackingChart, registerLabel, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { ICircularProgressChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface CircularProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<ICircularProgressChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { ICircularProgressChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface CircularProgressChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<ICircularProgressChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const CircularProgressChart: React.ForwardRefExoticComponent<CircularProgressChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'circularProgress';
9
+ type?: 'circularProgress';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.CircularProgressChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), polar_1 = require("./registers/polar");
8
8
 
9
9
  exports.CircularProgressChart = (0, BaseChart_1.createChart)("CircularProgressChart", {
10
10
  type: "circularProgress",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerCircularProgressChart, vchart_1.registerLabel, ...register_1.polarComponentsRegisters ]);
12
+ }, [ vchart_1.registerCircularProgressChart, vchart_1.registerLabel, vchart_1.registerIndicator, ...polar_1.registers ]);
13
13
  //# sourceMappingURL=CircularProgressChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/CircularProgressChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAwF;AACxF,2CAA0D;AAC1D,yCAAsD;AAMzC,QAAA,qBAAqB,GAAG,IAAA,uBAAW,EAG9C,uBAAuB,EACvB;IACE,IAAI,EAAE,kBAAkB;IACxB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,sCAA6B,EAAE,sBAAa,EAAE,GAAG,mCAAwB,CAAC,CAC5E,CAAC","file":"CircularProgressChart.js","sourcesContent":["import React from 'react';\nimport { ICircularProgressChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerCircularProgressChart, registerLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { polarComponentsRegisters } from './register';\n\nexport interface CircularProgressChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<ICircularProgressChartSpec, 'type'> {}\n\nexport const CircularProgressChart = createChart<\n React.PropsWithChildren<CircularProgressChartProps> & { type: 'circularProgress' }\n>(\n 'CircularProgressChart',\n {\n type: 'circularProgress',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerCircularProgressChart, registerLabel, ...polarComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/CircularProgressChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA2G;AAE3G,2CAA0C;AAC1C,6CAA8C;AAMjC,QAAA,qBAAqB,GAAG,IAAA,uBAAW,EAG9C,uBAAuB,EACvB;IACE,IAAI,EAAE,kBAAkB;IACxB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,sCAA6B,EAAE,sBAAa,EAAE,0BAAiB,EAAE,GAAG,iBAAS,CAAC,CAChF,CAAC","file":"CircularProgressChart.js","sourcesContent":["import type React from 'react';\nimport type { ICircularProgressChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerCircularProgressChart, registerLabel, registerIndicator } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/polar';\n\nexport interface CircularProgressChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<ICircularProgressChartSpec>, 'type'> {}\n\nexport const CircularProgressChart = createChart<\n React.PropsWithChildren<CircularProgressChartProps> & { type?: 'circularProgress' }\n>(\n 'CircularProgressChart',\n {\n type: 'circularProgress',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerCircularProgressChart, registerLabel, registerIndicator, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { ICommonChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface CommonChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<ICommonChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { ICommonChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface CommonChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<Partial<ICommonChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const CommonChart: React.ForwardRefExoticComponent<CommonChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'common';
9
+ type?: 'common';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/CommonChart.tsx"],"names":[],"mappings":";;;AAEA,6CAe0B;AAC1B,2CAA0D;AAM7C,QAAA,WAAW,GAAG,IAAA,uBAAW,EACpC,aAAa,EACb;IACE,IAAI,EAAE,QAAQ;IACd,kBAAkB,EAAE,eAA4B;CACjD,EACD;IACE,4BAAmB;IACnB,oCAA2B;IAC3B,kCAAyB;IACzB,kCAAyB;IACzB,iCAAwB;IACxB,mCAA0B;IAE1B,sBAAa;IACb,2BAAkB;IAElB,2BAAkB;IAClB,0BAAiB;IACjB,2BAAkB;IAClB,8BAAqB;IACrB,0BAAiB;CAClB,CACF,CAAC","file":"CommonChart.js","sourcesContent":["import React from 'react';\nimport { ICommonChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport {\n VChart,\n registerCommonChart,\n registerCartesianLinearAxis,\n registerCartesianBandAxis,\n registerCartesianTimeAxis, // 非必选\n registerCartesianLogAxis, // 非必选\n registerCartesianCrossHair,\n registerLabel,\n registerTotalLabel,\n registerAreaSeries,\n registerBarSeries,\n registerLineSeries,\n registerScatterSeries,\n registerPieSeries\n} from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface CommonChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<ICommonChartSpec, 'type'> {}\n\nexport const CommonChart = createChart<React.PropsWithChildren<CommonChartProps> & { type: 'common' }>(\n 'CommonChart',\n {\n type: 'common',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [\n registerCommonChart,\n registerCartesianLinearAxis,\n registerCartesianBandAxis,\n registerCartesianTimeAxis, // 非必选\n registerCartesianLogAxis, // 非必选\n registerCartesianCrossHair,\n\n registerLabel,\n registerTotalLabel,\n\n registerAreaSeries,\n registerBarSeries,\n registerLineSeries,\n registerScatterSeries,\n registerPieSeries\n ]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/CommonChart.tsx"],"names":[],"mappings":";;;AAEA,6CAe0B;AAE1B,2CAA0C;AAM7B,QAAA,WAAW,GAAG,IAAA,uBAAW,EACpC,aAAa,EACb;IACE,IAAI,EAAE,QAAQ;IACd,kBAAkB,EAAE,eAA4B;CACjD,EACD;IACE,4BAAmB;IACnB,oCAA2B;IAC3B,kCAAyB;IACzB,kCAAyB;IACzB,iCAAwB;IACxB,mCAA0B;IAE1B,sBAAa;IACb,2BAAkB;IAElB,2BAAkB;IAClB,0BAAiB;IACjB,2BAAkB;IAClB,8BAAqB;IACrB,0BAAiB;CAClB,CACF,CAAC","file":"CommonChart.js","sourcesContent":["import type React from 'react';\nimport type { ICommonChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport {\n VChart,\n registerCommonChart,\n registerCartesianLinearAxis,\n registerCartesianBandAxis,\n registerCartesianTimeAxis, // 非必选\n registerCartesianLogAxis, // 非必选\n registerCartesianCrossHair,\n registerLabel,\n registerTotalLabel,\n registerAreaSeries,\n registerBarSeries,\n registerLineSeries,\n registerScatterSeries,\n registerPieSeries\n} from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\n\nexport interface CommonChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<Partial<ICommonChartSpec>, 'type'> {}\n\nexport const CommonChart = createChart<React.PropsWithChildren<CommonChartProps> & { type?: 'common' }>(\n 'CommonChart',\n {\n type: 'common',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [\n registerCommonChart,\n registerCartesianLinearAxis,\n registerCartesianBandAxis,\n registerCartesianTimeAxis, // 非必选\n registerCartesianLogAxis, // 非必选\n registerCartesianCrossHair,\n\n registerLabel,\n registerTotalLabel,\n\n registerAreaSeries,\n registerBarSeries,\n registerLineSeries,\n registerScatterSeries,\n registerPieSeries\n ]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { ICorrelationChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface CorrelationChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<ICorrelationChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { ICorrelationChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface CorrelationChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<ICorrelationChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const CorrelationChart: React.ForwardRefExoticComponent<CorrelationChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'correlation';
9
+ type?: 'correlation';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.CorrelationChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), simple_1 = require("./registers/simple");
8
8
 
9
9
  exports.CorrelationChart = (0, BaseChart_1.createChart)("CorrelationChart", {
10
10
  type: "correlation",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerCorrelationChart, ...register_1.simpleComponentsRegisters ]);
12
+ }, [ vchart_1.registerCorrelationChart, ...simple_1.registers ]);
13
13
  //# sourceMappingURL=CorrelationChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/CorrelationChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAoE;AACpE,2CAA0D;AAC1D,yCAAuD;AAM1C,QAAA,gBAAgB,GAAG,IAAA,uBAAW,EACzC,kBAAkB,EAClB;IACE,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,iCAAwB,EAAE,GAAG,oCAAyB,CAAC,CACzD,CAAC","file":"CorrelationChart.js","sourcesContent":["import React from 'react';\nimport { ICorrelationChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerCorrelationChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { simpleComponentsRegisters } from './register';\n\nexport interface CorrelationChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<ICorrelationChartSpec, 'type'> {}\n\nexport const CorrelationChart = createChart<React.PropsWithChildren<CorrelationChartProps> & { type: 'correlation' }>(\n 'CorrelationChart',\n {\n type: 'correlation',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerCorrelationChart, ...simpleComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/CorrelationChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAoE;AAEpE,2CAA0C;AAC1C,+CAA+C;AAMlC,QAAA,gBAAgB,GAAG,IAAA,uBAAW,EACzC,kBAAkB,EAClB;IACE,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,iCAAwB,EAAE,GAAG,kBAAS,CAAC,CACzC,CAAC","file":"CorrelationChart.js","sourcesContent":["import type React from 'react';\nimport type { ICorrelationChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerCorrelationChart } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/simple';\n\nexport interface CorrelationChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<ICorrelationChartSpec>, 'type'> {}\n\nexport const CorrelationChart = createChart<React.PropsWithChildren<CorrelationChartProps> & { type?: 'correlation' }>(\n 'CorrelationChart',\n {\n type: 'correlation',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerCorrelationChart, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { IFunnel3dChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface Funnel3dChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IFunnel3dChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { IFunnel3dChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface Funnel3dChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IFunnel3dChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const Funnel3dChart: React.ForwardRefExoticComponent<Funnel3dChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'funnel3d';
9
+ type?: 'funnel3d';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.Funnel3dChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), simple_1 = require("./registers/simple");
8
8
 
9
9
  exports.Funnel3dChart = (0, BaseChart_1.createChart)("Funnel3dChart", {
10
10
  type: "funnel3d",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerFunnel3dChart, vchart_1.registerLabel, ...register_1.simpleComponentsRegisters ]);
12
+ }, [ vchart_1.registerFunnel3dChart, vchart_1.registerLabel, ...simple_1.registers ]);
13
13
  //# sourceMappingURL=Funnel3dChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/Funnel3dChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAgF;AAChF,2CAA0D;AAC1D,yCAAuD;AAM1C,QAAA,aAAa,GAAG,IAAA,uBAAW,EACtC,eAAe,EACf;IACE,IAAI,EAAE,UAAU;IAChB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,8BAAqB,EAAE,sBAAa,EAAE,GAAG,oCAAyB,CAAC,CACrE,CAAC","file":"Funnel3dChart.js","sourcesContent":["import React from 'react';\nimport { IFunnel3dChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerFunnel3dChart, registerLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { simpleComponentsRegisters } from './register';\n\nexport interface Funnel3dChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<IFunnel3dChartSpec, 'type'> {}\n\nexport const Funnel3dChart = createChart<React.PropsWithChildren<Funnel3dChartProps> & { type: 'funnel3d' }>(\n 'Funnel3dChart',\n {\n type: 'funnel3d',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerFunnel3dChart, registerLabel, ...simpleComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/Funnel3dChart.tsx"],"names":[],"mappings":";;;AAEA,6CAAgF;AAEhF,2CAA0C;AAC1C,+CAA+C;AAMlC,QAAA,aAAa,GAAG,IAAA,uBAAW,EACtC,eAAe,EACf;IACE,IAAI,EAAE,UAAU;IAChB,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,8BAAqB,EAAE,sBAAa,EAAE,GAAG,kBAAS,CAAC,CACrD,CAAC","file":"Funnel3dChart.js","sourcesContent":["import type React from 'react';\nimport type { IFunnel3dChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerFunnel3dChart, registerLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/simple';\n\nexport interface Funnel3dChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<IFunnel3dChartSpec>, 'type'> {}\n\nexport const Funnel3dChart = createChart<React.PropsWithChildren<Funnel3dChartProps> & { type?: 'funnel3d' }>(\n 'Funnel3dChart',\n {\n type: 'funnel3d',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerFunnel3dChart, registerLabel, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import { IFunnelChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface FunnelChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IFunnelChartSpec, 'type'> {
1
+ import type React from 'react';
2
+ import type { IFunnelChartSpec } from '@visactor/vchart';
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface FunnelChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IFunnelChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const FunnelChart: React.ForwardRefExoticComponent<FunnelChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'funnel';
9
+ type?: 'funnel';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.FunnelChart = void 0;
6
6
 
7
- const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), register_1 = require("./register");
7
+ const vchart_1 = require("@visactor/vchart"), BaseChart_1 = require("./BaseChart"), simple_1 = require("./registers/simple");
8
8
 
9
9
  exports.FunnelChart = (0, BaseChart_1.createChart)("FunnelChart", {
10
10
  type: "funnel",
11
11
  vchartConstrouctor: vchart_1.VChart
12
- }, [ vchart_1.registerFunnelChart, vchart_1.registerLabel, ...register_1.simpleComponentsRegisters ]);
12
+ }, [ vchart_1.registerFunnelChart, vchart_1.registerLabel, ...simple_1.registers ]);
13
13
  //# sourceMappingURL=FunnelChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/charts/FunnelChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA8E;AAC9E,2CAA0D;AAC1D,yCAAuD;AAM1C,QAAA,WAAW,GAAG,IAAA,uBAAW,EACpC,aAAa,EACb;IACE,IAAI,EAAE,QAAQ;IACd,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,4BAAmB,EAAE,sBAAa,EAAE,GAAG,oCAAyB,CAAC,CACnE,CAAC","file":"FunnelChart.js","sourcesContent":["import React from 'react';\nimport { IFunnelChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerFunnelChart, registerLabel } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\nimport { simpleComponentsRegisters } from './register';\n\nexport interface FunnelChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>,\n Omit<IFunnelChartSpec, 'type'> {}\n\nexport const FunnelChart = createChart<React.PropsWithChildren<FunnelChartProps> & { type: 'funnel' }>(\n 'FunnelChart',\n {\n type: 'funnel',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerFunnelChart, registerLabel, ...simpleComponentsRegisters]\n);\n"]}
1
+ {"version":3,"sources":["../src/charts/FunnelChart.tsx"],"names":[],"mappings":";;;AAEA,6CAA8E;AAE9E,2CAA0C;AAC1C,+CAA+C;AAMlC,QAAA,WAAW,GAAG,IAAA,uBAAW,EACpC,aAAa,EACb;IACE,IAAI,EAAE,QAAQ;IACd,kBAAkB,EAAE,eAA4B;CACjD,EACD,CAAC,4BAAmB,EAAE,sBAAa,EAAE,GAAG,kBAAS,CAAC,CACnD,CAAC","file":"FunnelChart.js","sourcesContent":["import type React from 'react';\nimport type { IFunnelChartSpec, IVChartConstructor } from '@visactor/vchart';\nimport { VChart, registerFunnelChart, registerLabel } from '@visactor/vchart';\nimport type { BaseChartProps } from './BaseChart';\nimport { createChart } from './BaseChart';\nimport { registers } from './registers/simple';\n\nexport interface FunnelChartProps\n extends Omit<BaseChartProps, 'container' | 'type' | 'data'>,\n Omit<Partial<IFunnelChartSpec>, 'type'> {}\n\nexport const FunnelChart = createChart<React.PropsWithChildren<FunnelChartProps> & { type?: 'funnel' }>(\n 'FunnelChart',\n {\n type: 'funnel',\n vchartConstrouctor: VChart as IVChartConstructor\n },\n [registerFunnelChart, registerLabel, ...registers]\n);\n"]}
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  import type { IGaugeChartSpec } from '@visactor/vchart';
3
- import { BaseChartProps } from './BaseChart';
4
- export interface GaugeChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type' | 'data'>, Omit<IGaugeChartSpec, 'type'> {
3
+ import type { BaseChartProps } from './BaseChart';
4
+ export interface GaugeChartProps extends Omit<BaseChartProps, 'container' | 'type' | 'data'>, Omit<Partial<IGaugeChartSpec>, 'type'> {
5
5
  }
6
6
  export declare const GaugeChart: React.ForwardRefExoticComponent<GaugeChartProps & {
7
7
  children?: React.ReactNode;
8
8
  } & {
9
- type: 'gauge';
9
+ type?: 'gauge';
10
10
  } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;