@visactor/react-vchart 0.0.1-alpha.1 → 0.10.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (344) hide show
  1. package/README.md +33 -5
  2. package/cjs/VChart.d.ts +4 -2
  3. package/cjs/VChart.js +11 -3
  4. package/cjs/VChart.js.map +1 -1
  5. package/cjs/VChartSimple.d.ts +6 -0
  6. package/cjs/VChartSimple.js +10 -0
  7. package/cjs/VChartSimple.js.map +1 -0
  8. package/cjs/charts/AreaChart.d.ts +7 -2
  9. package/cjs/charts/AreaChart.js +11 -2
  10. package/cjs/charts/AreaChart.js.map +1 -1
  11. package/cjs/charts/BarChart.d.ts +7 -2
  12. package/cjs/charts/BarChart.js +11 -2
  13. package/cjs/charts/BarChart.js.map +1 -1
  14. package/cjs/charts/BaseChart.d.ts +10 -6
  15. package/cjs/charts/BaseChart.js +57 -34
  16. package/cjs/charts/BaseChart.js.map +1 -1
  17. package/cjs/charts/BoxPlotChart.d.ts +6 -1
  18. package/cjs/charts/BoxPlotChart.js +11 -2
  19. package/cjs/charts/BoxPlotChart.js.map +1 -1
  20. package/cjs/charts/CircularProgressChart.d.ts +6 -1
  21. package/cjs/charts/CircularProgressChart.js +11 -2
  22. package/cjs/charts/CircularProgressChart.js.map +1 -1
  23. package/cjs/charts/CommonChart.d.ts +6 -1
  24. package/cjs/charts/CommonChart.js +11 -2
  25. package/cjs/charts/CommonChart.js.map +1 -1
  26. package/cjs/charts/FunnelChart.d.ts +6 -1
  27. package/cjs/charts/FunnelChart.js +11 -2
  28. package/cjs/charts/FunnelChart.js.map +1 -1
  29. package/cjs/charts/HistogramChart.d.ts +6 -1
  30. package/cjs/charts/HistogramChart.js +11 -2
  31. package/cjs/charts/HistogramChart.js.map +1 -1
  32. package/cjs/charts/LineChart.d.ts +7 -2
  33. package/cjs/charts/LineChart.js +11 -2
  34. package/cjs/charts/LineChart.js.map +1 -1
  35. package/cjs/charts/LinearProgressChart.d.ts +6 -1
  36. package/cjs/charts/LinearProgressChart.js +11 -2
  37. package/cjs/charts/LinearProgressChart.js.map +1 -1
  38. package/cjs/charts/MapChart.d.ts +7 -2
  39. package/cjs/charts/MapChart.js +12 -2
  40. package/cjs/charts/MapChart.js.map +1 -1
  41. package/cjs/charts/PieChart.d.ts +7 -2
  42. package/cjs/charts/PieChart.js +11 -2
  43. package/cjs/charts/PieChart.js.map +1 -1
  44. package/cjs/charts/RadarChart.d.ts +7 -2
  45. package/cjs/charts/RadarChart.js +11 -2
  46. package/cjs/charts/RadarChart.js.map +1 -1
  47. package/cjs/charts/RangeColumnChart.d.ts +7 -2
  48. package/cjs/charts/RangeColumnChart.js +11 -2
  49. package/cjs/charts/RangeColumnChart.js.map +1 -1
  50. package/cjs/charts/RoseChart.d.ts +7 -2
  51. package/cjs/charts/RoseChart.js +11 -3
  52. package/cjs/charts/RoseChart.js.map +1 -1
  53. package/cjs/charts/ScatterChart.d.ts +7 -2
  54. package/cjs/charts/ScatterChart.js +11 -2
  55. package/cjs/charts/ScatterChart.js.map +1 -1
  56. package/cjs/charts/SequenceChart.d.ts +7 -2
  57. package/cjs/charts/SequenceChart.js +11 -2
  58. package/cjs/charts/SequenceChart.js.map +1 -1
  59. package/cjs/charts/WordCloudChart.d.ts +7 -2
  60. package/cjs/charts/WordCloudChart.js +11 -2
  61. package/cjs/charts/WordCloudChart.js.map +1 -1
  62. package/cjs/charts/index.d.ts +18 -16
  63. package/cjs/charts/index.js +24 -146
  64. package/cjs/charts/index.js.map +1 -1
  65. package/cjs/components/Axis.d.ts +4 -5
  66. package/cjs/components/Axis.js.map +1 -1
  67. package/cjs/components/BaseComponent.d.ts +2 -1
  68. package/cjs/components/BaseComponent.js +14 -35
  69. package/cjs/components/BaseComponent.js.map +1 -1
  70. package/cjs/components/Brush.d.ts +5 -0
  71. package/cjs/components/Brush.js +10 -0
  72. package/cjs/components/Brush.js.map +1 -0
  73. package/cjs/components/Crosshair.d.ts +4 -0
  74. package/cjs/components/Crosshair.js +10 -0
  75. package/cjs/components/Crosshair.js.map +1 -0
  76. package/cjs/components/DataZoom.d.ts +5 -0
  77. package/cjs/components/DataZoom.js +10 -0
  78. package/cjs/components/DataZoom.js.map +1 -0
  79. package/cjs/components/Indicator.d.ts +4 -0
  80. package/cjs/components/Indicator.js +10 -0
  81. package/cjs/components/Indicator.js.map +1 -0
  82. package/cjs/components/Legend.d.ts +4 -8
  83. package/cjs/components/Legend.js.map +1 -1
  84. package/cjs/components/Mark.d.ts +4 -14
  85. package/cjs/components/Mark.js +2 -60
  86. package/cjs/components/Mark.js.map +1 -1
  87. package/cjs/components/MarkArea.d.ts +4 -0
  88. package/cjs/components/MarkArea.js +10 -0
  89. package/cjs/components/MarkArea.js.map +1 -0
  90. package/cjs/components/MarkLine.d.ts +4 -0
  91. package/cjs/components/MarkLine.js +10 -0
  92. package/cjs/components/MarkLine.js.map +1 -0
  93. package/cjs/components/MarkPoint.d.ts +4 -0
  94. package/cjs/components/MarkPoint.js +10 -0
  95. package/cjs/components/MarkPoint.js.map +1 -0
  96. package/cjs/components/Player.d.ts +5 -0
  97. package/cjs/components/Player.js +10 -0
  98. package/cjs/components/Player.js.map +1 -0
  99. package/cjs/components/Region.d.ts +4 -4
  100. package/cjs/components/Region.js +1 -2
  101. package/cjs/components/Region.js.map +1 -1
  102. package/cjs/components/ScrollBar.d.ts +5 -0
  103. package/cjs/components/ScrollBar.js +10 -0
  104. package/cjs/components/ScrollBar.js.map +1 -0
  105. package/cjs/components/Title.d.ts +4 -0
  106. package/cjs/components/Title.js +10 -0
  107. package/cjs/components/Title.js.map +1 -0
  108. package/cjs/components/Tooltip.d.ts +4 -0
  109. package/cjs/components/Tooltip.js +10 -0
  110. package/cjs/components/Tooltip.js.map +1 -0
  111. package/cjs/components/index.d.ts +11 -0
  112. package/cjs/components/index.js +8 -2
  113. package/cjs/components/index.js.map +1 -1
  114. package/cjs/constants.js +1 -1
  115. package/cjs/constants.js.map +1 -1
  116. package/cjs/containers/withContainer.d.ts +2 -2
  117. package/cjs/containers/withContainer.js.map +1 -1
  118. package/cjs/context/chart.d.ts +2 -3
  119. package/cjs/context/chart.js.map +1 -1
  120. package/cjs/context/stage.d.ts +2 -2
  121. package/cjs/context/stage.js.map +1 -1
  122. package/cjs/context/view.d.ts +2 -2
  123. package/cjs/context/view.js.map +1 -1
  124. package/cjs/eventsUtils.d.ts +148 -47
  125. package/cjs/eventsUtils.js +35 -5
  126. package/cjs/eventsUtils.js.map +1 -1
  127. package/cjs/index.d.ts +4 -3
  128. package/cjs/index.js +4 -19
  129. package/cjs/index.js.map +1 -1
  130. package/cjs/series/Area.d.ts +6 -5
  131. package/cjs/series/Area.js.map +1 -1
  132. package/cjs/series/Bar.d.ts +6 -5
  133. package/cjs/series/Bar.js.map +1 -1
  134. package/cjs/series/BaseSeries.d.ts +2 -1
  135. package/cjs/series/BaseSeries.js +22 -49
  136. package/cjs/series/BaseSeries.js.map +1 -1
  137. package/cjs/series/BoxPlot.d.ts +6 -5
  138. package/cjs/series/BoxPlot.js.map +1 -1
  139. package/cjs/series/CircularProgress.d.ts +6 -5
  140. package/cjs/series/CircularProgress.js.map +1 -1
  141. package/cjs/series/Dot.d.ts +6 -5
  142. package/cjs/series/Dot.js.map +1 -1
  143. package/cjs/series/Funnel.d.ts +6 -5
  144. package/cjs/series/Funnel.js.map +1 -1
  145. package/cjs/series/Line.d.ts +6 -5
  146. package/cjs/series/Line.js.map +1 -1
  147. package/cjs/series/LinearProgress.d.ts +6 -5
  148. package/cjs/series/LinearProgress.js.map +1 -1
  149. package/cjs/series/Link.d.ts +6 -5
  150. package/cjs/series/Link.js.map +1 -1
  151. package/cjs/series/Map.d.ts +6 -5
  152. package/cjs/series/Map.js.map +1 -1
  153. package/cjs/series/Pie.d.ts +6 -5
  154. package/cjs/series/Pie.js.map +1 -1
  155. package/cjs/series/Radar.d.ts +6 -5
  156. package/cjs/series/Radar.js.map +1 -1
  157. package/cjs/series/RangeColumn.d.ts +6 -5
  158. package/cjs/series/RangeColumn.js.map +1 -1
  159. package/cjs/series/Rose.d.ts +6 -5
  160. package/cjs/series/Rose.js.map +1 -1
  161. package/cjs/series/Scatter.d.ts +6 -5
  162. package/cjs/series/Scatter.js.map +1 -1
  163. package/cjs/series/Series.d.ts +6 -6
  164. package/cjs/series/Series.js +1 -1
  165. package/cjs/series/Series.js.map +1 -1
  166. package/cjs/series/WordCloud.d.ts +6 -5
  167. package/cjs/series/WordCloud.js +1 -1
  168. package/cjs/series/WordCloud.js.map +1 -1
  169. package/cjs/series/index.js +1 -1
  170. package/cjs/series/index.js.map +1 -1
  171. package/cjs/util.js +1 -1
  172. package/cjs/util.js.map +1 -1
  173. package/esm/VChart.d.ts +4 -2
  174. package/esm/VChart.js +7 -1
  175. package/esm/VChart.js.map +1 -1
  176. package/esm/VChartSimple.d.ts +6 -0
  177. package/esm/VChartSimple.js +4 -0
  178. package/esm/VChartSimple.js.map +1 -0
  179. package/esm/charts/AreaChart.d.ts +7 -2
  180. package/esm/charts/AreaChart.js +6 -1
  181. package/esm/charts/AreaChart.js.map +1 -1
  182. package/esm/charts/BarChart.d.ts +7 -2
  183. package/esm/charts/BarChart.js +6 -1
  184. package/esm/charts/BarChart.js.map +1 -1
  185. package/esm/charts/BaseChart.d.ts +10 -6
  186. package/esm/charts/BaseChart.js +56 -35
  187. package/esm/charts/BaseChart.js.map +1 -1
  188. package/esm/charts/BoxPlotChart.d.ts +6 -1
  189. package/esm/charts/BoxPlotChart.js +6 -1
  190. package/esm/charts/BoxPlotChart.js.map +1 -1
  191. package/esm/charts/CircularProgressChart.d.ts +6 -1
  192. package/esm/charts/CircularProgressChart.js +6 -1
  193. package/esm/charts/CircularProgressChart.js.map +1 -1
  194. package/esm/charts/CommonChart.d.ts +6 -1
  195. package/esm/charts/CommonChart.js +6 -1
  196. package/esm/charts/CommonChart.js.map +1 -1
  197. package/esm/charts/FunnelChart.d.ts +6 -1
  198. package/esm/charts/FunnelChart.js +6 -1
  199. package/esm/charts/FunnelChart.js.map +1 -1
  200. package/esm/charts/HistogramChart.d.ts +6 -1
  201. package/esm/charts/HistogramChart.js +6 -1
  202. package/esm/charts/HistogramChart.js.map +1 -1
  203. package/esm/charts/LineChart.d.ts +7 -2
  204. package/esm/charts/LineChart.js +6 -1
  205. package/esm/charts/LineChart.js.map +1 -1
  206. package/esm/charts/LinearProgressChart.d.ts +6 -1
  207. package/esm/charts/LinearProgressChart.js +6 -1
  208. package/esm/charts/LinearProgressChart.js.map +1 -1
  209. package/esm/charts/MapChart.d.ts +7 -2
  210. package/esm/charts/MapChart.js +7 -1
  211. package/esm/charts/MapChart.js.map +1 -1
  212. package/esm/charts/PieChart.d.ts +7 -2
  213. package/esm/charts/PieChart.js +6 -1
  214. package/esm/charts/PieChart.js.map +1 -1
  215. package/esm/charts/RadarChart.d.ts +7 -2
  216. package/esm/charts/RadarChart.js +6 -1
  217. package/esm/charts/RadarChart.js.map +1 -1
  218. package/esm/charts/RangeColumnChart.d.ts +7 -2
  219. package/esm/charts/RangeColumnChart.js +6 -1
  220. package/esm/charts/RangeColumnChart.js.map +1 -1
  221. package/esm/charts/RoseChart.d.ts +7 -2
  222. package/esm/charts/RoseChart.js +6 -2
  223. package/esm/charts/RoseChart.js.map +1 -1
  224. package/esm/charts/ScatterChart.d.ts +7 -2
  225. package/esm/charts/ScatterChart.js +6 -1
  226. package/esm/charts/ScatterChart.js.map +1 -1
  227. package/esm/charts/SequenceChart.d.ts +7 -2
  228. package/esm/charts/SequenceChart.js +6 -1
  229. package/esm/charts/SequenceChart.js.map +1 -1
  230. package/esm/charts/WordCloudChart.d.ts +7 -2
  231. package/esm/charts/WordCloudChart.js +6 -1
  232. package/esm/charts/WordCloudChart.js.map +1 -1
  233. package/esm/charts/index.d.ts +18 -16
  234. package/esm/charts/index.js +17 -17
  235. package/esm/charts/index.js.map +1 -1
  236. package/esm/components/Axis.d.ts +4 -5
  237. package/esm/components/Axis.js.map +1 -1
  238. package/esm/components/BaseComponent.d.ts +2 -1
  239. package/esm/components/BaseComponent.js +14 -35
  240. package/esm/components/BaseComponent.js.map +1 -1
  241. package/esm/components/Brush.d.ts +5 -0
  242. package/esm/components/Brush.js +6 -0
  243. package/esm/components/Brush.js.map +1 -0
  244. package/esm/components/Crosshair.d.ts +4 -0
  245. package/esm/components/Crosshair.js +4 -0
  246. package/esm/components/Crosshair.js.map +1 -0
  247. package/esm/components/DataZoom.d.ts +5 -0
  248. package/esm/components/DataZoom.js +6 -0
  249. package/esm/components/DataZoom.js.map +1 -0
  250. package/esm/components/Indicator.d.ts +4 -0
  251. package/esm/components/Indicator.js +4 -0
  252. package/esm/components/Indicator.js.map +1 -0
  253. package/esm/components/Legend.d.ts +4 -8
  254. package/esm/components/Legend.js.map +1 -1
  255. package/esm/components/Mark.d.ts +4 -14
  256. package/esm/components/Mark.js +2 -38
  257. package/esm/components/Mark.js.map +1 -1
  258. package/esm/components/MarkArea.d.ts +4 -0
  259. package/esm/components/MarkArea.js +4 -0
  260. package/esm/components/MarkArea.js.map +1 -0
  261. package/esm/components/MarkLine.d.ts +4 -0
  262. package/esm/components/MarkLine.js +4 -0
  263. package/esm/components/MarkLine.js.map +1 -0
  264. package/esm/components/MarkPoint.d.ts +4 -0
  265. package/esm/components/MarkPoint.js +4 -0
  266. package/esm/components/MarkPoint.js.map +1 -0
  267. package/esm/components/Player.d.ts +5 -0
  268. package/esm/components/Player.js +6 -0
  269. package/esm/components/Player.js.map +1 -0
  270. package/esm/components/Region.d.ts +4 -4
  271. package/esm/components/Region.js +1 -2
  272. package/esm/components/Region.js.map +1 -1
  273. package/esm/components/ScrollBar.d.ts +5 -0
  274. package/esm/components/ScrollBar.js +6 -0
  275. package/esm/components/ScrollBar.js.map +1 -0
  276. package/esm/components/Title.d.ts +4 -0
  277. package/esm/components/Title.js +4 -0
  278. package/esm/components/Title.js.map +1 -0
  279. package/esm/components/Tooltip.d.ts +4 -0
  280. package/esm/components/Tooltip.js +4 -0
  281. package/esm/components/Tooltip.js.map +1 -0
  282. package/esm/components/index.d.ts +11 -0
  283. package/esm/components/index.js +23 -1
  284. package/esm/components/index.js.map +1 -1
  285. package/esm/constants.js +1 -1
  286. package/esm/constants.js.map +1 -1
  287. package/esm/containers/withContainer.d.ts +2 -2
  288. package/esm/containers/withContainer.js.map +1 -1
  289. package/esm/context/chart.d.ts +2 -3
  290. package/esm/context/chart.js.map +1 -1
  291. package/esm/context/stage.d.ts +2 -2
  292. package/esm/context/stage.js.map +1 -1
  293. package/esm/context/view.d.ts +2 -2
  294. package/esm/context/view.js.map +1 -1
  295. package/esm/eventsUtils.d.ts +148 -47
  296. package/esm/eventsUtils.js +48 -4
  297. package/esm/eventsUtils.js.map +1 -1
  298. package/esm/index.d.ts +4 -3
  299. package/esm/index.js +4 -3
  300. package/esm/index.js.map +1 -1
  301. package/esm/series/Area.d.ts +6 -5
  302. package/esm/series/Area.js.map +1 -1
  303. package/esm/series/Bar.d.ts +6 -5
  304. package/esm/series/Bar.js.map +1 -1
  305. package/esm/series/BaseSeries.d.ts +2 -1
  306. package/esm/series/BaseSeries.js +22 -50
  307. package/esm/series/BaseSeries.js.map +1 -1
  308. package/esm/series/BoxPlot.d.ts +6 -5
  309. package/esm/series/BoxPlot.js.map +1 -1
  310. package/esm/series/CircularProgress.d.ts +6 -5
  311. package/esm/series/CircularProgress.js.map +1 -1
  312. package/esm/series/Dot.d.ts +6 -5
  313. package/esm/series/Dot.js.map +1 -1
  314. package/esm/series/Funnel.d.ts +6 -5
  315. package/esm/series/Funnel.js.map +1 -1
  316. package/esm/series/Line.d.ts +6 -5
  317. package/esm/series/Line.js.map +1 -1
  318. package/esm/series/LinearProgress.d.ts +6 -5
  319. package/esm/series/LinearProgress.js.map +1 -1
  320. package/esm/series/Link.d.ts +6 -5
  321. package/esm/series/Link.js.map +1 -1
  322. package/esm/series/Map.d.ts +6 -5
  323. package/esm/series/Map.js.map +1 -1
  324. package/esm/series/Pie.d.ts +6 -5
  325. package/esm/series/Pie.js.map +1 -1
  326. package/esm/series/Radar.d.ts +6 -5
  327. package/esm/series/Radar.js.map +1 -1
  328. package/esm/series/RangeColumn.d.ts +6 -5
  329. package/esm/series/RangeColumn.js.map +1 -1
  330. package/esm/series/Rose.d.ts +6 -5
  331. package/esm/series/Rose.js.map +1 -1
  332. package/esm/series/Scatter.d.ts +6 -5
  333. package/esm/series/Scatter.js.map +1 -1
  334. package/esm/series/Series.d.ts +6 -6
  335. package/esm/series/Series.js +1 -1
  336. package/esm/series/Series.js.map +1 -1
  337. package/esm/series/WordCloud.d.ts +6 -5
  338. package/esm/series/WordCloud.js +1 -1
  339. package/esm/series/WordCloud.js.map +1 -1
  340. package/esm/series/index.js +1 -1
  341. package/esm/series/index.js.map +1 -1
  342. package/esm/util.js +1 -1
  343. package/esm/util.js.map +1 -1
  344. package/package.json +11 -9
