react-native-metrify 0.1.0-alpha.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 (679) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +332 -0
  4. package/dist/cjs/core/animation/index.js +99 -0
  5. package/dist/cjs/core/animation/index.js.map +1 -0
  6. package/dist/cjs/core/animation/index.web.js +95 -0
  7. package/dist/cjs/core/animation/index.web.js.map +1 -0
  8. package/dist/cjs/core/hooks/index.js +50 -0
  9. package/dist/cjs/core/hooks/index.js.map +1 -0
  10. package/dist/cjs/core/index.js +36 -0
  11. package/dist/cjs/core/index.js.map +1 -0
  12. package/dist/cjs/core/layout/index.js +80 -0
  13. package/dist/cjs/core/layout/index.js.map +1 -0
  14. package/dist/cjs/core/math/index.js +62 -0
  15. package/dist/cjs/core/math/index.js.map +1 -0
  16. package/dist/cjs/core/theme/ThemeProvider.js +63 -0
  17. package/dist/cjs/core/theme/ThemeProvider.js.map +1 -0
  18. package/dist/cjs/core/theme/index.js +13 -0
  19. package/dist/cjs/core/theme/index.js.map +1 -0
  20. package/dist/cjs/core/theme/themes.js +120 -0
  21. package/dist/cjs/core/theme/themes.js.map +1 -0
  22. package/dist/cjs/core/types/index.js +11 -0
  23. package/dist/cjs/core/types/index.js.map +1 -0
  24. package/dist/cjs/core/utils/responsive.js +118 -0
  25. package/dist/cjs/core/utils/responsive.js.map +1 -0
  26. package/dist/cjs/core/utils/time.js +84 -0
  27. package/dist/cjs/core/utils/time.js.map +1 -0
  28. package/dist/cjs/index.js +28 -0
  29. package/dist/cjs/index.js.map +1 -0
  30. package/dist/cjs/renderer-svg/adapters/index.js +67 -0
  31. package/dist/cjs/renderer-svg/adapters/index.js.map +1 -0
  32. package/dist/cjs/renderer-svg/index.js +25 -0
  33. package/dist/cjs/renderer-svg/index.js.map +1 -0
  34. package/dist/cjs/renderer-svg/paths/arc.js +79 -0
  35. package/dist/cjs/renderer-svg/paths/arc.js.map +1 -0
  36. package/dist/cjs/renderer-svg/paths/index.js +23 -0
  37. package/dist/cjs/renderer-svg/paths/index.js.map +1 -0
  38. package/dist/cjs/renderer-svg/paths/line.js +70 -0
  39. package/dist/cjs/renderer-svg/paths/line.js.map +1 -0
  40. package/dist/cjs/renderer-svg/paths/rect.js +54 -0
  41. package/dist/cjs/renderer-svg/paths/rect.js.map +1 -0
  42. package/dist/cjs/renderer-svg/primitives/AnimatedCircle.js +54 -0
  43. package/dist/cjs/renderer-svg/primitives/AnimatedCircle.js.map +1 -0
  44. package/dist/cjs/renderer-svg/primitives/AnimatedPath.js +54 -0
  45. package/dist/cjs/renderer-svg/primitives/AnimatedPath.js.map +1 -0
  46. package/dist/cjs/renderer-svg/primitives/Text.js +66 -0
  47. package/dist/cjs/renderer-svg/primitives/Text.js.map +1 -0
  48. package/dist/cjs/renderer-svg/primitives/index.js +23 -0
  49. package/dist/cjs/renderer-svg/primitives/index.js.map +1 -0
  50. package/dist/cjs/widgets/AreaChart/AreaChart.js +179 -0
  51. package/dist/cjs/widgets/AreaChart/AreaChart.js.map +1 -0
  52. package/dist/cjs/widgets/AreaChart/index.js +6 -0
  53. package/dist/cjs/widgets/AreaChart/index.js.map +1 -0
  54. package/dist/cjs/widgets/AreaChart/types.js +3 -0
  55. package/dist/cjs/widgets/AreaChart/types.js.map +1 -0
  56. package/dist/cjs/widgets/BarChart/BarChart.js +203 -0
  57. package/dist/cjs/widgets/BarChart/BarChart.js.map +1 -0
  58. package/dist/cjs/widgets/BarChart/index.js +9 -0
  59. package/dist/cjs/widgets/BarChart/index.js.map +1 -0
  60. package/dist/cjs/widgets/BarChart/types.js +3 -0
  61. package/dist/cjs/widgets/BarChart/types.js.map +1 -0
  62. package/dist/cjs/widgets/BoxPlot/BoxPlot.js +186 -0
  63. package/dist/cjs/widgets/BoxPlot/BoxPlot.js.map +1 -0
  64. package/dist/cjs/widgets/BoxPlot/index.js +6 -0
  65. package/dist/cjs/widgets/BoxPlot/index.js.map +1 -0
  66. package/dist/cjs/widgets/BoxPlot/types.js +3 -0
  67. package/dist/cjs/widgets/BoxPlot/types.js.map +1 -0
  68. package/dist/cjs/widgets/BubbleChart/BubbleChart.js +158 -0
  69. package/dist/cjs/widgets/BubbleChart/BubbleChart.js.map +1 -0
  70. package/dist/cjs/widgets/BubbleChart/index.js +6 -0
  71. package/dist/cjs/widgets/BubbleChart/index.js.map +1 -0
  72. package/dist/cjs/widgets/BubbleChart/types.js +3 -0
  73. package/dist/cjs/widgets/BubbleChart/types.js.map +1 -0
  74. package/dist/cjs/widgets/CandlestickChart/CandlestickChart.js +168 -0
  75. package/dist/cjs/widgets/CandlestickChart/CandlestickChart.js.map +1 -0
  76. package/dist/cjs/widgets/CandlestickChart/index.js +6 -0
  77. package/dist/cjs/widgets/CandlestickChart/index.js.map +1 -0
  78. package/dist/cjs/widgets/CandlestickChart/types.js +3 -0
  79. package/dist/cjs/widgets/CandlestickChart/types.js.map +1 -0
  80. package/dist/cjs/widgets/FunnelChart/FunnelChart.js +149 -0
  81. package/dist/cjs/widgets/FunnelChart/FunnelChart.js.map +1 -0
  82. package/dist/cjs/widgets/FunnelChart/index.js +6 -0
  83. package/dist/cjs/widgets/FunnelChart/index.js.map +1 -0
  84. package/dist/cjs/widgets/FunnelChart/types.js +3 -0
  85. package/dist/cjs/widgets/FunnelChart/types.js.map +1 -0
  86. package/dist/cjs/widgets/Gauge/Gauge.js +171 -0
  87. package/dist/cjs/widgets/Gauge/Gauge.js.map +1 -0
  88. package/dist/cjs/widgets/Gauge/index.js +9 -0
  89. package/dist/cjs/widgets/Gauge/index.js.map +1 -0
  90. package/dist/cjs/widgets/Gauge/types.js +3 -0
  91. package/dist/cjs/widgets/Gauge/types.js.map +1 -0
  92. package/dist/cjs/widgets/GroupedBarChart/GroupedBarChart.js +155 -0
  93. package/dist/cjs/widgets/GroupedBarChart/GroupedBarChart.js.map +1 -0
  94. package/dist/cjs/widgets/GroupedBarChart/index.js +6 -0
  95. package/dist/cjs/widgets/GroupedBarChart/index.js.map +1 -0
  96. package/dist/cjs/widgets/GroupedBarChart/types.js +3 -0
  97. package/dist/cjs/widgets/GroupedBarChart/types.js.map +1 -0
  98. package/dist/cjs/widgets/Heatmap/Heatmap.js +182 -0
  99. package/dist/cjs/widgets/Heatmap/Heatmap.js.map +1 -0
  100. package/dist/cjs/widgets/Heatmap/index.js +6 -0
  101. package/dist/cjs/widgets/Heatmap/index.js.map +1 -0
  102. package/dist/cjs/widgets/Heatmap/types.js +3 -0
  103. package/dist/cjs/widgets/Heatmap/types.js.map +1 -0
  104. package/dist/cjs/widgets/Histogram/Histogram.js +152 -0
  105. package/dist/cjs/widgets/Histogram/Histogram.js.map +1 -0
  106. package/dist/cjs/widgets/Histogram/index.js +6 -0
  107. package/dist/cjs/widgets/Histogram/index.js.map +1 -0
  108. package/dist/cjs/widgets/Histogram/types.js +3 -0
  109. package/dist/cjs/widgets/Histogram/types.js.map +1 -0
  110. package/dist/cjs/widgets/HorizontalBarChart/HorizontalBarChart.js +124 -0
  111. package/dist/cjs/widgets/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  112. package/dist/cjs/widgets/HorizontalBarChart/index.js +6 -0
  113. package/dist/cjs/widgets/HorizontalBarChart/index.js.map +1 -0
  114. package/dist/cjs/widgets/HorizontalBarChart/types.js +3 -0
  115. package/dist/cjs/widgets/HorizontalBarChart/types.js.map +1 -0
  116. package/dist/cjs/widgets/KPI/KPI.js +195 -0
  117. package/dist/cjs/widgets/KPI/KPI.js.map +1 -0
  118. package/dist/cjs/widgets/KPI/index.js +9 -0
  119. package/dist/cjs/widgets/KPI/index.js.map +1 -0
  120. package/dist/cjs/widgets/KPI/types.js +3 -0
  121. package/dist/cjs/widgets/KPI/types.js.map +1 -0
  122. package/dist/cjs/widgets/LineChart/LineChart.js +298 -0
  123. package/dist/cjs/widgets/LineChart/LineChart.js.map +1 -0
  124. package/dist/cjs/widgets/LineChart/index.js +9 -0
  125. package/dist/cjs/widgets/LineChart/index.js.map +1 -0
  126. package/dist/cjs/widgets/LineChart/types.js +3 -0
  127. package/dist/cjs/widgets/LineChart/types.js.map +1 -0
  128. package/dist/cjs/widgets/MultiLineSparkline/MultiLineSparkline.js +192 -0
  129. package/dist/cjs/widgets/MultiLineSparkline/MultiLineSparkline.js.map +1 -0
  130. package/dist/cjs/widgets/MultiLineSparkline/index.js +9 -0
  131. package/dist/cjs/widgets/MultiLineSparkline/index.js.map +1 -0
  132. package/dist/cjs/widgets/MultiLineSparkline/types.js +3 -0
  133. package/dist/cjs/widgets/MultiLineSparkline/types.js.map +1 -0
  134. package/dist/cjs/widgets/PieChart/PieChart.js +241 -0
  135. package/dist/cjs/widgets/PieChart/PieChart.js.map +1 -0
  136. package/dist/cjs/widgets/PieChart/index.js +9 -0
  137. package/dist/cjs/widgets/PieChart/index.js.map +1 -0
  138. package/dist/cjs/widgets/PieChart/types.js +3 -0
  139. package/dist/cjs/widgets/PieChart/types.js.map +1 -0
  140. package/dist/cjs/widgets/Progress/Progress.js +166 -0
  141. package/dist/cjs/widgets/Progress/Progress.js.map +1 -0
  142. package/dist/cjs/widgets/Progress/index.js +9 -0
  143. package/dist/cjs/widgets/Progress/index.js.map +1 -0
  144. package/dist/cjs/widgets/Progress/types.js +3 -0
  145. package/dist/cjs/widgets/Progress/types.js.map +1 -0
  146. package/dist/cjs/widgets/RadarChart/RadarChart.js +162 -0
  147. package/dist/cjs/widgets/RadarChart/RadarChart.js.map +1 -0
  148. package/dist/cjs/widgets/RadarChart/index.js +6 -0
  149. package/dist/cjs/widgets/RadarChart/index.js.map +1 -0
  150. package/dist/cjs/widgets/RadarChart/types.js +3 -0
  151. package/dist/cjs/widgets/RadarChart/types.js.map +1 -0
  152. package/dist/cjs/widgets/SankeyDiagram/SankeyDiagram.js +211 -0
  153. package/dist/cjs/widgets/SankeyDiagram/SankeyDiagram.js.map +1 -0
  154. package/dist/cjs/widgets/SankeyDiagram/index.js +6 -0
  155. package/dist/cjs/widgets/SankeyDiagram/index.js.map +1 -0
  156. package/dist/cjs/widgets/SankeyDiagram/types.js +3 -0
  157. package/dist/cjs/widgets/SankeyDiagram/types.js.map +1 -0
  158. package/dist/cjs/widgets/ScatterPlot/ScatterPlot.js +152 -0
  159. package/dist/cjs/widgets/ScatterPlot/ScatterPlot.js.map +1 -0
  160. package/dist/cjs/widgets/ScatterPlot/index.js +6 -0
  161. package/dist/cjs/widgets/ScatterPlot/index.js.map +1 -0
  162. package/dist/cjs/widgets/ScatterPlot/types.js +3 -0
  163. package/dist/cjs/widgets/ScatterPlot/types.js.map +1 -0
  164. package/dist/cjs/widgets/Sparkline/Sparkline.js +154 -0
  165. package/dist/cjs/widgets/Sparkline/Sparkline.js.map +1 -0
  166. package/dist/cjs/widgets/Sparkline/index.js +9 -0
  167. package/dist/cjs/widgets/Sparkline/index.js.map +1 -0
  168. package/dist/cjs/widgets/Sparkline/types.js +3 -0
  169. package/dist/cjs/widgets/Sparkline/types.js.map +1 -0
  170. package/dist/cjs/widgets/StackedBarChart/StackedBarChart.js +152 -0
  171. package/dist/cjs/widgets/StackedBarChart/StackedBarChart.js.map +1 -0
  172. package/dist/cjs/widgets/StackedBarChart/index.js +6 -0
  173. package/dist/cjs/widgets/StackedBarChart/index.js.map +1 -0
  174. package/dist/cjs/widgets/StackedBarChart/types.js +3 -0
  175. package/dist/cjs/widgets/StackedBarChart/types.js.map +1 -0
  176. package/dist/cjs/widgets/SunburstChart/SunburstChart.js +134 -0
  177. package/dist/cjs/widgets/SunburstChart/SunburstChart.js.map +1 -0
  178. package/dist/cjs/widgets/SunburstChart/index.js +6 -0
  179. package/dist/cjs/widgets/SunburstChart/index.js.map +1 -0
  180. package/dist/cjs/widgets/SunburstChart/types.js +3 -0
  181. package/dist/cjs/widgets/SunburstChart/types.js.map +1 -0
  182. package/dist/cjs/widgets/Treemap/Treemap.js +145 -0
  183. package/dist/cjs/widgets/Treemap/Treemap.js.map +1 -0
  184. package/dist/cjs/widgets/Treemap/index.js +6 -0
  185. package/dist/cjs/widgets/Treemap/index.js.map +1 -0
  186. package/dist/cjs/widgets/Treemap/types.js +3 -0
  187. package/dist/cjs/widgets/Treemap/types.js.map +1 -0
  188. package/dist/cjs/widgets/WaterfallChart/WaterfallChart.js +175 -0
  189. package/dist/cjs/widgets/WaterfallChart/WaterfallChart.js.map +1 -0
  190. package/dist/cjs/widgets/WaterfallChart/index.js +6 -0
  191. package/dist/cjs/widgets/WaterfallChart/index.js.map +1 -0
  192. package/dist/cjs/widgets/WaterfallChart/types.js +3 -0
  193. package/dist/cjs/widgets/WaterfallChart/types.js.map +1 -0
  194. package/dist/cjs/widgets/index.js +51 -0
  195. package/dist/cjs/widgets/index.js.map +1 -0
  196. package/dist/core/animation/index.d.ts +66 -0
  197. package/dist/core/animation/index.d.ts.map +1 -0
  198. package/dist/core/animation/index.web.d.ts +63 -0
  199. package/dist/core/animation/index.web.d.ts.map +1 -0
  200. package/dist/core/hooks/index.d.ts +34 -0
  201. package/dist/core/hooks/index.d.ts.map +1 -0
  202. package/dist/core/index.d.ts +13 -0
  203. package/dist/core/index.d.ts.map +1 -0
  204. package/dist/core/layout/index.d.ts +39 -0
  205. package/dist/core/layout/index.d.ts.map +1 -0
  206. package/dist/core/math/index.d.ts +37 -0
  207. package/dist/core/math/index.d.ts.map +1 -0
  208. package/dist/core/theme/ThemeProvider.d.ts +19 -0
  209. package/dist/core/theme/ThemeProvider.d.ts.map +1 -0
  210. package/dist/core/theme/index.d.ts +6 -0
  211. package/dist/core/theme/index.d.ts.map +1 -0
  212. package/dist/core/theme/themes.d.ts +13 -0
  213. package/dist/core/theme/themes.d.ts.map +1 -0
  214. package/dist/core/types/index.d.ts +137 -0
  215. package/dist/core/types/index.d.ts.map +1 -0
  216. package/dist/core/utils/responsive.d.ts +92 -0
  217. package/dist/core/utils/responsive.d.ts.map +1 -0
  218. package/dist/core/utils/time.d.ts +20 -0
  219. package/dist/core/utils/time.d.ts.map +1 -0
  220. package/dist/esm/core/animation/index.js +88 -0
  221. package/dist/esm/core/animation/index.js.map +1 -0
  222. package/dist/esm/core/animation/index.web.js +81 -0
  223. package/dist/esm/core/animation/index.web.js.map +1 -0
  224. package/dist/esm/core/hooks/index.js +44 -0
  225. package/dist/esm/core/hooks/index.js.map +1 -0
  226. package/dist/esm/core/index.js +20 -0
  227. package/dist/esm/core/index.js.map +1 -0
  228. package/dist/esm/core/layout/index.js +73 -0
  229. package/dist/esm/core/layout/index.js.map +1 -0
  230. package/dist/esm/core/math/index.js +54 -0
  231. package/dist/esm/core/math/index.js.map +1 -0
  232. package/dist/esm/core/theme/ThemeProvider.js +26 -0
  233. package/dist/esm/core/theme/ThemeProvider.js.map +1 -0
  234. package/dist/esm/core/theme/index.js +6 -0
  235. package/dist/esm/core/theme/index.js.map +1 -0
  236. package/dist/esm/core/theme/themes.js +117 -0
  237. package/dist/esm/core/theme/themes.js.map +1 -0
  238. package/dist/esm/core/types/index.js +10 -0
  239. package/dist/esm/core/types/index.js.map +1 -0
  240. package/dist/esm/core/utils/responsive.js +112 -0
  241. package/dist/esm/core/utils/responsive.js.map +1 -0
  242. package/dist/esm/core/utils/time.js +79 -0
  243. package/dist/esm/core/utils/time.js.map +1 -0
  244. package/dist/esm/index.js +11 -0
  245. package/dist/esm/index.js.map +1 -0
  246. package/dist/esm/renderer-svg/adapters/index.js +62 -0
  247. package/dist/esm/renderer-svg/adapters/index.js.map +1 -0
  248. package/dist/esm/renderer-svg/index.js +9 -0
  249. package/dist/esm/renderer-svg/index.js.map +1 -0
  250. package/dist/esm/renderer-svg/paths/arc.js +74 -0
  251. package/dist/esm/renderer-svg/paths/arc.js.map +1 -0
  252. package/dist/esm/renderer-svg/paths/index.js +7 -0
  253. package/dist/esm/renderer-svg/paths/index.js.map +1 -0
  254. package/dist/esm/renderer-svg/paths/line.js +64 -0
  255. package/dist/esm/renderer-svg/paths/line.js.map +1 -0
  256. package/dist/esm/renderer-svg/paths/rect.js +50 -0
  257. package/dist/esm/renderer-svg/paths/rect.js.map +1 -0
  258. package/dist/esm/renderer-svg/primitives/AnimatedCircle.js +15 -0
  259. package/dist/esm/renderer-svg/primitives/AnimatedCircle.js.map +1 -0
  260. package/dist/esm/renderer-svg/primitives/AnimatedPath.js +15 -0
  261. package/dist/esm/renderer-svg/primitives/AnimatedPath.js.map +1 -0
  262. package/dist/esm/renderer-svg/primitives/Text.js +29 -0
  263. package/dist/esm/renderer-svg/primitives/Text.js.map +1 -0
  264. package/dist/esm/renderer-svg/primitives/index.js +7 -0
  265. package/dist/esm/renderer-svg/primitives/index.js.map +1 -0
  266. package/dist/esm/widgets/AreaChart/AreaChart.js +143 -0
  267. package/dist/esm/widgets/AreaChart/AreaChart.js.map +1 -0
  268. package/dist/esm/widgets/AreaChart/index.js +2 -0
  269. package/dist/esm/widgets/AreaChart/index.js.map +1 -0
  270. package/dist/esm/widgets/AreaChart/types.js +2 -0
  271. package/dist/esm/widgets/AreaChart/types.js.map +1 -0
  272. package/dist/esm/widgets/BarChart/BarChart.js +167 -0
  273. package/dist/esm/widgets/BarChart/BarChart.js.map +1 -0
  274. package/dist/esm/widgets/BarChart/index.js +5 -0
  275. package/dist/esm/widgets/BarChart/index.js.map +1 -0
  276. package/dist/esm/widgets/BarChart/types.js +2 -0
  277. package/dist/esm/widgets/BarChart/types.js.map +1 -0
  278. package/dist/esm/widgets/BoxPlot/BoxPlot.js +150 -0
  279. package/dist/esm/widgets/BoxPlot/BoxPlot.js.map +1 -0
  280. package/dist/esm/widgets/BoxPlot/index.js +2 -0
  281. package/dist/esm/widgets/BoxPlot/index.js.map +1 -0
  282. package/dist/esm/widgets/BoxPlot/types.js +2 -0
  283. package/dist/esm/widgets/BoxPlot/types.js.map +1 -0
  284. package/dist/esm/widgets/BubbleChart/BubbleChart.js +122 -0
  285. package/dist/esm/widgets/BubbleChart/BubbleChart.js.map +1 -0
  286. package/dist/esm/widgets/BubbleChart/index.js +2 -0
  287. package/dist/esm/widgets/BubbleChart/index.js.map +1 -0
  288. package/dist/esm/widgets/BubbleChart/types.js +2 -0
  289. package/dist/esm/widgets/BubbleChart/types.js.map +1 -0
  290. package/dist/esm/widgets/CandlestickChart/CandlestickChart.js +132 -0
  291. package/dist/esm/widgets/CandlestickChart/CandlestickChart.js.map +1 -0
  292. package/dist/esm/widgets/CandlestickChart/index.js +2 -0
  293. package/dist/esm/widgets/CandlestickChart/index.js.map +1 -0
  294. package/dist/esm/widgets/CandlestickChart/types.js +2 -0
  295. package/dist/esm/widgets/CandlestickChart/types.js.map +1 -0
  296. package/dist/esm/widgets/FunnelChart/FunnelChart.js +113 -0
  297. package/dist/esm/widgets/FunnelChart/FunnelChart.js.map +1 -0
  298. package/dist/esm/widgets/FunnelChart/index.js +2 -0
  299. package/dist/esm/widgets/FunnelChart/index.js.map +1 -0
  300. package/dist/esm/widgets/FunnelChart/types.js +2 -0
  301. package/dist/esm/widgets/FunnelChart/types.js.map +1 -0
  302. package/dist/esm/widgets/Gauge/Gauge.js +132 -0
  303. package/dist/esm/widgets/Gauge/Gauge.js.map +1 -0
  304. package/dist/esm/widgets/Gauge/index.js +5 -0
  305. package/dist/esm/widgets/Gauge/index.js.map +1 -0
  306. package/dist/esm/widgets/Gauge/types.js +2 -0
  307. package/dist/esm/widgets/Gauge/types.js.map +1 -0
  308. package/dist/esm/widgets/GroupedBarChart/GroupedBarChart.js +119 -0
  309. package/dist/esm/widgets/GroupedBarChart/GroupedBarChart.js.map +1 -0
  310. package/dist/esm/widgets/GroupedBarChart/index.js +2 -0
  311. package/dist/esm/widgets/GroupedBarChart/index.js.map +1 -0
  312. package/dist/esm/widgets/GroupedBarChart/types.js +2 -0
  313. package/dist/esm/widgets/GroupedBarChart/types.js.map +1 -0
  314. package/dist/esm/widgets/Heatmap/Heatmap.js +146 -0
  315. package/dist/esm/widgets/Heatmap/Heatmap.js.map +1 -0
  316. package/dist/esm/widgets/Heatmap/index.js +2 -0
  317. package/dist/esm/widgets/Heatmap/index.js.map +1 -0
  318. package/dist/esm/widgets/Heatmap/types.js +2 -0
  319. package/dist/esm/widgets/Heatmap/types.js.map +1 -0
  320. package/dist/esm/widgets/Histogram/Histogram.js +116 -0
  321. package/dist/esm/widgets/Histogram/Histogram.js.map +1 -0
  322. package/dist/esm/widgets/Histogram/index.js +2 -0
  323. package/dist/esm/widgets/Histogram/index.js.map +1 -0
  324. package/dist/esm/widgets/Histogram/types.js +2 -0
  325. package/dist/esm/widgets/Histogram/types.js.map +1 -0
  326. package/dist/esm/widgets/HorizontalBarChart/HorizontalBarChart.js +88 -0
  327. package/dist/esm/widgets/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  328. package/dist/esm/widgets/HorizontalBarChart/index.js +2 -0
  329. package/dist/esm/widgets/HorizontalBarChart/index.js.map +1 -0
  330. package/dist/esm/widgets/HorizontalBarChart/types.js +2 -0
  331. package/dist/esm/widgets/HorizontalBarChart/types.js.map +1 -0
  332. package/dist/esm/widgets/KPI/KPI.js +159 -0
  333. package/dist/esm/widgets/KPI/KPI.js.map +1 -0
  334. package/dist/esm/widgets/KPI/index.js +5 -0
  335. package/dist/esm/widgets/KPI/index.js.map +1 -0
  336. package/dist/esm/widgets/KPI/types.js +2 -0
  337. package/dist/esm/widgets/KPI/types.js.map +1 -0
  338. package/dist/esm/widgets/LineChart/LineChart.js +262 -0
  339. package/dist/esm/widgets/LineChart/LineChart.js.map +1 -0
  340. package/dist/esm/widgets/LineChart/index.js +5 -0
  341. package/dist/esm/widgets/LineChart/index.js.map +1 -0
  342. package/dist/esm/widgets/LineChart/types.js +2 -0
  343. package/dist/esm/widgets/LineChart/types.js.map +1 -0
  344. package/dist/esm/widgets/MultiLineSparkline/MultiLineSparkline.js +153 -0
  345. package/dist/esm/widgets/MultiLineSparkline/MultiLineSparkline.js.map +1 -0
  346. package/dist/esm/widgets/MultiLineSparkline/index.js +5 -0
  347. package/dist/esm/widgets/MultiLineSparkline/index.js.map +1 -0
  348. package/dist/esm/widgets/MultiLineSparkline/types.js +2 -0
  349. package/dist/esm/widgets/MultiLineSparkline/types.js.map +1 -0
  350. package/dist/esm/widgets/PieChart/PieChart.js +205 -0
  351. package/dist/esm/widgets/PieChart/PieChart.js.map +1 -0
  352. package/dist/esm/widgets/PieChart/index.js +5 -0
  353. package/dist/esm/widgets/PieChart/index.js.map +1 -0
  354. package/dist/esm/widgets/PieChart/types.js +2 -0
  355. package/dist/esm/widgets/PieChart/types.js.map +1 -0
  356. package/dist/esm/widgets/Progress/Progress.js +130 -0
  357. package/dist/esm/widgets/Progress/Progress.js.map +1 -0
  358. package/dist/esm/widgets/Progress/index.js +5 -0
  359. package/dist/esm/widgets/Progress/index.js.map +1 -0
  360. package/dist/esm/widgets/Progress/types.js +2 -0
  361. package/dist/esm/widgets/Progress/types.js.map +1 -0
  362. package/dist/esm/widgets/RadarChart/RadarChart.js +126 -0
  363. package/dist/esm/widgets/RadarChart/RadarChart.js.map +1 -0
  364. package/dist/esm/widgets/RadarChart/index.js +2 -0
  365. package/dist/esm/widgets/RadarChart/index.js.map +1 -0
  366. package/dist/esm/widgets/RadarChart/types.js +2 -0
  367. package/dist/esm/widgets/RadarChart/types.js.map +1 -0
  368. package/dist/esm/widgets/SankeyDiagram/SankeyDiagram.js +175 -0
  369. package/dist/esm/widgets/SankeyDiagram/SankeyDiagram.js.map +1 -0
  370. package/dist/esm/widgets/SankeyDiagram/index.js +2 -0
  371. package/dist/esm/widgets/SankeyDiagram/index.js.map +1 -0
  372. package/dist/esm/widgets/SankeyDiagram/types.js +2 -0
  373. package/dist/esm/widgets/SankeyDiagram/types.js.map +1 -0
  374. package/dist/esm/widgets/ScatterPlot/ScatterPlot.js +116 -0
  375. package/dist/esm/widgets/ScatterPlot/ScatterPlot.js.map +1 -0
  376. package/dist/esm/widgets/ScatterPlot/index.js +2 -0
  377. package/dist/esm/widgets/ScatterPlot/index.js.map +1 -0
  378. package/dist/esm/widgets/ScatterPlot/types.js +2 -0
  379. package/dist/esm/widgets/ScatterPlot/types.js.map +1 -0
  380. package/dist/esm/widgets/Sparkline/Sparkline.js +118 -0
  381. package/dist/esm/widgets/Sparkline/Sparkline.js.map +1 -0
  382. package/dist/esm/widgets/Sparkline/index.js +5 -0
  383. package/dist/esm/widgets/Sparkline/index.js.map +1 -0
  384. package/dist/esm/widgets/Sparkline/types.js +2 -0
  385. package/dist/esm/widgets/Sparkline/types.js.map +1 -0
  386. package/dist/esm/widgets/StackedBarChart/StackedBarChart.js +116 -0
  387. package/dist/esm/widgets/StackedBarChart/StackedBarChart.js.map +1 -0
  388. package/dist/esm/widgets/StackedBarChart/index.js +2 -0
  389. package/dist/esm/widgets/StackedBarChart/index.js.map +1 -0
  390. package/dist/esm/widgets/StackedBarChart/types.js +2 -0
  391. package/dist/esm/widgets/StackedBarChart/types.js.map +1 -0
  392. package/dist/esm/widgets/SunburstChart/SunburstChart.js +98 -0
  393. package/dist/esm/widgets/SunburstChart/SunburstChart.js.map +1 -0
  394. package/dist/esm/widgets/SunburstChart/index.js +2 -0
  395. package/dist/esm/widgets/SunburstChart/index.js.map +1 -0
  396. package/dist/esm/widgets/SunburstChart/types.js +2 -0
  397. package/dist/esm/widgets/SunburstChart/types.js.map +1 -0
  398. package/dist/esm/widgets/Treemap/Treemap.js +109 -0
  399. package/dist/esm/widgets/Treemap/Treemap.js.map +1 -0
  400. package/dist/esm/widgets/Treemap/index.js +2 -0
  401. package/dist/esm/widgets/Treemap/index.js.map +1 -0
  402. package/dist/esm/widgets/Treemap/types.js +2 -0
  403. package/dist/esm/widgets/Treemap/types.js.map +1 -0
  404. package/dist/esm/widgets/WaterfallChart/WaterfallChart.js +139 -0
  405. package/dist/esm/widgets/WaterfallChart/WaterfallChart.js.map +1 -0
  406. package/dist/esm/widgets/WaterfallChart/index.js +2 -0
  407. package/dist/esm/widgets/WaterfallChart/index.js.map +1 -0
  408. package/dist/esm/widgets/WaterfallChart/types.js +2 -0
  409. package/dist/esm/widgets/WaterfallChart/types.js.map +1 -0
  410. package/dist/esm/widgets/index.js +35 -0
  411. package/dist/esm/widgets/index.js.map +1 -0
  412. package/dist/index.d.ts +8 -0
  413. package/dist/index.d.ts.map +1 -0
  414. package/dist/renderer-svg/adapters/index.d.ts +21 -0
  415. package/dist/renderer-svg/adapters/index.d.ts.map +1 -0
  416. package/dist/renderer-svg/index.d.ts +9 -0
  417. package/dist/renderer-svg/index.d.ts.map +1 -0
  418. package/dist/renderer-svg/paths/arc.d.ts +24 -0
  419. package/dist/renderer-svg/paths/arc.d.ts.map +1 -0
  420. package/dist/renderer-svg/paths/index.d.ts +7 -0
  421. package/dist/renderer-svg/paths/index.d.ts.map +1 -0
  422. package/dist/renderer-svg/paths/line.d.ts +21 -0
  423. package/dist/renderer-svg/paths/line.d.ts.map +1 -0
  424. package/dist/renderer-svg/paths/rect.d.ts +24 -0
  425. package/dist/renderer-svg/paths/rect.d.ts.map +1 -0
  426. package/dist/renderer-svg/primitives/AnimatedCircle.d.ts +19 -0
  427. package/dist/renderer-svg/primitives/AnimatedCircle.d.ts.map +1 -0
  428. package/dist/renderer-svg/primitives/AnimatedPath.d.ts +19 -0
  429. package/dist/renderer-svg/primitives/AnimatedPath.d.ts.map +1 -0
  430. package/dist/renderer-svg/primitives/Text.d.ts +25 -0
  431. package/dist/renderer-svg/primitives/Text.d.ts.map +1 -0
  432. package/dist/renderer-svg/primitives/index.d.ts +7 -0
  433. package/dist/renderer-svg/primitives/index.d.ts.map +1 -0
  434. package/dist/widgets/AreaChart/AreaChart.d.ts +7 -0
  435. package/dist/widgets/AreaChart/AreaChart.d.ts.map +1 -0
  436. package/dist/widgets/AreaChart/index.d.ts +3 -0
  437. package/dist/widgets/AreaChart/index.d.ts.map +1 -0
  438. package/dist/widgets/AreaChart/types.d.ts +30 -0
  439. package/dist/widgets/AreaChart/types.d.ts.map +1 -0
  440. package/dist/widgets/BarChart/BarChart.d.ts +10 -0
  441. package/dist/widgets/BarChart/BarChart.d.ts.map +1 -0
  442. package/dist/widgets/BarChart/index.d.ts +6 -0
  443. package/dist/widgets/BarChart/index.d.ts.map +1 -0
  444. package/dist/widgets/BarChart/types.d.ts +24 -0
  445. package/dist/widgets/BarChart/types.d.ts.map +1 -0
  446. package/dist/widgets/BoxPlot/BoxPlot.d.ts +7 -0
  447. package/dist/widgets/BoxPlot/BoxPlot.d.ts.map +1 -0
  448. package/dist/widgets/BoxPlot/index.d.ts +3 -0
  449. package/dist/widgets/BoxPlot/index.d.ts.map +1 -0
  450. package/dist/widgets/BoxPlot/types.d.ts +25 -0
  451. package/dist/widgets/BoxPlot/types.d.ts.map +1 -0
  452. package/dist/widgets/BubbleChart/BubbleChart.d.ts +7 -0
  453. package/dist/widgets/BubbleChart/BubbleChart.d.ts.map +1 -0
  454. package/dist/widgets/BubbleChart/index.d.ts +3 -0
  455. package/dist/widgets/BubbleChart/index.d.ts.map +1 -0
  456. package/dist/widgets/BubbleChart/types.d.ts +30 -0
  457. package/dist/widgets/BubbleChart/types.d.ts.map +1 -0
  458. package/dist/widgets/CandlestickChart/CandlestickChart.d.ts +7 -0
  459. package/dist/widgets/CandlestickChart/CandlestickChart.d.ts.map +1 -0
  460. package/dist/widgets/CandlestickChart/index.d.ts +3 -0
  461. package/dist/widgets/CandlestickChart/index.d.ts.map +1 -0
  462. package/dist/widgets/CandlestickChart/types.d.ts +27 -0
  463. package/dist/widgets/CandlestickChart/types.d.ts.map +1 -0
  464. package/dist/widgets/FunnelChart/FunnelChart.d.ts +7 -0
  465. package/dist/widgets/FunnelChart/FunnelChart.d.ts.map +1 -0
  466. package/dist/widgets/FunnelChart/index.d.ts +3 -0
  467. package/dist/widgets/FunnelChart/index.d.ts.map +1 -0
  468. package/dist/widgets/FunnelChart/types.d.ts +20 -0
  469. package/dist/widgets/FunnelChart/types.d.ts.map +1 -0
  470. package/dist/widgets/Gauge/Gauge.d.ts +11 -0
  471. package/dist/widgets/Gauge/Gauge.d.ts.map +1 -0
  472. package/dist/widgets/Gauge/index.d.ts +6 -0
  473. package/dist/widgets/Gauge/index.d.ts.map +1 -0
  474. package/dist/widgets/Gauge/types.d.ts +18 -0
  475. package/dist/widgets/Gauge/types.d.ts.map +1 -0
  476. package/dist/widgets/GroupedBarChart/GroupedBarChart.d.ts +7 -0
  477. package/dist/widgets/GroupedBarChart/GroupedBarChart.d.ts.map +1 -0
  478. package/dist/widgets/GroupedBarChart/index.d.ts +3 -0
  479. package/dist/widgets/GroupedBarChart/index.d.ts.map +1 -0
  480. package/dist/widgets/GroupedBarChart/types.d.ts +27 -0
  481. package/dist/widgets/GroupedBarChart/types.d.ts.map +1 -0
  482. package/dist/widgets/Heatmap/Heatmap.d.ts +7 -0
  483. package/dist/widgets/Heatmap/Heatmap.d.ts.map +1 -0
  484. package/dist/widgets/Heatmap/index.d.ts +3 -0
  485. package/dist/widgets/Heatmap/index.d.ts.map +1 -0
  486. package/dist/widgets/Heatmap/types.d.ts +25 -0
  487. package/dist/widgets/Heatmap/types.d.ts.map +1 -0
  488. package/dist/widgets/Histogram/Histogram.d.ts +7 -0
  489. package/dist/widgets/Histogram/Histogram.d.ts.map +1 -0
  490. package/dist/widgets/Histogram/index.d.ts +3 -0
  491. package/dist/widgets/Histogram/index.d.ts.map +1 -0
  492. package/dist/widgets/Histogram/types.d.ts +17 -0
  493. package/dist/widgets/Histogram/types.d.ts.map +1 -0
  494. package/dist/widgets/HorizontalBarChart/HorizontalBarChart.d.ts +7 -0
  495. package/dist/widgets/HorizontalBarChart/HorizontalBarChart.d.ts.map +1 -0
  496. package/dist/widgets/HorizontalBarChart/index.d.ts +3 -0
  497. package/dist/widgets/HorizontalBarChart/index.d.ts.map +1 -0
  498. package/dist/widgets/HorizontalBarChart/types.d.ts +21 -0
  499. package/dist/widgets/HorizontalBarChart/types.d.ts.map +1 -0
  500. package/dist/widgets/KPI/KPI.d.ts +11 -0
  501. package/dist/widgets/KPI/KPI.d.ts.map +1 -0
  502. package/dist/widgets/KPI/index.d.ts +6 -0
  503. package/dist/widgets/KPI/index.d.ts.map +1 -0
  504. package/dist/widgets/KPI/types.d.ts +17 -0
  505. package/dist/widgets/KPI/types.d.ts.map +1 -0
  506. package/dist/widgets/LineChart/LineChart.d.ts +10 -0
  507. package/dist/widgets/LineChart/LineChart.d.ts.map +1 -0
  508. package/dist/widgets/LineChart/index.d.ts +6 -0
  509. package/dist/widgets/LineChart/index.d.ts.map +1 -0
  510. package/dist/widgets/LineChart/types.d.ts +31 -0
  511. package/dist/widgets/LineChart/types.d.ts.map +1 -0
  512. package/dist/widgets/MultiLineSparkline/MultiLineSparkline.d.ts +10 -0
  513. package/dist/widgets/MultiLineSparkline/MultiLineSparkline.d.ts.map +1 -0
  514. package/dist/widgets/MultiLineSparkline/index.d.ts +6 -0
  515. package/dist/widgets/MultiLineSparkline/index.d.ts.map +1 -0
  516. package/dist/widgets/MultiLineSparkline/types.d.ts +22 -0
  517. package/dist/widgets/MultiLineSparkline/types.d.ts.map +1 -0
  518. package/dist/widgets/PieChart/PieChart.d.ts +10 -0
  519. package/dist/widgets/PieChart/PieChart.d.ts.map +1 -0
  520. package/dist/widgets/PieChart/index.d.ts +6 -0
  521. package/dist/widgets/PieChart/index.d.ts.map +1 -0
  522. package/dist/widgets/PieChart/types.d.ts +23 -0
  523. package/dist/widgets/PieChart/types.d.ts.map +1 -0
  524. package/dist/widgets/Progress/Progress.d.ts +11 -0
  525. package/dist/widgets/Progress/Progress.d.ts.map +1 -0
  526. package/dist/widgets/Progress/index.d.ts +6 -0
  527. package/dist/widgets/Progress/index.d.ts.map +1 -0
  528. package/dist/widgets/Progress/types.d.ts +17 -0
  529. package/dist/widgets/Progress/types.d.ts.map +1 -0
  530. package/dist/widgets/RadarChart/RadarChart.d.ts +7 -0
  531. package/dist/widgets/RadarChart/RadarChart.d.ts.map +1 -0
  532. package/dist/widgets/RadarChart/index.d.ts +3 -0
  533. package/dist/widgets/RadarChart/index.d.ts.map +1 -0
  534. package/dist/widgets/RadarChart/types.d.ts +26 -0
  535. package/dist/widgets/RadarChart/types.d.ts.map +1 -0
  536. package/dist/widgets/SankeyDiagram/SankeyDiagram.d.ts +7 -0
  537. package/dist/widgets/SankeyDiagram/SankeyDiagram.d.ts.map +1 -0
  538. package/dist/widgets/SankeyDiagram/index.d.ts +3 -0
  539. package/dist/widgets/SankeyDiagram/index.d.ts.map +1 -0
  540. package/dist/widgets/SankeyDiagram/types.d.ts +26 -0
  541. package/dist/widgets/SankeyDiagram/types.d.ts.map +1 -0
  542. package/dist/widgets/ScatterPlot/ScatterPlot.d.ts +7 -0
  543. package/dist/widgets/ScatterPlot/ScatterPlot.d.ts.map +1 -0
  544. package/dist/widgets/ScatterPlot/index.d.ts +3 -0
  545. package/dist/widgets/ScatterPlot/index.d.ts.map +1 -0
  546. package/dist/widgets/ScatterPlot/types.d.ts +29 -0
  547. package/dist/widgets/ScatterPlot/types.d.ts.map +1 -0
  548. package/dist/widgets/Sparkline/Sparkline.d.ts +11 -0
  549. package/dist/widgets/Sparkline/Sparkline.d.ts.map +1 -0
  550. package/dist/widgets/Sparkline/index.d.ts +6 -0
  551. package/dist/widgets/Sparkline/index.d.ts.map +1 -0
  552. package/dist/widgets/Sparkline/types.d.ts +16 -0
  553. package/dist/widgets/Sparkline/types.d.ts.map +1 -0
  554. package/dist/widgets/StackedBarChart/StackedBarChart.d.ts +7 -0
  555. package/dist/widgets/StackedBarChart/StackedBarChart.d.ts.map +1 -0
  556. package/dist/widgets/StackedBarChart/index.d.ts +3 -0
  557. package/dist/widgets/StackedBarChart/index.d.ts.map +1 -0
  558. package/dist/widgets/StackedBarChart/types.d.ts +26 -0
  559. package/dist/widgets/StackedBarChart/types.d.ts.map +1 -0
  560. package/dist/widgets/SunburstChart/SunburstChart.d.ts +7 -0
  561. package/dist/widgets/SunburstChart/SunburstChart.d.ts.map +1 -0
  562. package/dist/widgets/SunburstChart/index.d.ts +3 -0
  563. package/dist/widgets/SunburstChart/index.d.ts.map +1 -0
  564. package/dist/widgets/SunburstChart/types.d.ts +20 -0
  565. package/dist/widgets/SunburstChart/types.d.ts.map +1 -0
  566. package/dist/widgets/Treemap/Treemap.d.ts +7 -0
  567. package/dist/widgets/Treemap/Treemap.d.ts.map +1 -0
  568. package/dist/widgets/Treemap/index.d.ts +3 -0
  569. package/dist/widgets/Treemap/index.d.ts.map +1 -0
  570. package/dist/widgets/Treemap/types.d.ts +21 -0
  571. package/dist/widgets/Treemap/types.d.ts.map +1 -0
  572. package/dist/widgets/WaterfallChart/WaterfallChart.d.ts +7 -0
  573. package/dist/widgets/WaterfallChart/WaterfallChart.d.ts.map +1 -0
  574. package/dist/widgets/WaterfallChart/index.d.ts +3 -0
  575. package/dist/widgets/WaterfallChart/index.d.ts.map +1 -0
  576. package/dist/widgets/WaterfallChart/types.d.ts +24 -0
  577. package/dist/widgets/WaterfallChart/types.d.ts.map +1 -0
  578. package/dist/widgets/index.d.ts +29 -0
  579. package/dist/widgets/index.d.ts.map +1 -0
  580. package/package.json +84 -0
  581. package/src/core/animation/index.ts +113 -0
  582. package/src/core/animation/index.web.ts +112 -0
  583. package/src/core/hooks/index.ts +66 -0
  584. package/src/core/index.ts +26 -0
  585. package/src/core/layout/index.ts +101 -0
  586. package/src/core/math/index.ts +72 -0
  587. package/src/core/package.json +13 -0
  588. package/src/core/theme/ThemeProvider.tsx +36 -0
  589. package/src/core/theme/index.ts +5 -0
  590. package/src/core/theme/themes.ts +132 -0
  591. package/src/core/types/index.ts +164 -0
  592. package/src/core/utils/responsive.ts +203 -0
  593. package/src/core/utils/time.ts +100 -0
  594. package/src/index.ts +13 -0
  595. package/src/renderer-svg/adapters/index.ts +84 -0
  596. package/src/renderer-svg/index.ts +8 -0
  597. package/src/renderer-svg/package.json +17 -0
  598. package/src/renderer-svg/paths/arc.ts +93 -0
  599. package/src/renderer-svg/paths/index.ts +6 -0
  600. package/src/renderer-svg/paths/line.ts +83 -0
  601. package/src/renderer-svg/paths/rect.ts +80 -0
  602. package/src/renderer-svg/primitives/AnimatedCircle.tsx +48 -0
  603. package/src/renderer-svg/primitives/AnimatedPath.tsx +48 -0
  604. package/src/renderer-svg/primitives/Text.tsx +73 -0
  605. package/src/renderer-svg/primitives/index.ts +6 -0
  606. package/src/widgets/AreaChart/AreaChart.tsx +213 -0
  607. package/src/widgets/AreaChart/index.ts +2 -0
  608. package/src/widgets/AreaChart/types.ts +34 -0
  609. package/src/widgets/BarChart/BarChart.tsx +249 -0
  610. package/src/widgets/BarChart/index.ts +10 -0
  611. package/src/widgets/BarChart/types.ts +27 -0
  612. package/src/widgets/BoxPlot/BoxPlot.tsx +252 -0
  613. package/src/widgets/BoxPlot/index.ts +2 -0
  614. package/src/widgets/BoxPlot/types.ts +27 -0
  615. package/src/widgets/BubbleChart/BubbleChart.tsx +175 -0
  616. package/src/widgets/BubbleChart/index.ts +2 -0
  617. package/src/widgets/BubbleChart/types.ts +33 -0
  618. package/src/widgets/CandlestickChart/CandlestickChart.tsx +204 -0
  619. package/src/widgets/CandlestickChart/index.ts +2 -0
  620. package/src/widgets/CandlestickChart/types.ts +29 -0
  621. package/src/widgets/FunnelChart/FunnelChart.tsx +172 -0
  622. package/src/widgets/FunnelChart/index.ts +2 -0
  623. package/src/widgets/FunnelChart/types.ts +22 -0
  624. package/src/widgets/Gauge/Gauge.tsx +235 -0
  625. package/src/widgets/Gauge/index.ts +5 -0
  626. package/src/widgets/Gauge/types.ts +19 -0
  627. package/src/widgets/GroupedBarChart/GroupedBarChart.tsx +190 -0
  628. package/src/widgets/GroupedBarChart/index.ts +2 -0
  629. package/src/widgets/GroupedBarChart/types.ts +30 -0
  630. package/src/widgets/Heatmap/Heatmap.tsx +216 -0
  631. package/src/widgets/Heatmap/index.ts +2 -0
  632. package/src/widgets/Heatmap/types.ts +27 -0
  633. package/src/widgets/Histogram/Histogram.tsx +173 -0
  634. package/src/widgets/Histogram/index.ts +2 -0
  635. package/src/widgets/Histogram/types.ts +18 -0
  636. package/src/widgets/HorizontalBarChart/HorizontalBarChart.tsx +125 -0
  637. package/src/widgets/HorizontalBarChart/index.ts +2 -0
  638. package/src/widgets/HorizontalBarChart/types.ts +23 -0
  639. package/src/widgets/KPI/KPI.tsx +222 -0
  640. package/src/widgets/KPI/index.ts +5 -0
  641. package/src/widgets/KPI/types.ts +19 -0
  642. package/src/widgets/LineChart/LineChart.tsx +364 -0
  643. package/src/widgets/LineChart/index.ts +10 -0
  644. package/src/widgets/LineChart/types.ts +34 -0
  645. package/src/widgets/MultiLineSparkline/MultiLineSparkline.tsx +234 -0
  646. package/src/widgets/MultiLineSparkline/index.ts +10 -0
  647. package/src/widgets/MultiLineSparkline/types.ts +25 -0
  648. package/src/widgets/PieChart/PieChart.tsx +275 -0
  649. package/src/widgets/PieChart/index.ts +10 -0
  650. package/src/widgets/PieChart/types.ts +26 -0
  651. package/src/widgets/Progress/Progress.tsx +201 -0
  652. package/src/widgets/Progress/index.ts +5 -0
  653. package/src/widgets/Progress/types.ts +19 -0
  654. package/src/widgets/RadarChart/RadarChart.tsx +213 -0
  655. package/src/widgets/RadarChart/index.ts +2 -0
  656. package/src/widgets/RadarChart/types.ts +29 -0
  657. package/src/widgets/SankeyDiagram/SankeyDiagram.tsx +272 -0
  658. package/src/widgets/SankeyDiagram/index.ts +2 -0
  659. package/src/widgets/SankeyDiagram/types.ts +29 -0
  660. package/src/widgets/ScatterPlot/ScatterPlot.tsx +167 -0
  661. package/src/widgets/ScatterPlot/index.ts +2 -0
  662. package/src/widgets/ScatterPlot/types.ts +32 -0
  663. package/src/widgets/Sparkline/Sparkline.tsx +203 -0
  664. package/src/widgets/Sparkline/index.ts +5 -0
  665. package/src/widgets/Sparkline/types.ts +18 -0
  666. package/src/widgets/StackedBarChart/StackedBarChart.tsx +181 -0
  667. package/src/widgets/StackedBarChart/index.ts +2 -0
  668. package/src/widgets/StackedBarChart/types.ts +29 -0
  669. package/src/widgets/SunburstChart/SunburstChart.tsx +176 -0
  670. package/src/widgets/SunburstChart/index.ts +2 -0
  671. package/src/widgets/SunburstChart/types.ts +22 -0
  672. package/src/widgets/Treemap/Treemap.tsx +191 -0
  673. package/src/widgets/Treemap/index.ts +2 -0
  674. package/src/widgets/Treemap/types.ts +23 -0
  675. package/src/widgets/WaterfallChart/WaterfallChart.tsx +226 -0
  676. package/src/widgets/WaterfallChart/index.ts +2 -0
  677. package/src/widgets/WaterfallChart/types.ts +26 -0
  678. package/src/widgets/index.ts +40 -0
  679. package/src/widgets/package.json +18 -0
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Animated SVG Circle primitive
3
+ */
4
+ import React, { memo } from 'react';
5
+ import Animated from 'react-native-reanimated';
6
+ import { Circle } from 'react-native-svg';
7
+
8
+ const AnimatedSVGCircle = Animated.createAnimatedComponent(Circle);
9
+
10
+ export interface AnimatedCircleProps {
11
+ cx: number;
12
+ cy: number;
13
+ r: number;
14
+ fill?: string;
15
+ stroke?: string;
16
+ strokeWidth?: number;
17
+ opacity?: number;
18
+ testID?: string;
19
+ }
20
+
21
+ /**
22
+ * Memoized animated circle component
23
+ */
24
+ export const AnimatedCircle = memo<AnimatedCircleProps>(({
25
+ cx,
26
+ cy,
27
+ r,
28
+ fill = 'transparent',
29
+ stroke = 'transparent',
30
+ strokeWidth = 1,
31
+ opacity = 1,
32
+ testID,
33
+ }) => {
34
+ return (
35
+ <AnimatedSVGCircle
36
+ cx={cx}
37
+ cy={cy}
38
+ r={r}
39
+ fill={fill}
40
+ stroke={stroke}
41
+ strokeWidth={strokeWidth}
42
+ opacity={opacity}
43
+ testID={testID}
44
+ />
45
+ );
46
+ });
47
+
48
+ AnimatedCircle.displayName = 'AnimatedCircle';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Animated SVG Path primitive
3
+ */
4
+ import React, { memo } from 'react';
5
+ import Animated from 'react-native-reanimated';
6
+ import { Path } from 'react-native-svg';
7
+
8
+ const AnimatedSVGPath = Animated.createAnimatedComponent(Path);
9
+
10
+ export interface AnimatedPathProps {
11
+ d: string;
12
+ stroke?: string;
13
+ strokeWidth?: number;
14
+ fill?: string;
15
+ opacity?: number;
16
+ strokeLinecap?: 'butt' | 'round' | 'square';
17
+ strokeLinejoin?: 'miter' | 'round' | 'bevel';
18
+ testID?: string;
19
+ }
20
+
21
+ /**
22
+ * Memoized animated path component
23
+ */
24
+ export const AnimatedPath = memo<AnimatedPathProps>(({
25
+ d,
26
+ stroke = 'transparent',
27
+ strokeWidth = 1,
28
+ fill = 'transparent',
29
+ opacity = 1,
30
+ strokeLinecap = 'round',
31
+ strokeLinejoin = 'round',
32
+ testID,
33
+ }) => {
34
+ return (
35
+ <AnimatedSVGPath
36
+ d={d}
37
+ stroke={stroke}
38
+ strokeWidth={strokeWidth}
39
+ fill={fill}
40
+ opacity={opacity}
41
+ strokeLinecap={strokeLinecap}
42
+ strokeLinejoin={strokeLinejoin}
43
+ testID={testID}
44
+ />
45
+ );
46
+ });
47
+
48
+ AnimatedPath.displayName = 'AnimatedPath';
@@ -0,0 +1,73 @@
1
+ /**
2
+ * SVG Text primitive with centered text helper
3
+ */
4
+ import React, { memo } from 'react';
5
+ import { Text as SVGText } from 'react-native-svg';
6
+
7
+ export interface TextProps {
8
+ x: number;
9
+ y: number;
10
+ text: string;
11
+ fontSize?: number;
12
+ fontWeight?: string | number;
13
+ fill?: string;
14
+ textAnchor?: 'start' | 'middle' | 'end';
15
+ alignmentBaseline?: 'baseline' | 'text-bottom' | 'alphabetic' | 'ideographic' | 'middle' | 'central' | 'mathematical' | 'text-top' | 'bottom' | 'center' | 'top' | 'text-before-edge' | 'text-after-edge' | 'before-edge' | 'after-edge' | 'hanging';
16
+ opacity?: number;
17
+ testID?: string;
18
+ }
19
+
20
+ /**
21
+ * SVG Text component with sensible defaults
22
+ */
23
+ export const Text = memo<TextProps>(({
24
+ x,
25
+ y,
26
+ text,
27
+ fontSize = 14,
28
+ fontWeight = 'normal',
29
+ fill = '#000000',
30
+ textAnchor = 'middle',
31
+ alignmentBaseline = 'middle',
32
+ opacity = 1,
33
+ testID,
34
+ }) => {
35
+ return (
36
+ <SVGText
37
+ x={x}
38
+ y={y}
39
+ fontSize={fontSize}
40
+ fontWeight={fontWeight}
41
+ fill={fill}
42
+ textAnchor={textAnchor}
43
+ alignmentBaseline={alignmentBaseline}
44
+ opacity={opacity}
45
+ testID={testID}
46
+ >
47
+ {text}
48
+ </SVGText>
49
+ );
50
+ });
51
+
52
+ Text.displayName = 'Text';
53
+
54
+ /**
55
+ * Helper to create centered text props
56
+ */
57
+ export function createCenteredTextProps(
58
+ x: number,
59
+ y: number,
60
+ text: string,
61
+ fontSize?: number,
62
+ fill?: string
63
+ ): TextProps {
64
+ return {
65
+ x,
66
+ y,
67
+ text,
68
+ fontSize,
69
+ fill,
70
+ textAnchor: 'middle',
71
+ alignmentBaseline: 'middle',
72
+ };
73
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * SVG primitives - Basic building blocks
3
+ */
4
+ export * from './Text';
5
+ export * from './AnimatedPath';
6
+ export * from './AnimatedCircle';
@@ -0,0 +1,213 @@
1
+ /**
2
+ * AreaChart Widget - Filled area under line
3
+ */
4
+ import React, { memo, useMemo } from 'react';
5
+ import { View, Text as RNText, StyleSheet } from 'react-native';
6
+ import Svg, { Defs, LinearGradient, Stop, Line as SvgLine } from 'react-native-svg';
7
+ import {
8
+ useWidgetDimensions,
9
+ useWidgetTheme,
10
+ normalize,
11
+ formatTimeLabel,
12
+ reduceLabels,
13
+ } from '../../core';
14
+ import {
15
+ createLinePath,
16
+ createAreaPath,
17
+ AnimatedPath,
18
+ } from '../../renderer-svg';
19
+ import { AreaChartWidgetProps } from './types';
20
+
21
+ export const AreaChart = memo<AreaChartWidgetProps>(({
22
+ data: widgetData,
23
+ width,
24
+ height,
25
+ loading = false,
26
+ theme: themeOverride,
27
+ showXAxis = true,
28
+ showYAxis = true,
29
+ showGrid = true,
30
+ showLegend = true,
31
+ showGradient = true,
32
+ stacked = false,
33
+ curveStyle = 'linear',
34
+ maxXLabels = 6,
35
+ testID,
36
+ }) => {
37
+ const theme = useWidgetTheme(themeOverride);
38
+ const dimensions = useWidgetDimensions(width, height, 350, 250);
39
+
40
+ if (loading) {
41
+ return (
42
+ <View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-loading`}>
43
+ <RNText style={[styles.loadingText, { color: theme.colors.textSecondary }]}>Loading...</RNText>
44
+ </View>
45
+ );
46
+ }
47
+
48
+ if (!widgetData || !widgetData.series || widgetData.series.length === 0) {
49
+ return (
50
+ <View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-empty`}>
51
+ <RNText style={[styles.emptyText, { color: theme.colors.textSecondary }]}>No data</RNText>
52
+ </View>
53
+ );
54
+ }
55
+
56
+ const { series, title, timeInterval } = widgetData;
57
+ const padding = theme.spacing.md;
58
+ const titleHeight = title ? theme.fontScale.md + theme.spacing.sm : 0;
59
+ const legendHeight = showLegend ? 30 : 0;
60
+ const xAxisHeight = showXAxis ? 30 : 0;
61
+ const yAxisWidth = showYAxis ? 40 : 0;
62
+
63
+ const chartWidth = dimensions.width - padding * 2 - yAxisWidth;
64
+ const chartHeight = dimensions.height - padding * 2 - titleHeight - legendHeight - xAxisHeight;
65
+
66
+ const { globalMinY, globalMaxY, xLabels } = useMemo(() => {
67
+ let minY = Infinity;
68
+ let maxY = -Infinity;
69
+ const allXValues: (number | Date)[] = [];
70
+
71
+ series.forEach(s => {
72
+ s.data.forEach(point => {
73
+ if (point.y < minY) minY = point.y;
74
+ if (point.y > maxY) maxY = point.y;
75
+ allXValues.push(point.x);
76
+ });
77
+ });
78
+
79
+ const labels = allXValues.map((x, idx) => {
80
+ if (x instanceof Date) {
81
+ return timeInterval ? formatTimeLabel(x, timeInterval) : x.toLocaleDateString();
82
+ }
83
+ return x.toString();
84
+ });
85
+
86
+ return { globalMinY: minY, globalMaxY: maxY, xLabels: labels };
87
+ }, [series, timeInterval]);
88
+
89
+ const yAxisLabels = useMemo(() => {
90
+ const range = globalMaxY - globalMinY;
91
+ const step = range / 4;
92
+ return Array.from({ length: 5 }, (_, i) => ({
93
+ value: globalMinY + i * step,
94
+ y: chartHeight - (i * chartHeight) / 4,
95
+ }));
96
+ }, [globalMinY, globalMaxY, chartHeight]);
97
+
98
+ const xAxisLabelsReduced = useMemo(() => {
99
+ return reduceLabels(xLabels, maxXLabels);
100
+ }, [xLabels, maxXLabels]);
101
+
102
+ const seriesPaths = useMemo(() => {
103
+ return series.map((s, seriesIndex) => {
104
+ const points = s.data.map((point, index) => {
105
+ const x = (index / (s.data.length - 1 || 1)) * chartWidth;
106
+ const normalizedY = normalize(point.y, globalMinY, globalMaxY);
107
+ const y = chartHeight - normalizedY * chartHeight;
108
+ return { x, y };
109
+ });
110
+
111
+ const linePath = createLinePath(points);
112
+ const areaPath = createAreaPath(points, chartHeight);
113
+
114
+ return {
115
+ linePath,
116
+ areaPath,
117
+ color: s.color,
118
+ label: s.label,
119
+ gradientId: `gradient-${seriesIndex}`,
120
+ };
121
+ });
122
+ }, [series, chartWidth, chartHeight, globalMinY, globalMaxY]);
123
+
124
+ return (
125
+ <View style={[styles.wrapper, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md, padding }]} testID={testID}>
126
+ {title && (
127
+ <RNText style={[styles.title, { color: theme.colors.text, fontSize: theme.fontScale.md, fontWeight: 'bold', marginBottom: theme.spacing.sm }]}>
128
+ {title}
129
+ </RNText>
130
+ )}
131
+
132
+ <View style={styles.chartRow}>
133
+ {showYAxis && (
134
+ <View style={[styles.yAxis, { width: yAxisWidth }]}>
135
+ {yAxisLabels.map((label, index) => (
136
+ <RNText key={`y-${index}`} style={[styles.yAxisLabel, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs, top: label.y - 6 }]}>
137
+ {label.value.toFixed(0)}
138
+ </RNText>
139
+ ))}
140
+ </View>
141
+ )}
142
+
143
+ <View>
144
+ <Svg width={chartWidth} height={chartHeight}>
145
+ {showGradient && (
146
+ <Defs>
147
+ {seriesPaths.map((series, index) => (
148
+ <LinearGradient key={series.gradientId} id={series.gradientId} x1="0" y1="0" x2="0" y2="1">
149
+ <Stop offset="0%" stopColor={series.color} stopOpacity="0.4" />
150
+ <Stop offset="100%" stopColor={series.color} stopOpacity="0.05" />
151
+ </LinearGradient>
152
+ ))}
153
+ </Defs>
154
+ )}
155
+
156
+ {showGrid && yAxisLabels.map((label, index) => (
157
+ <SvgLine key={`grid-${index}`} x1={0} y1={label.y} x2={chartWidth} y2={label.y} stroke={theme.colors.borderLight} strokeWidth={1} />
158
+ ))}
159
+
160
+ {seriesPaths.map((series, index) => (
161
+ <React.Fragment key={`series-${index}`}>
162
+ <AnimatedPath d={series.areaPath} fill={showGradient ? `url(#${series.gradientId})` : series.color} opacity={showGradient ? 1 : 0.3} />
163
+ <AnimatedPath d={series.linePath} stroke={series.color} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round" fill="transparent" />
164
+ </React.Fragment>
165
+ ))}
166
+ </Svg>
167
+
168
+ {showXAxis && (
169
+ <View style={[styles.xAxis, { width: chartWidth }]}>
170
+ {xAxisLabelsReduced.map((item, index) => (
171
+ <RNText key={`x-${index}`} style={[styles.xAxisLabel, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs, left: (item.index / (xLabels.length - 1 || 1)) * chartWidth - 20 }]}>
172
+ {item.label}
173
+ </RNText>
174
+ ))}
175
+ </View>
176
+ )}
177
+ </View>
178
+ </View>
179
+
180
+ {showLegend && (
181
+ <View style={styles.legend}>
182
+ {seriesPaths.map((series, index) => (
183
+ series.label && (
184
+ <View key={`legend-${index}`} style={styles.legendItem}>
185
+ <View style={[styles.legendColor, { backgroundColor: series.color }]} />
186
+ <RNText style={[styles.legendText, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs }]}>{series.label}</RNText>
187
+ </View>
188
+ )
189
+ ))}
190
+ </View>
191
+ )}
192
+ </View>
193
+ );
194
+ });
195
+
196
+ AreaChart.displayName = 'AreaChart';
197
+
198
+ const styles = StyleSheet.create({
199
+ wrapper: { justifyContent: 'flex-start', alignItems: 'flex-start' },
200
+ container: { justifyContent: 'center', alignItems: 'center' },
201
+ loadingText: { fontSize: 16 },
202
+ emptyText: { fontSize: 16 },
203
+ title: { textAlign: 'center', width: '100%' },
204
+ chartRow: { flexDirection: 'row', alignItems: 'flex-start' },
205
+ yAxis: { position: 'relative', marginRight: 8 },
206
+ yAxisLabel: { position: 'absolute', right: 0, textAlign: 'right' },
207
+ xAxis: { position: 'relative', height: 30, marginTop: 4 },
208
+ xAxisLabel: { position: 'absolute', width: 40, textAlign: 'center' },
209
+ legend: { flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'center', marginTop: 12, gap: 12 },
210
+ legendItem: { flexDirection: 'row', alignItems: 'center', gap: 6 },
211
+ legendColor: { width: 12, height: 12, borderRadius: 2 },
212
+ legendText: { textTransform: 'uppercase', letterSpacing: 0.5 },
213
+ });
@@ -0,0 +1,2 @@
1
+ export { AreaChart } from './AreaChart';
2
+ export type { AreaChartWidgetProps, AreaChartData, AreaChartSeries, AreaChartDataPoint } from './types';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * AreaChart Widget types
3
+ */
4
+ import { BaseWidgetProps, TimeInterval } from '../../core';
5
+
6
+ export interface AreaChartDataPoint {
7
+ x: number | Date;
8
+ y: number;
9
+ }
10
+
11
+ export interface AreaChartSeries {
12
+ data: AreaChartDataPoint[];
13
+ color: string;
14
+ label?: string;
15
+ }
16
+
17
+ export interface AreaChartData {
18
+ series: AreaChartSeries[];
19
+ title?: string;
20
+ timeInterval?: TimeInterval;
21
+ }
22
+
23
+ export type AreaChartStyle = 'smooth' | 'linear';
24
+
25
+ export interface AreaChartWidgetProps extends BaseWidgetProps<AreaChartData> {
26
+ showXAxis?: boolean;
27
+ showYAxis?: boolean;
28
+ showGrid?: boolean;
29
+ showLegend?: boolean;
30
+ showGradient?: boolean;
31
+ stacked?: boolean;
32
+ curveStyle?: AreaChartStyle;
33
+ maxXLabels?: number;
34
+ }
@@ -0,0 +1,249 @@
1
+ /**
2
+ * BarChart Widget - Flexible bar chart for comparing values
3
+ */
4
+ import React, { memo, useMemo } from 'react';
5
+ import { View, Text as RNText, StyleSheet } from 'react-native';
6
+ import Svg, { Rect } from 'react-native-svg';
7
+ import {
8
+ useWidgetDimensions,
9
+ useWidgetTheme,
10
+ normalize,
11
+ } from '../../core';
12
+ import { Text } from '../../renderer-svg/primitives';
13
+ import { BarChartWidgetProps } from './types';
14
+
15
+ /**
16
+ * BarChart Widget Component
17
+ */
18
+ export const BarChart = memo<BarChartWidgetProps>(({
19
+ data: widgetData,
20
+ width,
21
+ height,
22
+ loading = false,
23
+ theme: themeOverride,
24
+ orientation = 'vertical',
25
+ barWidth: customBarWidth,
26
+ barSpacing = 8,
27
+ showValues = true,
28
+ showLabels = true,
29
+ minBarHeight = 4,
30
+ maxBars = 20,
31
+ testID,
32
+ }) => {
33
+ const theme = useWidgetTheme(themeOverride);
34
+ const dimensions = useWidgetDimensions(width, height, 300, 200);
35
+
36
+ // Handle states
37
+ if (loading) {
38
+ return (
39
+ <View
40
+ style={[
41
+ styles.container,
42
+ {
43
+ width: dimensions.width,
44
+ height: dimensions.height,
45
+ backgroundColor: theme.colors.surface,
46
+ borderRadius: theme.radius.md,
47
+ },
48
+ ]}
49
+ testID={`${testID}-loading`}
50
+ >
51
+ <RNText style={[styles.loadingText, { color: theme.colors.textSecondary }]}>
52
+ Loading...
53
+ </RNText>
54
+ </View>
55
+ );
56
+ }
57
+
58
+ if (!widgetData || !widgetData.data || widgetData.data.length === 0) {
59
+ return (
60
+ <View
61
+ style={[
62
+ styles.container,
63
+ {
64
+ width: dimensions.width,
65
+ height: dimensions.height,
66
+ backgroundColor: theme.colors.surface,
67
+ borderRadius: theme.radius.md,
68
+ },
69
+ ]}
70
+ testID={`${testID}-empty`}
71
+ >
72
+ <RNText style={[styles.emptyText, { color: theme.colors.textSecondary }]}>
73
+ No data
74
+ </RNText>
75
+ </View>
76
+ );
77
+ }
78
+
79
+ const { data, title } = widgetData;
80
+
81
+ // Limit number of bars
82
+ const displayData = data.slice(0, maxBars);
83
+
84
+ // Calculate dimensions
85
+ const padding = theme.spacing.md;
86
+ const titleHeight = title ? theme.fontScale.md + theme.spacing.sm : 0;
87
+ const labelHeight = showLabels ? theme.fontScale.sm + theme.spacing.xs : 0;
88
+ const valueHeight = showValues ? theme.fontScale.sm + theme.spacing.xs : 0;
89
+
90
+ const chartHeight = dimensions.height - padding * 2 - titleHeight - labelHeight - valueHeight;
91
+ const chartWidth = dimensions.width - padding * 2;
92
+
93
+ // Find max value for scaling
94
+ const maxValue = useMemo(() => Math.max(...displayData.map(d => d.value)), [displayData]);
95
+
96
+ // Calculate bar width
97
+ const calculatedBarWidth = customBarWidth ||
98
+ (chartWidth - (displayData.length - 1) * barSpacing) / displayData.length;
99
+
100
+ // Generate bars
101
+ const bars = useMemo(() => {
102
+ return displayData.map((item, index) => {
103
+ const normalizedValue = normalize(item.value, 0, maxValue);
104
+ const barHeight = Math.max(normalizedValue * chartHeight, minBarHeight);
105
+ const barX = index * (calculatedBarWidth + barSpacing);
106
+ const barY = chartHeight - barHeight;
107
+
108
+ return {
109
+ x: barX,
110
+ y: barY,
111
+ width: calculatedBarWidth,
112
+ height: barHeight,
113
+ color: item.color || theme.colors.chartPrimary,
114
+ value: item.value,
115
+ label: item.label,
116
+ };
117
+ });
118
+ }, [displayData, maxValue, chartHeight, calculatedBarWidth, barSpacing, minBarHeight, theme.colors.chartPrimary]);
119
+
120
+ return (
121
+ <View
122
+ style={[
123
+ styles.wrapper,
124
+ {
125
+ width: dimensions.width,
126
+ height: dimensions.height,
127
+ backgroundColor: theme.colors.surface,
128
+ borderRadius: theme.radius.md,
129
+ padding,
130
+ },
131
+ ]}
132
+ testID={testID}
133
+ >
134
+ {/* Title */}
135
+ {title && (
136
+ <RNText
137
+ style={[
138
+ styles.title,
139
+ {
140
+ color: theme.colors.text,
141
+ fontSize: theme.fontScale.md,
142
+ marginBottom: theme.spacing.sm,
143
+ },
144
+ ]}
145
+ >
146
+ {title}
147
+ </RNText>
148
+ )}
149
+
150
+ {/* Chart */}
151
+ <View style={styles.chartContainer}>
152
+ <Svg width={chartWidth} height={chartHeight + valueHeight}>
153
+ {/* Bars */}
154
+ {bars.map((bar, index) => (
155
+ <Rect
156
+ key={`bar-${index}`}
157
+ x={bar.x}
158
+ y={bar.y}
159
+ width={bar.width}
160
+ height={bar.height}
161
+ fill={bar.color}
162
+ rx={theme.radius.sm}
163
+ ry={theme.radius.sm}
164
+ />
165
+ ))}
166
+
167
+ {/* Values */}
168
+ {showValues && bars.map((bar, index) => (
169
+ <Text
170
+ key={`value-${index}`}
171
+ x={bar.x + bar.width / 2}
172
+ y={bar.y - 4}
173
+ text={bar.value.toString()}
174
+ fontSize={theme.fontScale.xs}
175
+ fill={theme.colors.textSecondary}
176
+ textAnchor="middle"
177
+ />
178
+ ))}
179
+ </Svg>
180
+
181
+ {/* Labels */}
182
+ {showLabels && (
183
+ <View style={styles.labelsContainer}>
184
+ {bars.map((bar, index) => (
185
+ <View
186
+ key={`label-${index}`}
187
+ style={[
188
+ styles.labelItem,
189
+ { width: bar.width + barSpacing },
190
+ ]}
191
+ >
192
+ <RNText
193
+ style={[
194
+ styles.labelText,
195
+ {
196
+ color: theme.colors.textSecondary,
197
+ fontSize: theme.fontScale.xs,
198
+ },
199
+ ]}
200
+ numberOfLines={1}
201
+ >
202
+ {bar.label}
203
+ </RNText>
204
+ </View>
205
+ ))}
206
+ </View>
207
+ )}
208
+ </View>
209
+ </View>
210
+ );
211
+ });
212
+
213
+ BarChart.displayName = 'BarChart';
214
+
215
+ const styles = StyleSheet.create({
216
+ wrapper: {
217
+ justifyContent: 'flex-start',
218
+ alignItems: 'flex-start',
219
+ },
220
+ container: {
221
+ justifyContent: 'center',
222
+ alignItems: 'center',
223
+ },
224
+ loadingText: {
225
+ fontSize: 16,
226
+ },
227
+ emptyText: {
228
+ fontSize: 16,
229
+ },
230
+ title: {
231
+ fontWeight: 'bold',
232
+ textAlign: 'center',
233
+ width: '100%',
234
+ },
235
+ chartContainer: {
236
+ flex: 1,
237
+ width: '100%',
238
+ },
239
+ labelsContainer: {
240
+ flexDirection: 'row',
241
+ marginTop: 4,
242
+ },
243
+ labelItem: {
244
+ alignItems: 'center',
245
+ },
246
+ labelText: {
247
+ textAlign: 'center',
248
+ },
249
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * BarChart Widget exports
3
+ */
4
+ export { BarChart } from './BarChart';
5
+ export type {
6
+ BarChartWidgetProps,
7
+ BarChartData,
8
+ BarDataPoint,
9
+ BarOrientation
10
+ } from './types';