@@ -1,5 +1,10 @@
1
- import { IMapChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IMapChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface MapChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IMapChartSpec, 'type'> {
4
5
  }
5
- export declare const MapChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const MapChart: React.ForwardRefExoticComponent<MapChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'map';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,3 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const MapChart = createChart("MapChart", "map");
5
+ export const MapChart = createChart("MapChart", {
6
+ type: "map",
7
+ vchartConstrouctor: VChart
8
+ });
9
+ //# sourceMappingURL=MapChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/MapChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAgB,UAAU,EAAE,KAAK,CAAC,CAAC","file":"MapChart.js","sourcesContent":["import { IMapChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface MapChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IMapChartSpec, 'type'> {}\n\nexport const MapChart = createChart<MapChartProps>('MapChart', 'map');\n"]}
1
+ {"version":3,"sources":["../src/charts/MapChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAA2D,UAAU,EAAE;IACxG,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"MapChart.js","sourcesContent":["import React from 'react';\nimport type { IMapChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface MapChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IMapChartSpec, 'type'> {}\n\nexport const MapChart = createChart<React.PropsWithChildren<MapChartProps> & { type: 'map' }>('MapChart', {\n type: 'map',\n vchartConstrouctor: VChart\n});\n"]}
@@ -1,5 +1,10 @@
1
- import { IPieChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IPieChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface PieChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IPieChartSpec, 'type'> {
4
5
  }
5
- export declare const PieChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const PieChart: React.ForwardRefExoticComponent<PieChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'pie';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const PieChart = createChart("PieChart", "pie");
5
+ export const PieChart = createChart("PieChart", {
6
+ type: "pie",
7
+ vchartConstrouctor: VChart
8
+ });
4
9
  //# sourceMappingURL=PieChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/PieChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAgB,UAAU,EAAE,KAAK,CAAC,CAAC","file":"PieChart.js","sourcesContent":["import { IPieChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface PieChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IPieChartSpec, 'type'> {}\n\nexport const PieChart = createChart<PieChartProps>('PieChart', 'pie');\n"]}
1
+ {"version":3,"sources":["../src/charts/PieChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAA2D,UAAU,EAAE;IACxG,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"PieChart.js","sourcesContent":["import React from 'react';\nimport type { IPieChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface PieChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IPieChartSpec, 'type'> {}\n\nexport const PieChart = createChart<React.PropsWithChildren<PieChartProps> & { type: 'pie' }>('PieChart', {\n type: 'pie',\n vchartConstrouctor: VChart\n});\n"]}
@@ -1,5 +1,10 @@
1
- import { IRadarChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IRadarChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface RadarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRadarChartSpec, 'type'> {
4
5
  }
5
- export declare const RadarChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const RadarChart: React.ForwardRefExoticComponent<RadarChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'radar';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const RadarChart = createChart("RadarChart", "radar");
5
+ export const RadarChart = createChart("RadarChart", {
6
+ type: "radar",
7
+ vchartConstrouctor: VChart
8
+ });
4
9
  //# sourceMappingURL=RadarChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/RadarChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAkB,YAAY,EAAE,OAAO,CAAC,CAAC","file":"RadarChart.js","sourcesContent":["import { IRadarChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RadarChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRadarChartSpec, 'type'> {}\n\nexport const RadarChart = createChart<RadarChartProps>('RadarChart', 'radar');\n"]}
1
+ {"version":3,"sources":["../src/charts/RadarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA+D,YAAY,EAAE;IAChH,IAAI,EAAE,OAAO;IACb,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"RadarChart.js","sourcesContent":["import React from 'react';\nimport type { IRadarChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RadarChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRadarChartSpec, 'type'> {}\n\nexport const RadarChart = createChart<React.PropsWithChildren<RadarChartProps> & { type: 'radar' }>('RadarChart', {\n type: 'radar',\n vchartConstrouctor: VChart\n});\n"]}
@@ -1,5 +1,10 @@
1
- import { IRangeColumnChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IRangeColumnChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface RangeColumnChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRangeColumnChartSpec, 'type'> {
4
5
  }
5
- export declare const RangeColumnChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const RangeColumnChart: React.ForwardRefExoticComponent<RangeColumnChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'rangeColumn';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const RangeColumnChart = createChart("RangeColumnChart", "rangeColumn");
5
+ export const RangeColumnChart = createChart("RangeColumnChart", {
6
+ type: "rangeColumn",
7
+ vchartConstrouctor: VChart
8
+ });
4
9
  //# sourceMappingURL=RangeColumnChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/RangeColumnChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAwB,kBAAkB,EAAE,aAAa,CAAC,CAAC","file":"RangeColumnChart.js","sourcesContent":["import { IRangeColumnChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RangeColumnChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRangeColumnChartSpec, 'type'> {}\n\nexport const RangeColumnChart = createChart<RangeColumnChartProps>('RangeColumnChart', 'rangeColumn');\n"]}
1
+ {"version":3,"sources":["../src/charts/RangeColumnChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CACzC,kBAAkB,EAClB;IACE,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"RangeColumnChart.js","sourcesContent":["import React from 'react';\nimport type { IRangeColumnChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RangeColumnChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRangeColumnChartSpec, 'type'> {}\n\nexport const RangeColumnChart = createChart<React.PropsWithChildren<RangeColumnChartProps> & { type: 'rangeColumn' }>(\n 'RangeColumnChart',\n {\n type: 'rangeColumn',\n vchartConstrouctor: VChart\n }\n);\n"]}
@@ -1,5 +1,10 @@
1
- import { IRoseChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IRoseChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface RoseChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRoseChartSpec, 'type'> {
4
5
  }
5
- export declare const RoseChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const RoseChart: React.ForwardRefExoticComponent<RoseChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'rose';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,8 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const RoseChart = createChart("RoseChart", "rose");
4
- //# sourceMappingURL=RoseChart.js.map
5
+ export const RoseChart = createChart("RoseChart", {
6
+ type: "rose",
7
+ vchartConstrouctor: VChart
8
+ });
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/RoseChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAiB,WAAW,EAAE,MAAM,CAAC,CAAC","file":"RoseChart.js","sourcesContent":["import { IRoseChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RoseChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRoseChartSpec, 'type'> {}\n\nexport const RoseChart = createChart<RoseChartProps>('RoseChart', 'rose');\n"]}
1
+ {"version":3,"sources":["../src/charts/RoseChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAA6D,WAAW,EAAE;IAC5G,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"RoseChart.js","sourcesContent":["import React from 'react';\nimport type { IRoseChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RoseChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRoseChartSpec, 'type'> {}\n\nexport const RoseChart = createChart<React.PropsWithChildren<RoseChartProps> & { type: 'rose' }>('RoseChart', {\n type: 'rose',\n vchartConstrouctor: VChart\n});\n"]}
@@ -1,5 +1,10 @@
1
- import { IScatterChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IScatterChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface ScatterChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IScatterChartSpec, 'type'> {
4
5
  }
5
- export declare const ScatterChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'scatter';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const ScatterChart = createChart("ScatterChart", "scatter");
5
+ export const ScatterChart = createChart("ScatterChart", {
6
+ type: "scatter",
7
+ vchartConstrouctor: VChart
8
+ });
4
9
  //# sourceMappingURL=ScatterChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/ScatterChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAoB,cAAc,EAAE,SAAS,CAAC,CAAC","file":"ScatterChart.js","sourcesContent":["import { IScatterChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface ScatterChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IScatterChartSpec, 'type'> {}\n\nexport const ScatterChart = createChart<ScatterChartProps>('ScatterChart', 'scatter');\n"]}
1
+ {"version":3,"sources":["../src/charts/ScatterChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CACrC,cAAc,EACd;IACE,IAAI,EAAE,SAAS;IACf,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"ScatterChart.js","sourcesContent":["import React from 'react';\nimport type { IScatterChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface ScatterChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IScatterChartSpec, 'type'> {}\n\nexport const ScatterChart = createChart<React.PropsWithChildren<ScatterChartProps> & { type: 'scatter' }>(\n 'ScatterChart',\n {\n type: 'scatter',\n vchartConstrouctor: VChart\n }\n);\n"]}
@@ -1,5 +1,10 @@
1
- import { ISequenceChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { ISequenceChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface SequenceChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ISequenceChartSpec, 'type'> {
4
5
  }
5
- export declare const SequenceChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const SequenceChart: React.ForwardRefExoticComponent<SequenceChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'sequence';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const SequenceChart = createChart("SequenceChart", "sequence");
5
+ export const SequenceChart = createChart("SequenceChart", {
6
+ type: "sequence",
7
+ vchartConstrouctor: VChart
8
+ });
4
9
  //# sourceMappingURL=SequenceChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/SequenceChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAqB,eAAe,EAAE,UAAU,CAAC,CAAC","file":"SequenceChart.js","sourcesContent":["import { ISequenceChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface SequenceChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ISequenceChartSpec, 'type'> {}\n\nexport const SequenceChart = createChart<SequenceChartProps>('SequenceChart', 'sequence');\n"]}
1
+ {"version":3,"sources":["../src/charts/SequenceChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CACtC,eAAe,EACf;IACE,IAAI,EAAE,UAAU;IAChB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"SequenceChart.js","sourcesContent":["import React from 'react';\nimport type { ISequenceChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface SequenceChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ISequenceChartSpec, 'type'> {}\n\nexport const SequenceChart = createChart<React.PropsWithChildren<SequenceChartProps> & { type: 'sequence' }>(\n 'SequenceChart',\n {\n type: 'sequence',\n vchartConstrouctor: VChart\n }\n);\n"]}
@@ -1,5 +1,10 @@
1
- import { IWordCloudChartSpec } from '@visactor/vchart';
1
+ import React from 'react';
2
+ import type { IWordCloudChartSpec } from '@visactor/vchart';
2
3
  import { BaseChartProps } from './BaseChart';
3
4
  export interface WordCloudChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IWordCloudChartSpec, 'type'> {
4
5
  }
5
- export declare const WordCloudChart: import("react").ForwardRefExoticComponent<import("../containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
6
+ export declare const WordCloudChart: React.ForwardRefExoticComponent<WordCloudChartProps & {
7
+ children?: React.ReactNode;
8
+ } & {
9
+ type: 'wordCloud';
10
+ } & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
@@ -1,4 +1,9 @@
1
+ import { default as VChart } from "@visactor/vchart";
2
+
1
3
  import { createChart } from "./BaseChart";
2
4
 
3
- export const WordCloudChart = createChart("WordCloudChart", "wordCloud");
5
+ export const WordCloudChart = createChart("WordCloudChart", {
6
+ type: "wordCloud",
7
+ vchartConstrouctor: VChart
8
+ });
4
9
  //# sourceMappingURL=WordCloudChart.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/WordCloudChart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAAsB,gBAAgB,EAAE,WAAW,CAAC,CAAC","file":"WordCloudChart.js","sourcesContent":["import { IWordCloudChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface WordCloudChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IWordCloudChartSpec, 'type'> {}\n\nexport const WordCloudChart = createChart<WordCloudChartProps>('WordCloudChart', 'wordCloud');\n"]}
1
+ {"version":3,"sources":["../src/charts/WordCloudChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CACvC,gBAAgB,EAChB;IACE,IAAI,EAAE,WAAW;IACjB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"WordCloudChart.js","sourcesContent":["import React from 'react';\nimport type { IWordCloudChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface WordCloudChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IWordCloudChartSpec, 'type'> {}\n\nexport const WordCloudChart = createChart<React.PropsWithChildren<WordCloudChartProps> & { type: 'wordCloud' }>(\n 'WordCloudChart',\n {\n type: 'wordCloud',\n vchartConstrouctor: VChart\n }\n);\n"]}
@@ -1,16 +1,18 @@
1
- export { AreaChart } from './AreaChart';
2
- export { BarChart } from './BarChart';
3
- export { LineChart } from './LineChart';
4
- export { ScatterChart } from './ScatterChart';
5
- export { PieChart } from './PieChart';
6
- export { RoseChart } from './RoseChart';
7
- export { RadarChart } from './RadarChart';
8
- export { MapChart } from './MapChart';
9
- export { HistogramChart } from './HistogramChart';
10
- export { WordCloudChart } from './WordCloudChart';
11
- export { FunnelChart } from './FunnelChart';
12
- export { BoxPlotChart } from './BoxPlotChart';
13
- export { CircularProgressChart } from './CircularProgressChart';
14
- export { LinearProgressChart } from './LinearProgressChart';
15
- export { RangeColumnChart } from './RangeColumnChart';
16
- export { CommonChart } from './CommonChart';
1
+ export * from './AreaChart';
2
+ export * from './BarChart';
3
+ export * from './LineChart';
4
+ export * from './ScatterChart';
5
+ export * from './PieChart';
6
+ export * from './RoseChart';
7
+ export * from './RadarChart';
8
+ export * from './MapChart';
9
+ export * from './HistogramChart';
10
+ export * from './WordCloudChart';
11
+ export * from './FunnelChart';
12
+ export * from './BoxPlotChart';
13
+ export * from './CircularProgressChart';
14
+ export * from './LinearProgressChart';
15
+ export * from './RangeColumnChart';
16
+ export * from './CommonChart';
17
+ export type { ChartOptions } from './BaseChart';
18
+ export type { IData, IChartSpec } from '@visactor/vchart';
@@ -1,32 +1,32 @@
1
- export { AreaChart } from "./AreaChart";
1
+ export * from "./AreaChart";
2
2
 
3
- export { BarChart } from "./BarChart";
3
+ export * from "./BarChart";
4
4
 
5
- export { LineChart } from "./LineChart";
5
+ export * from "./LineChart";
6
6
 
7
- export { ScatterChart } from "./ScatterChart";
7
+ export * from "./ScatterChart";
8
8
 
9
- export { PieChart } from "./PieChart";
9
+ export * from "./PieChart";
10
10
 
11
- export { RoseChart } from "./RoseChart";
11
+ export * from "./RoseChart";
12
12
 
13
- export { RadarChart } from "./RadarChart";
13
+ export * from "./RadarChart";
14
14
 
15
- export { MapChart } from "./MapChart";
15
+ export * from "./MapChart";
16
16
 
17
- export { HistogramChart } from "./HistogramChart";
17
+ export * from "./HistogramChart";
18
18
 
19
- export { WordCloudChart } from "./WordCloudChart";
19
+ export * from "./WordCloudChart";
20
20
 
21
- export { FunnelChart } from "./FunnelChart";
21
+ export * from "./FunnelChart";
22
22
 
23
- export { BoxPlotChart } from "./BoxPlotChart";
23
+ export * from "./BoxPlotChart";
24
24
 
25
- export { CircularProgressChart } from "./CircularProgressChart";
25
+ export * from "./CircularProgressChart";
26
26
 
27
- export { LinearProgressChart } from "./LinearProgressChart";
27
+ export * from "./LinearProgressChart";
28
28
 
29
- export { RangeColumnChart } from "./RangeColumnChart";
29
+ export * from "./RangeColumnChart";
30
30
 
31
- export { CommonChart } from "./CommonChart";
32
- //# sourceMappingURL=index.js.map
31
+ export * from "./CommonChart";
32
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["charts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA","file":"index.js","sourcesContent":["export { AreaChart } from './AreaChart'\nexport { BarChart } from './BarChart'\nexport { LineChart } from './LineChart'\nexport { ScatterChart } from './ScatterChart'\n\nexport { PieChart } from './PieChart'\nexport { RoseChart } from './RoseChart'\n\nexport { RadarChart } from './RadarChart'\n\nexport { MapChart } from './MapChart'\nexport { HistogramChart } from './HistogramChart'\nexport { WordCloudChart } from './WordCloudChart'\nexport { FunnelChart } from './FunnelChart'\nexport { BoxPlotChart } from './BoxPlotChart'\n\nexport { CircularProgressChart } from './CircularProgressChart'\nexport { LinearProgressChart } from './LinearProgressChart'\nexport { RangeColumnChart } from './RangeColumnChart'\n\nexport { CommonChart } from './CommonChart'"]}
1
+ {"version":3,"sources":["../src/charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAE7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './AreaChart';\nexport * from './BarChart';\nexport * from './LineChart';\nexport * from './ScatterChart';\n\nexport * from './PieChart';\nexport * from './RoseChart';\n\nexport * from './RadarChart';\n\nexport * from './MapChart';\nexport * from './HistogramChart';\nexport * from './WordCloudChart';\nexport * from './FunnelChart';\nexport * from './BoxPlotChart';\n\nexport * from './CircularProgressChart';\nexport * from './LinearProgressChart';\nexport * from './RangeColumnChart';\n\nexport * from './CommonChart';\n\nexport type { ChartOptions } from './BaseChart';\nexport type { IData, IChartSpec } from '@visactor/vchart';\n"]}
@@ -1,5 +1,4 @@
1
- export interface AxisProps {
2
- }
3
- export declare const Axis: import("react").FC<import("./BaseComponent").BaseComponentProps & {
4
- updateId?: number;
5
- }>;
1
+ import { BaseComponentProps } from './BaseComponent';
2
+ import type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';
3
+ export type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;
4
+ export declare const Axis: import("react").FC<AxisProps>;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMlD,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC","file":"Axis.js","sourcesContent":["import { createComponent } from \"./BaseComponent\";\n\nexport interface AxisProps {\n //\n}\n\nexport const Axis = createComponent(\"Axis\", \"axes\");\n"]}
1
+ {"version":3,"sources":["../src/components/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAY,MAAM,EAAE,MAAM,CAAC,CAAC","file":"Axis.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';\n\nexport type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;\n\nexport const Axis = createComponent<AxisProps>('Axis', 'axes');\n"]}
@@ -1,9 +1,10 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface BaseComponentProps {
3
3
  id?: string | number;
4
4
  }
5
5
  type ComponentProps = BaseComponentProps & {
6
6
  updateId?: number;
7
+ componentId?: number;
7
8
  };
8
9
  export declare const createComponent: <T extends ComponentProps>(componentName: string, specName: string, supportedEvents?: Record<string, string> | null, isSingle?: boolean) => React.FC<T>;
9
10
  export {};
@@ -1,47 +1,26 @@
1
1
  import React, { useContext, useEffect } from "react";
2
2
 
3
- import { isNil, pickWithout } from "@visactor/vutils";
3
+ import { pickWithout } from "@visactor/vutils";
4
4
 
5
5
  import RootChartContext from "../context/chart";
6
6
 
7
7
  import { bindEventsToChart } from "../eventsUtils";
8
8
 
9
- import { uid } from "../util";
10
-
11
9
  export const createComponent = (componentName, specName, supportedEvents, isSingle) => {
12
- const ignoreKeys = [ "id", "updateId" ], notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys, Comp = props => {
13
- const context = useContext(RootChartContext), id = React.useRef(isNil(props.id) ? uid(specName) : props.id), eventsBinded = React.useRef(null), updateId = React.useRef(props.updateId), componentSpec = pickWithout(props, notSpecKeys);
14
- return !!supportedEvents && bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents) && (eventsBinded.current = props),
15
- props.updateId !== updateId.current ? updateId.current = props.updateId : updateToContext(context, id.current, specName, isSingle, componentSpec),
16
- useEffect((() => () => {
17
- supportedEvents && bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents),
18
- deleteToContext(context, id.current, specName, isSingle);
10
+ const ignoreKeys = [ "id", "updateId", "componentId" ], notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys, Comp = props => {
11
+ const context = useContext(RootChartContext), eventsBinded = React.useRef(null), updateId = React.useRef(props.updateId);
12
+ if (props.updateId !== updateId.current) {
13
+ updateId.current = props.updateId;
14
+ !!supportedEvents && bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents) && (eventsBinded.current = props);
15
+ }
16
+ return useEffect((() => () => {
17
+ supportedEvents && bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);
19
18
  }), []), null;
20
19
  };
21
- return Comp.displayName = componentName, Comp;
22
- };
23
-
24
- const updateToContext = (context, id, specName, isSingle, props) => {
25
- if (context.specFromChildren) {
26
- if (isSingle) context.specFromChildren[specName] = Object.assign({}, props); else {
27
- context.specFromChildren[specName] || (context.specFromChildren[specName] = []);
28
- const comps = context.specFromChildren[specName], index = comps.findIndex((entry => entry.id === id));
29
- index >= 0 ? comps[index] = Object.assign({
30
- id: id
31
- }, props) : context.specFromChildren[specName].push(Object.assign({
32
- id: id
33
- }, props));
34
- }
35
- context.isChildrenUpdated = !0;
36
- }
37
- }, deleteToContext = (context, id, specName, isSingle) => {
38
- var _a;
39
- if (context.specFromChildren) if (isSingle) context.specFromChildren[specName] = null; else {
40
- const comps = null !== (_a = context.specFromChildren[specName]) && void 0 !== _a ? _a : [], index = comps.findIndex((entry => entry.id === id));
41
- if (index >= 0) {
42
- const newComps = comps.slice(0, index - 1).concat(comps.slice(index + 1));
43
- context.specFromChildren[specName] = newComps, context.isChildrenUpdated = !0;
44
- }
45
- }
20
+ return Comp.displayName = componentName, Comp.parseSpec = props => ({
21
+ spec: pickWithout(props, notSpecKeys),
22
+ specName: specName,
23
+ isSingle: isSingle
24
+ }), Comp;
46
25
  };
47
26
  //# sourceMappingURL=BaseComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/BaseComponent.tsx"],"names":[],"mappings":"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","file":"BaseComponent.js","sourcesContent":["import React, { useContext, useEffect } from \"react\";\nimport { isNil, pickWithout } from \"@visactor/vutils\";\n\nimport RootChartContext, { ChartContextType } from \"../context/chart\";\nimport { bindEventsToChart } from \"../eventsUtils\";\nimport { uid } from \"../util\";\n\nexport interface BaseComponentProps {\n id?: string | number;\n}\n\ntype ComponentProps = BaseComponentProps & { updateId?: number };\n\nexport const createComponent = <T extends ComponentProps>(\n componentName: string,\n specName: string,\n supportedEvents?: Record<string, string> | null,\n isSingle?: boolean\n) => {\n const ignoreKeys = [\"id\", \"updateId\"];\n const notSpecKeys = supportedEvents\n ? Object.keys(supportedEvents).concat(ignoreKeys)\n : ignoreKeys;\n\n const Comp: React.FC<T> = (props: T) => {\n const context = useContext(RootChartContext);\n const id = React.useRef<string | number>(\n isNil(props.id) ? uid(specName) : props.id\n );\n\n const eventsBinded = React.useRef<T>(null);\n const updateId = React.useRef<number>(props.updateId);\n\n const componentSpec: Partial<T> = pickWithout<T>(props, notSpecKeys);\n const hasPrevEventsBinded =\n !!supportedEvents &&\n bindEventsToChart(\n context.chart,\n props,\n eventsBinded.current,\n supportedEvents\n );\n if (hasPrevEventsBinded) {\n eventsBinded.current = props;\n }\n\n if (props.updateId !== updateId.current) {\n updateId.current = props.updateId;\n } else {\n updateToContext(context, id.current, specName, isSingle, componentSpec);\n }\n\n useEffect(() => {\n return () => {\n !!supportedEvents &&\n bindEventsToChart(\n context.chart,\n null,\n eventsBinded.current,\n supportedEvents\n );\n deleteToContext(context, id.current, specName, isSingle);\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n\nconst updateToContext = (\n context: ChartContextType,\n id: string | number,\n specName: string,\n isSingle: boolean,\n props: Partial<ComponentProps>\n) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = { ...props };\n } else {\n if (!context.specFromChildren[specName]) {\n context.specFromChildren[specName] = [];\n }\n\n const comps = context.specFromChildren[specName];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n comps[index] = {\n id,\n ...props,\n };\n } else {\n context.specFromChildren[specName].push({\n id,\n ...props,\n });\n }\n }\n context.isChildrenUpdated = true;\n};\n\nconst deleteToContext = (\n context: ChartContextType,\n id: string | number,\n specName: string,\n isSingle: boolean\n) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = null;\n } else {\n const comps = context.specFromChildren[specName] ?? [];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n const newComps = comps.slice(0, index - 1).concat(comps.slice(index + 1));\n\n context.specFromChildren[specName] = newComps;\n context.isChildrenUpdated = true;\n }\n }\n};\n"]}
1
+ {"version":3,"sources":["../src/components/BaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,gBAAgB,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQnD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,aAAqB,EACrB,QAAgB,EAChB,eAA+C,EAC/C,QAAkB,EAClB,EAAE;IACF,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAEnG,MAAM,IAAI,GAAgB,CAAC,KAAQ,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAI,IAAI,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAS,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtD,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,EAAE;YAEvC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;YAGlC,MAAM,mBAAmB,GAAG,eAAe;gBACzC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,EAAE,eAAe,CAAC;gBAChF,CAAC,CAAC,KAAK,CAAC;YACV,IAAI,mBAAmB,EAAE;gBACvB,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;aAC9B;SACF;QAED,SAAS,CAAC,GAAG,EAAE;YACb,OAAO,GAAG,EAAE;gBACV,IAAI,eAAe,EAAE;oBACnB,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;iBAC/E;YACH,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,IAAY,CAAC,SAAS,GAAG,CAAC,KAAsD,EAAE,EAAE;QACnF,MAAM,gBAAgB,GAAe,WAAW,CAAI,KAAK,EAAE,WAAW,CAAC,CAAC;QAExE,OAAO;YACL,IAAI,EAAE,gBAAgB;YACtB,QAAQ;YACR,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseComponent.js","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport { pickWithout } from '@visactor/vutils';\n\nimport RootChartContext from '../context/chart';\nimport { bindEventsToChart } from '../eventsUtils';\n\nexport interface BaseComponentProps {\n id?: string | number;\n}\n\ntype ComponentProps = BaseComponentProps & { updateId?: number; componentId?: number };\n\nexport const createComponent = <T extends ComponentProps>(\n componentName: string,\n specName: string,\n supportedEvents?: Record<string, string> | null,\n isSingle?: boolean\n) => {\n const ignoreKeys = ['id', 'updateId', 'componentId'];\n const notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys;\n\n const Comp: React.FC<T> = (props: T) => {\n const context = useContext(RootChartContext);\n const eventsBinded = React.useRef<T>(null);\n const updateId = React.useRef<number>(props.updateId);\n if (props.updateId !== updateId.current) {\n // update triggered by chart when chart is rendered\n updateId.current = props.updateId;\n\n // rebind events after chart render\n const hasPrevEventsBinded = supportedEvents\n ? bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents)\n : false;\n if (hasPrevEventsBinded) {\n eventsBinded.current = props;\n }\n }\n\n useEffect(() => {\n return () => {\n if (supportedEvents) {\n bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);\n }\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n (Comp as any).parseSpec = (props: T & { updateId?: number; componentId?: string }) => {\n const newComponentSpec: Partial<T> = pickWithout<T>(props, notSpecKeys);\n\n return {\n spec: newComponentSpec,\n specName,\n isSingle\n };\n };\n\n return Comp;\n};\n"]}
@@ -0,0 +1,5 @@
1
+ import { BrushEventProps } from '../eventsUtils';
2
+ import { BaseComponentProps } from './BaseComponent';
3
+ import type { IBrushSpec } from '@visactor/vchart';
4
+ export type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;
5
+ export declare const Brush: import("react").FC<BrushProps>;
@@ -0,0 +1,6 @@
1
+ import { BRUSH_CUSTOMIZED_EVENTS } from "../eventsUtils";
2
+
3
+ import { createComponent } from "./BaseComponent";
4
+
5
+ export const Brush = createComponent("Brush", "brush", BRUSH_CUSTOMIZED_EVENTS, !0);
6
+ //# sourceMappingURL=Brush.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Brush.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAmB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAa,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC","file":"Brush.js","sourcesContent":["import { BRUSH_CUSTOMIZED_EVENTS, BrushEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IBrushSpec } from '@visactor/vchart';\n\nexport type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;\n\nexport const Brush = createComponent<BrushProps>('Brush', 'brush', BRUSH_CUSTOMIZED_EVENTS, true);\n"]}
@@ -0,0 +1,4 @@
1
+ import { BaseComponentProps } from './BaseComponent';
2
+ import type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';
3
+ export type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;
4
+ export declare const Crosshair: import("react").FC<CrosshairProps>;
@@ -0,0 +1,4 @@
1
+ import { createComponent } from "./BaseComponent";
2
+
3
+ export const Crosshair = createComponent("Crosshair", "crosshair");
4
+ //# sourceMappingURL=Crosshair.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Crosshair.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,CAAC,CAAC","file":"Crosshair.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';\n\nexport type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;\n\nexport const Crosshair = createComponent<CrosshairProps>('Crosshair', 'crosshair');\n"]}
@@ -0,0 +1,5 @@
1
+ import { DataZoomEventProps } from '../eventsUtils';
2
+ import { BaseComponentProps } from './BaseComponent';
3
+ import type { IDataZoomSpec } from '@visactor/vchart';
4
+ export type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;
5
+ export declare const DataZoom: import("react").FC<DataZoomProps>;
@@ -0,0 +1,6 @@
1
+ import { DATAZOOM_CUSTOMIZED_EVENTS } from "../eventsUtils";
2
+
3
+ import { createComponent } from "./BaseComponent";
4
+
5
+ export const DataZoom = createComponent("DataZoom", "dataZoom", DATAZOOM_CUSTOMIZED_EVENTS);
6
+ //# sourceMappingURL=DataZoom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/DataZoom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAsB,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAgB,UAAU,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC","file":"DataZoom.js","sourcesContent":["import { DATAZOOM_CUSTOMIZED_EVENTS, DataZoomEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IDataZoomSpec } from '@visactor/vchart';\n\nexport type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;\nexport const DataZoom = createComponent<DataZoomProps>('DataZoom', 'dataZoom', DATAZOOM_CUSTOMIZED_EVENTS);\n"]}
@@ -0,0 +1,4 @@
1
+ import { BaseComponentProps } from './BaseComponent';
2
+ import type { IIndicatorSpec } from '@visactor/vchart';
3
+ export type IndicatorProps = IIndicatorSpec & BaseComponentProps;
4
+ export declare const Indicator: import("react").FC<IndicatorProps>;
@@ -0,0 +1,4 @@
1
+ import { createComponent } from "./BaseComponent";
2
+
3
+ export const Indicator = createComponent("Indicator", "indicator", null, !0);
4
+ //# sourceMappingURL=Indicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Indicator.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IIndicatorSpec } from '@visactor/vchart';\n\nexport type IndicatorProps = IIndicatorSpec & BaseComponentProps;\n\nexport const Indicator = createComponent<IndicatorProps>('Indicator', 'indicator', null, true);\n"]}
@@ -1,9 +1,5 @@
1
+ import type { IDiscreteLegendSpec } from '@visactor/vchart';
2
+ import { LegendEventProps } from '../eventsUtils';
1
3
  import { BaseComponentProps } from './BaseComponent';
2
- export interface LegendProps extends BaseComponentProps {
3
- onLegendItemHover: (e: any) => void;
4
- onLegendItemUnHover: (e: any) => void;
5
- onLegendItemClick: (e: any) => void;
6
- }
7
- export declare const Legend: import("react").FC<BaseComponentProps & {
8
- updateId?: number;
9
- }>;
4
+ export type LegendProps = BaseComponentProps & IDiscreteLegendSpec & LegendEventProps;
5
+ export declare const Legend: import("react").FC<LegendProps>;