@semcore/d3-chart 16.0.2-prerelease.4 → 16.0.3-prerelease.0

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 (453) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -50
  3. package/lib/cjs/AnimatedClipPath.js +13 -13
  4. package/lib/cjs/AnimatedClipPath.js.map +1 -1
  5. package/lib/cjs/Area.js +29 -27
  6. package/lib/cjs/Area.js.map +1 -1
  7. package/lib/cjs/Axis.js +97 -101
  8. package/lib/cjs/Axis.js.map +1 -1
  9. package/lib/cjs/Bar.js +31 -32
  10. package/lib/cjs/Bar.js.map +1 -1
  11. package/lib/cjs/Bubble.js +26 -27
  12. package/lib/cjs/Bubble.js.map +1 -1
  13. package/lib/cjs/CompactHorizontalBar.js +65 -68
  14. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  15. package/lib/cjs/Donut.js +94 -95
  16. package/lib/cjs/Donut.js.map +1 -1
  17. package/lib/cjs/Dots.js +36 -34
  18. package/lib/cjs/Dots.js.map +1 -1
  19. package/lib/cjs/GroupBar.js +16 -16
  20. package/lib/cjs/GroupBar.js.map +1 -1
  21. package/lib/cjs/HorizontalBar.js +30 -31
  22. package/lib/cjs/HorizontalBar.js.map +1 -1
  23. package/lib/cjs/Hover.js +27 -33
  24. package/lib/cjs/Hover.js.map +1 -1
  25. package/lib/cjs/Line.js +23 -23
  26. package/lib/cjs/Line.js.map +1 -1
  27. package/lib/cjs/Pattern.js +13 -11
  28. package/lib/cjs/Pattern.js.map +1 -1
  29. package/lib/cjs/Plot.js +26 -27
  30. package/lib/cjs/Plot.js.map +1 -1
  31. package/lib/cjs/Radar.js +125 -132
  32. package/lib/cjs/Radar.js.map +1 -1
  33. package/lib/cjs/RadialTree.js +164 -145
  34. package/lib/cjs/RadialTree.js.map +1 -1
  35. package/lib/cjs/Reference.js +47 -49
  36. package/lib/cjs/Reference.js.map +1 -1
  37. package/lib/cjs/ResponsiveContainer.js +19 -20
  38. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  39. package/lib/cjs/ScatterPlot.js +24 -25
  40. package/lib/cjs/ScatterPlot.js.map +1 -1
  41. package/lib/cjs/StackBar.js +20 -23
  42. package/lib/cjs/StackBar.js.map +1 -1
  43. package/lib/cjs/StackedArea.js +14 -15
  44. package/lib/cjs/StackedArea.js.map +1 -1
  45. package/lib/cjs/Tooltip.js +34 -35
  46. package/lib/cjs/Tooltip.js.map +1 -1
  47. package/lib/cjs/Venn.js +28 -29
  48. package/lib/cjs/Venn.js.map +1 -1
  49. package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
  50. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  51. package/lib/cjs/a11y/PlotA11yModule.js +11 -12
  52. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  53. package/lib/cjs/a11y/PlotA11yView.js +10 -11
  54. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  55. package/lib/cjs/a11y/bezier.js +1 -2
  56. package/lib/cjs/a11y/bezier.js.map +1 -1
  57. package/lib/cjs/a11y/focus.js +4 -5
  58. package/lib/cjs/a11y/focus.js.map +1 -1
  59. package/lib/cjs/a11y/hints.js +5 -8
  60. package/lib/cjs/a11y/hints.js.map +1 -1
  61. package/lib/cjs/a11y/insights.js +63 -64
  62. package/lib/cjs/a11y/insights.js.map +1 -1
  63. package/lib/cjs/a11y/intl.js +1 -2
  64. package/lib/cjs/a11y/intl.js.map +1 -1
  65. package/lib/cjs/a11y/locale.js +4 -5
  66. package/lib/cjs/a11y/locale.js.map +1 -1
  67. package/lib/cjs/a11y/serialize.js +15 -17
  68. package/lib/cjs/a11y/serialize.js.map +1 -1
  69. package/lib/cjs/a11y/summarize.js +1 -2
  70. package/lib/cjs/a11y/summarize.js.map +1 -1
  71. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
  72. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  73. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
  74. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  75. package/lib/cjs/color.js +2 -3
  76. package/lib/cjs/color.js.map +1 -1
  77. package/lib/cjs/component/Chart/AbstractChart.js +43 -46
  78. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  79. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  80. package/lib/cjs/component/Chart/AreaChart.js +17 -20
  81. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  82. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  83. package/lib/cjs/component/Chart/BarChart.js +17 -21
  84. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  85. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  86. package/lib/cjs/component/Chart/BubbleChart.js +18 -19
  87. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  88. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  89. package/lib/cjs/component/Chart/CigaretteChart.js +19 -23
  90. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  91. package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
  92. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +13 -14
  93. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  94. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  95. package/lib/cjs/component/Chart/DonutChart.js +13 -14
  96. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  97. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  98. package/lib/cjs/component/Chart/HistogramChart.js +15 -16
  99. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  100. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  101. package/lib/cjs/component/Chart/LineChart.js +17 -18
  102. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  103. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  104. package/lib/cjs/component/Chart/RadarChart.js +14 -17
  105. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  106. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  107. package/lib/cjs/component/Chart/ScatterPlotChart.js +14 -15
  108. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  109. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  110. package/lib/cjs/component/Chart/VennChart.js +12 -13
  111. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  112. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  113. package/lib/cjs/component/Chart/index.js +7 -8
  114. package/lib/cjs/component/Chart/index.js.map +1 -1
  115. package/lib/cjs/component/ChartLegend/BaseLegend.js +42 -20
  116. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  117. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  118. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +20 -20
  119. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  120. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  121. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +79 -67
  122. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  123. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
  124. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  125. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -18
  126. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  127. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  128. package/lib/cjs/component/ChartLegend/index.js +1 -2
  129. package/lib/cjs/component/ChartLegend/index.js.map +1 -1
  130. package/lib/cjs/component/Cigarette/Cigarette.js +18 -19
  131. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  132. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +22 -26
  133. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
  134. package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  135. package/lib/cjs/component/SvgElement.js +21 -0
  136. package/lib/cjs/component/SvgElement.js.map +1 -0
  137. package/lib/cjs/createElement.d.js.map +1 -1
  138. package/lib/cjs/createElement.js +7 -8
  139. package/lib/cjs/createElement.js.map +1 -1
  140. package/lib/cjs/index.js +9 -2
  141. package/lib/cjs/index.js.map +1 -1
  142. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
  143. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  144. package/lib/cjs/types/Area.d.js.map +1 -1
  145. package/lib/cjs/types/Axis.d.js.map +1 -1
  146. package/lib/cjs/types/Bar.d.js.map +1 -1
  147. package/lib/cjs/types/Bubble.d.js.map +1 -1
  148. package/lib/cjs/types/ClipPath.d.js.map +1 -1
  149. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  150. package/lib/cjs/types/Donut.d.js.map +1 -1
  151. package/lib/cjs/types/GroupBar.d.js.map +1 -1
  152. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  153. package/lib/cjs/types/Hover.d.js.map +1 -1
  154. package/lib/cjs/types/Line.d.js.map +1 -1
  155. package/lib/cjs/types/Plot.d.js.map +1 -1
  156. package/lib/cjs/types/Radar.d.js.map +1 -1
  157. package/lib/cjs/types/Reference.d.js.map +1 -1
  158. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  159. package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
  160. package/lib/cjs/types/StackBar.d.js.map +1 -1
  161. package/lib/cjs/types/StackedArea.d.js.map +1 -1
  162. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  163. package/lib/cjs/types/Venn.d.js.map +1 -1
  164. package/lib/cjs/types/context.d.js.map +1 -1
  165. package/lib/cjs/types/index.d.js +2 -2
  166. package/lib/cjs/types/index.d.js.map +1 -1
  167. package/lib/cjs/utils.js +31 -52
  168. package/lib/cjs/utils.js.map +1 -1
  169. package/lib/es6/AnimatedClipPath.js +11 -10
  170. package/lib/es6/AnimatedClipPath.js.map +1 -1
  171. package/lib/es6/Area.js +27 -24
  172. package/lib/es6/Area.js.map +1 -1
  173. package/lib/es6/Axis.js +96 -98
  174. package/lib/es6/Axis.js.map +1 -1
  175. package/lib/es6/Bar.js +28 -27
  176. package/lib/es6/Bar.js.map +1 -1
  177. package/lib/es6/Bubble.js +24 -24
  178. package/lib/es6/Bubble.js.map +1 -1
  179. package/lib/es6/CompactHorizontalBar.js +63 -65
  180. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  181. package/lib/es6/Donut.js +92 -92
  182. package/lib/es6/Donut.js.map +1 -1
  183. package/lib/es6/Dots.js +36 -33
  184. package/lib/es6/Dots.js.map +1 -1
  185. package/lib/es6/GroupBar.js +14 -13
  186. package/lib/es6/GroupBar.js.map +1 -1
  187. package/lib/es6/HorizontalBar.js +27 -26
  188. package/lib/es6/HorizontalBar.js.map +1 -1
  189. package/lib/es6/Hover.js +24 -28
  190. package/lib/es6/Hover.js.map +1 -1
  191. package/lib/es6/Line.js +20 -19
  192. package/lib/es6/Line.js.map +1 -1
  193. package/lib/es6/Pattern.js +4 -2
  194. package/lib/es6/Pattern.js.map +1 -1
  195. package/lib/es6/Plot.js +25 -25
  196. package/lib/es6/Plot.js.map +1 -1
  197. package/lib/es6/Radar.js +122 -128
  198. package/lib/es6/Radar.js.map +1 -1
  199. package/lib/es6/RadialTree.js +162 -142
  200. package/lib/es6/RadialTree.js.map +1 -1
  201. package/lib/es6/Reference.js +44 -43
  202. package/lib/es6/Reference.js.map +1 -1
  203. package/lib/es6/ResponsiveContainer.js +17 -17
  204. package/lib/es6/ResponsiveContainer.js.map +1 -1
  205. package/lib/es6/ScatterPlot.js +22 -22
  206. package/lib/es6/ScatterPlot.js.map +1 -1
  207. package/lib/es6/StackBar.js +17 -19
  208. package/lib/es6/StackBar.js.map +1 -1
  209. package/lib/es6/StackedArea.js +12 -12
  210. package/lib/es6/StackedArea.js.map +1 -1
  211. package/lib/es6/Tooltip.js +33 -33
  212. package/lib/es6/Tooltip.js.map +1 -1
  213. package/lib/es6/Venn.js +26 -26
  214. package/lib/es6/Venn.js.map +1 -1
  215. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  216. package/lib/es6/a11y/PlotA11yModule.js +11 -11
  217. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  218. package/lib/es6/a11y/PlotA11yView.js +9 -9
  219. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  220. package/lib/es6/a11y/bezier.js.map +1 -1
  221. package/lib/es6/a11y/focus.js +3 -3
  222. package/lib/es6/a11y/focus.js.map +1 -1
  223. package/lib/es6/a11y/hints.js +1 -1
  224. package/lib/es6/a11y/hints.js.map +1 -1
  225. package/lib/es6/a11y/insights.js +61 -61
  226. package/lib/es6/a11y/insights.js.map +1 -1
  227. package/lib/es6/a11y/intl.js.map +1 -1
  228. package/lib/es6/a11y/locale.js +2 -2
  229. package/lib/es6/a11y/locale.js.map +1 -1
  230. package/lib/es6/a11y/serialize.js +14 -13
  231. package/lib/es6/a11y/serialize.js.map +1 -1
  232. package/lib/es6/a11y/summarize.js.map +1 -1
  233. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
  234. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  235. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
  236. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  237. package/lib/es6/color.js +1 -1
  238. package/lib/es6/color.js.map +1 -1
  239. package/lib/es6/component/Chart/AbstractChart.js +40 -41
  240. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  241. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  242. package/lib/es6/component/Chart/AreaChart.js +16 -16
  243. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  244. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  245. package/lib/es6/component/Chart/BarChart.js +15 -17
  246. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  247. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  248. package/lib/es6/component/Chart/BubbleChart.js +17 -15
  249. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  250. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  251. package/lib/es6/component/Chart/CigaretteChart.js +17 -17
  252. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  253. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  254. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +11 -10
  255. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  256. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  257. package/lib/es6/component/Chart/DonutChart.js +12 -10
  258. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  259. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  260. package/lib/es6/component/Chart/HistogramChart.js +14 -12
  261. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  262. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  263. package/lib/es6/component/Chart/LineChart.js +15 -14
  264. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  265. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  266. package/lib/es6/component/Chart/RadarChart.js +12 -13
  267. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  268. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  269. package/lib/es6/component/Chart/ScatterPlotChart.js +13 -11
  270. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  271. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  272. package/lib/es6/component/Chart/VennChart.js +10 -9
  273. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  274. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  275. package/lib/es6/component/Chart/index.js +6 -6
  276. package/lib/es6/component/Chart/index.js.map +1 -1
  277. package/lib/es6/component/ChartLegend/BaseLegend.js +40 -17
  278. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  279. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  280. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +18 -17
  281. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  282. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  283. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +77 -64
  284. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  285. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  286. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +16 -15
  287. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  288. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  289. package/lib/es6/component/ChartLegend/index.js.map +1 -1
  290. package/lib/es6/component/Cigarette/Cigarette.js +16 -16
  291. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  292. package/lib/es6/component/StackGroupBar/StackGroupBar.js +20 -21
  293. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  294. package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  295. package/lib/es6/component/SvgElement.js +14 -0
  296. package/lib/es6/component/SvgElement.js.map +1 -0
  297. package/lib/es6/createElement.d.js.map +1 -1
  298. package/lib/es6/createElement.js +5 -5
  299. package/lib/es6/createElement.js.map +1 -1
  300. package/lib/es6/index.js +1 -0
  301. package/lib/es6/index.js.map +1 -1
  302. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  303. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  304. package/lib/es6/types/Area.d.js.map +1 -1
  305. package/lib/es6/types/Axis.d.js.map +1 -1
  306. package/lib/es6/types/Bar.d.js.map +1 -1
  307. package/lib/es6/types/Bubble.d.js.map +1 -1
  308. package/lib/es6/types/ClipPath.d.js.map +1 -1
  309. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  310. package/lib/es6/types/Donut.d.js.map +1 -1
  311. package/lib/es6/types/GroupBar.d.js.map +1 -1
  312. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  313. package/lib/es6/types/Hover.d.js.map +1 -1
  314. package/lib/es6/types/Line.d.js.map +1 -1
  315. package/lib/es6/types/Plot.d.js.map +1 -1
  316. package/lib/es6/types/Radar.d.js.map +1 -1
  317. package/lib/es6/types/Reference.d.js.map +1 -1
  318. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  319. package/lib/es6/types/ScatterPlot.d.js.map +1 -1
  320. package/lib/es6/types/StackBar.d.js.map +1 -1
  321. package/lib/es6/types/StackedArea.d.js.map +1 -1
  322. package/lib/es6/types/Tooltip.d.js.map +1 -1
  323. package/lib/es6/types/Venn.d.js.map +1 -1
  324. package/lib/es6/types/context.d.js.map +1 -1
  325. package/lib/es6/types/index.d.js +1 -0
  326. package/lib/es6/types/index.d.js.map +1 -1
  327. package/lib/es6/utils.js +11 -13
  328. package/lib/es6/utils.js.map +1 -1
  329. package/lib/esm/AnimatedClipPath.mjs +10 -7
  330. package/lib/esm/Area.mjs +30 -25
  331. package/lib/esm/Axis.mjs +67 -67
  332. package/lib/esm/Bar.mjs +31 -28
  333. package/lib/esm/Bubble.mjs +28 -26
  334. package/lib/esm/CompactHorizontalBar.mjs +61 -60
  335. package/lib/esm/Donut.mjs +50 -49
  336. package/lib/esm/Dots.mjs +32 -27
  337. package/lib/esm/GroupBar.mjs +14 -11
  338. package/lib/esm/HorizontalBar.mjs +30 -27
  339. package/lib/esm/Hover.mjs +28 -30
  340. package/lib/esm/Line.mjs +23 -20
  341. package/lib/esm/Pattern.mjs +1 -1
  342. package/lib/esm/Plot.mjs +27 -25
  343. package/lib/esm/Radar.mjs +90 -94
  344. package/lib/esm/RadialTree.mjs +86 -86
  345. package/lib/esm/Reference.mjs +34 -31
  346. package/lib/esm/ResponsiveContainer.mjs +19 -17
  347. package/lib/esm/ScatterPlot.mjs +26 -24
  348. package/lib/esm/StackBar.mjs +17 -17
  349. package/lib/esm/StackedArea.mjs +13 -11
  350. package/lib/esm/Tooltip.mjs +35 -33
  351. package/lib/esm/Venn.mjs +29 -27
  352. package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
  353. package/lib/esm/a11y/PlotA11yModule.mjs +8 -8
  354. package/lib/esm/a11y/PlotA11yView.mjs +9 -9
  355. package/lib/esm/a11y/focus.mjs +3 -3
  356. package/lib/esm/a11y/hints.mjs +1 -1
  357. package/lib/esm/a11y/insights.mjs +77 -78
  358. package/lib/esm/a11y/intl.mjs +1 -1
  359. package/lib/esm/a11y/locale.mjs +2 -2
  360. package/lib/esm/a11y/serialize.mjs +12 -12
  361. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
  362. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
  363. package/lib/esm/component/Chart/AbstractChart.mjs +38 -37
  364. package/lib/esm/component/Chart/AreaChart.mjs +19 -15
  365. package/lib/esm/component/Chart/BarChart.mjs +20 -17
  366. package/lib/esm/component/Chart/BubbleChart.mjs +16 -13
  367. package/lib/esm/component/Chart/CigaretteChart.mjs +24 -17
  368. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +18 -10
  369. package/lib/esm/component/Chart/DonutChart.mjs +13 -10
  370. package/lib/esm/component/Chart/HistogramChart.mjs +18 -12
  371. package/lib/esm/component/Chart/LineChart.mjs +18 -12
  372. package/lib/esm/component/Chart/RadarChart.mjs +19 -12
  373. package/lib/esm/component/Chart/ScatterPlotChart.mjs +14 -11
  374. package/lib/esm/component/Chart/VennChart.mjs +12 -9
  375. package/lib/esm/component/Chart/index.mjs +6 -6
  376. package/lib/esm/component/ChartLegend/BaseLegend.mjs +42 -17
  377. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +21 -18
  378. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +67 -56
  379. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +23 -20
  380. package/lib/esm/component/Cigarette/Cigarette.mjs +18 -16
  381. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +20 -19
  382. package/lib/esm/component/SvgElement.mjs +14 -0
  383. package/lib/esm/createElement.mjs +5 -5
  384. package/lib/esm/index.mjs +2 -0
  385. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  386. package/lib/esm/utils.mjs +8 -8
  387. package/lib/types/Area.d.ts +7 -6
  388. package/lib/types/Axis.d.ts +4 -3
  389. package/lib/types/Bar.d.ts +7 -6
  390. package/lib/types/Bubble.d.ts +6 -5
  391. package/lib/types/ClipPath.d.ts +4 -3
  392. package/lib/types/CompactHorizontalBar.d.ts +7 -8
  393. package/lib/types/Donut.d.ts +6 -5
  394. package/lib/types/GroupBar.d.ts +6 -6
  395. package/lib/types/HorizontalBar.d.ts +7 -6
  396. package/lib/types/Hover.d.ts +8 -8
  397. package/lib/types/Line.d.ts +7 -6
  398. package/lib/types/Pattern.d.ts +51 -51
  399. package/lib/types/Plot.d.ts +10 -9
  400. package/lib/types/Radar.d.ts +8 -7
  401. package/lib/types/RadialTree.d.ts +9 -54
  402. package/lib/types/Reference.d.ts +5 -4
  403. package/lib/types/ResponsiveContainer.d.ts +5 -4
  404. package/lib/types/ScatterPlot.d.ts +6 -5
  405. package/lib/types/StackBar.d.ts +7 -6
  406. package/lib/types/StackedArea.d.ts +6 -5
  407. package/lib/types/Tooltip.d.ts +14 -12
  408. package/lib/types/Venn.d.ts +7 -6
  409. package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
  410. package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
  411. package/lib/types/a11y/hints.d.ts +5 -5
  412. package/lib/types/a11y/insights.d.ts +1 -1
  413. package/lib/types/a11y/intl.d.ts +1 -1
  414. package/lib/types/a11y/serialize.d.ts +7 -7
  415. package/lib/types/a11y/summarize.d.ts +2 -2
  416. package/lib/types/component/Chart/AbstractChart.d.ts +6 -6
  417. package/lib/types/component/Chart/AbstractChart.type.d.ts +27 -27
  418. package/lib/types/component/Chart/AreaChart.d.ts +1 -1
  419. package/lib/types/component/Chart/AreaChart.type.d.ts +6 -6
  420. package/lib/types/component/Chart/BarChart.d.ts +1 -1
  421. package/lib/types/component/Chart/BarChart.type.d.ts +6 -6
  422. package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
  423. package/lib/types/component/Chart/BubbleChart.type.d.ts +4 -4
  424. package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
  425. package/lib/types/component/Chart/CigaretteChart.type.d.ts +4 -4
  426. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
  427. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +5 -5
  428. package/lib/types/component/Chart/DonutChart.d.ts +1 -1
  429. package/lib/types/component/Chart/DonutChart.type.d.ts +5 -5
  430. package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
  431. package/lib/types/component/Chart/HistogramChart.type.d.ts +4 -4
  432. package/lib/types/component/Chart/LineChart.d.ts +1 -1
  433. package/lib/types/component/Chart/LineChart.type.d.ts +7 -7
  434. package/lib/types/component/Chart/RadarChart.d.ts +1 -1
  435. package/lib/types/component/Chart/RadarChart.type.d.ts +4 -4
  436. package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
  437. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +5 -5
  438. package/lib/types/component/Chart/VennChart.d.ts +1 -1
  439. package/lib/types/component/Chart/VennChart.type.d.ts +4 -4
  440. package/lib/types/component/ChartLegend/BaseLegend.d.ts +6 -4
  441. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
  442. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
  443. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
  444. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
  445. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
  446. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
  447. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
  448. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
  449. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
  450. package/lib/types/component/SvgElement.d.ts +10 -0
  451. package/lib/types/index.d.ts +2 -1
  452. package/lib/types/utils.d.ts +6 -6
  453. package/package.json +22 -23
@@ -1,59 +1,59 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.AbstractChart = void 0;
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
+ var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
10
11
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
13
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
14
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
15
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
16
+ var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
17
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
18
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
17
19
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
20
  var _core = require("@semcore/core");
19
- var _hints = require("../../a11y/hints");
20
- var _utils = require("../../utils");
21
- var _react = _interopRequireDefault(require("react"));
21
+ var _ariaProps = require("@semcore/core/lib/utils/ariaProps");
22
22
  var _assignProps2 = require("@semcore/core/lib/utils/assignProps");
23
- var _ChartLegend = _interopRequireWildcard(require("../ChartLegend"));
24
23
  var _flexBox = require("@semcore/flex-box");
25
- var _ = require("../..");
26
24
  var _typography = require("@semcore/typography");
27
- var _ariaProps = require("@semcore/core/lib/utils/ariaProps");
28
- // @ts-ignore
29
- var AbstractChart = /*#__PURE__*/function (_Component) {
30
- (0, _inherits2["default"])(AbstractChart, _Component);
31
- var _super = (0, _createSuper2["default"])(AbstractChart);
32
- /**
33
- * Padding from the end's of chart to the container (except axis sides)
34
- */
35
-
25
+ var _react = _interopRequireDefault(require("react"));
26
+ var _ = require("../..");
27
+ var _hints = require("../../a11y/hints");
28
+ var _utils = require("../../utils");
29
+ var _ChartLegend = _interopRequireWildcard(require("../ChartLegend"));
30
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); } // @ts-ignore
31
+ var AbstractChart = exports.AbstractChart = /*#__PURE__*/function (_Component) {
36
32
  function AbstractChart(props) {
37
33
  var _this;
38
34
  (0, _classCallCheck2["default"])(this, AbstractChart);
39
- _this = _super.call(this, props);
40
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "plotPadding", 6);
41
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "dataHints", (0, _hints.makeDataHintsContainer)());
42
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
35
+ _this = _callSuper(this, AbstractChart, [props]);
36
+ /**
37
+ * Padding from the end's of chart to the container (except axis sides)
38
+ */
39
+ (0, _defineProperty2["default"])(_this, "plotPadding", 6);
40
+ (0, _defineProperty2["default"])(_this, "dataHints", (0, _hints.makeDataHintsContainer)());
41
+ (0, _defineProperty2["default"])(_this, "state", {
43
42
  dataDefinitions: _this.getDefaultDataDefinitions(),
44
43
  highlightedLine: -1,
45
44
  withTrend: false
46
45
  });
47
- _this.setHighlightedLine = _this.setHighlightedLine.bind((0, _assertThisInitialized2["default"])(_this));
48
- _this.handleChangeVisible = _this.handleChangeVisible.bind((0, _assertThisInitialized2["default"])(_this));
49
- _this.handleMouseEnter = _this.handleMouseEnter.bind((0, _assertThisInitialized2["default"])(_this));
50
- _this.handleMouseLeave = _this.handleMouseLeave.bind((0, _assertThisInitialized2["default"])(_this));
51
- _this.resolveColor = _this.resolveColor.bind((0, _assertThisInitialized2["default"])(_this));
52
- _this.tooltipValueFormatter = _this.tooltipValueFormatter.bind((0, _assertThisInitialized2["default"])(_this));
53
- _this.handleWithTrendChange = _this.handleWithTrendChange.bind((0, _assertThisInitialized2["default"])(_this));
46
+ _this.setHighlightedLine = _this.setHighlightedLine.bind(_this);
47
+ _this.handleChangeVisible = _this.handleChangeVisible.bind(_this);
48
+ _this.handleMouseEnter = _this.handleMouseEnter.bind(_this);
49
+ _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);
50
+ _this.resolveColor = _this.resolveColor.bind(_this);
51
+ _this.tooltipValueFormatter = _this.tooltipValueFormatter.bind(_this);
52
+ _this.handleWithTrendChange = _this.handleWithTrendChange.bind(_this);
54
53
  return _this;
55
54
  }
56
- (0, _createClass2["default"])(AbstractChart, [{
55
+ (0, _inherits2["default"])(AbstractChart, _Component);
56
+ return (0, _createClass2["default"])(AbstractChart, [{
57
57
  key: "componentDidUpdate",
58
58
  value: function componentDidUpdate(prevProps) {
59
59
  if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {
@@ -71,7 +71,7 @@ var AbstractChart = /*#__PURE__*/function (_Component) {
71
71
  legendProps = _this$props.legendProps;
72
72
  return this.dataKeys.map(function (key, index) {
73
73
  var _legendProps$legendMa, _legendData$label, _legendData$icon, _legendData$defaultCh;
74
- var legendData = legendProps === null || legendProps === void 0 ? void 0 : (_legendProps$legendMa = legendProps.legendMap) === null || _legendProps$legendMa === void 0 ? void 0 : _legendProps$legendMa[key];
74
+ var legendData = legendProps === null || legendProps === void 0 || (_legendProps$legendMa = legendProps.legendMap) === null || _legendProps$legendMa === void 0 ? void 0 : _legendProps$legendMa[key];
75
75
  var dataDefinition = {
76
76
  id: key,
77
77
  label: (_legendData$label = legendData === null || legendData === void 0 ? void 0 : legendData.label) !== null && _legendData$label !== void 0 ? _legendData$label : key,
@@ -90,7 +90,6 @@ var AbstractChart = /*#__PURE__*/function (_Component) {
90
90
  if (legendData && 'columns' in legendData) {
91
91
  dataDefinition.columns = legendData.columns || [];
92
92
  } else if (!Array.isArray(data)) {
93
- var _value;
94
93
  var value = undefined;
95
94
  var dataValue = data[key];
96
95
  if (data instanceof Map) {
@@ -108,11 +107,11 @@ var AbstractChart = /*#__PURE__*/function (_Component) {
108
107
  var percent = value !== undefined ? (value / total * 100).toFixed(2) : undefined;
109
108
  dataDefinition.columns = [/*#__PURE__*/_react["default"].createElement(_typography.Text, {
110
109
  key: "".concat(key, "_percent"),
111
- use: 'secondary'
110
+ use: "secondary"
112
111
  }, percent !== undefined ? "".concat(percent, "%") : ''), /*#__PURE__*/_react["default"].createElement(_typography.Text, {
113
112
  key: "".concat(key, "_value"),
114
113
  use: value ? 'primary' : 'secondary'
115
- }, (_value = value) !== null && _value !== void 0 ? _value : 'n/a')];
114
+ }, value !== null && value !== void 0 ? value : 'n/a')];
116
115
  }
117
116
  return dataDefinition;
118
117
  });
@@ -350,17 +349,17 @@ var AbstractChart = /*#__PURE__*/function (_Component) {
350
349
  withTrend = _this$state.withTrend;
351
350
  var lProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, this.defaultLegendProps()), legendProps);
352
351
  var commonLegendProps = {
353
- dataHints: this.dataHints,
354
- items: dataDefinitions,
355
- size: lProps.size,
356
- shape: lProps.shape,
357
- w: lProps.w,
358
- h: lProps.h,
352
+ 'dataHints': this.dataHints,
353
+ 'items': dataDefinitions,
354
+ 'size': lProps.size,
355
+ 'shape': lProps.shape,
356
+ 'w': lProps.w,
357
+ 'h': lProps.h,
359
358
  patterns: patterns,
360
- direction: (_lProps$direction = lProps.direction) !== null && _lProps$direction !== void 0 ? _lProps$direction : direction === 'row' || direction === 'row-reverse' ? 'column' : 'row',
361
- onChangeVisibleItem: lProps.disableSelectItems ? undefined : (0, _assignProps2.callAllEventHandlers)(lProps.onChangeVisibleItem, this.handleChangeVisible),
362
- onMouseEnterItem: lProps.disableHoverItems ? undefined : (0, _assignProps2.callAllEventHandlers)(lProps.onMouseEnterItem, this.handleMouseEnter),
363
- onMouseLeaveItem: lProps.disableHoverItems ? undefined : (0, _assignProps2.callAllEventHandlers)(lProps.onMouseLeaveItem, this.handleMouseLeave),
359
+ 'direction': (_lProps$direction = lProps.direction) !== null && _lProps$direction !== void 0 ? _lProps$direction : direction === 'row' || direction === 'row-reverse' ? 'column' : 'row',
360
+ 'onChangeVisibleItem': lProps.disableSelectItems ? undefined : (0, _assignProps2.callAllEventHandlers)(lProps.onChangeVisibleItem, this.handleChangeVisible),
361
+ 'onMouseEnterItem': lProps.disableHoverItems ? undefined : (0, _assignProps2.callAllEventHandlers)(lProps.onMouseEnterItem, this.handleMouseEnter),
362
+ 'onMouseLeaveItem': lProps.disableHoverItems ? undefined : (0, _assignProps2.callAllEventHandlers)(lProps.onMouseLeaveItem, this.handleMouseLeave),
364
363
  'aria-label': this.getLegendAriaLabel()
365
364
  };
366
365
  if (lProps.legendType === 'Table') {
@@ -446,9 +445,7 @@ var AbstractChart = /*#__PURE__*/function (_Component) {
446
445
  }, extractedAriaProps)), this.renderAxis(), this.renderTooltip(), this.renderChart()));
447
446
  }
448
447
  }]);
449
- return AbstractChart;
450
448
  }(_core.Component);
451
- exports.AbstractChart = AbstractChart;
452
449
  (0, _defineProperty2["default"])(AbstractChart, "style", {});
453
450
  (0, _defineProperty2["default"])(AbstractChart, "defaultProps", {
454
451
  direction: 'column',
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractChart.js","names":["_core","require","_hints","_utils","_react","_interopRequireDefault","_assignProps2","_ChartLegend","_interopRequireWildcard","_flexBox","_","_typography","_ariaProps","AbstractChart","_Component","_inherits2","_super","_createSuper2","props","_this","_classCallCheck2","call","_defineProperty2","_assertThisInitialized2","makeDataHintsContainer","dataDefinitions","getDefaultDataDefinitions","highlightedLine","withTrend","setHighlightedLine","bind","handleChangeVisible","handleMouseEnter","handleMouseLeave","resolveColor","tooltipValueFormatter","handleWithTrendChange","_createClass2","key","value","componentDidUpdate","prevProps","data","legendProps","setState","_this2","_this$props","dataKeys","map","index","_legendProps$legendMa","_legendData$label","_legendData$icon","_legendData$defaultCh","legendData","legendMap","dataDefinition","id","label","icon","undefined","checked","defaultChecked","color","columns","additionalInfo","count","Array","isArray","_value","dataValue","Map","get","interpolateValue","Number","total","Object","values","reduce","sum","i","percent","toFixed","createElement","Text","concat","use","_this$props2","groupKey","keys","filter","_this$asProps","asProps","invertAxis","xTicksCount","yTicksCount","scale","xScale","ticks","_this$asProps2","yScale","_this$asProps3","flatValues","result","item","add","entries","forEach","_ref3","_ref4","_slicedToArray2","Set","_this$asProps4","max","val","barSum","_ref5","_ref6","Date","isNaN","getMilliseconds","totalValue","state","legendItem","getValueScale","Math","apply","_toConsumableArray2","min","avg","round","log10","valueScale","pow","isVisible","prevState","findIndex","line","_this$props$colorMap$","_this$props$colorMap","colorMap","toDateString","toString","defaultLegendProps","legendType","renderLegend","_lProps$direction","_this$asProps5","direction","showLegend","patterns","length","_this$state","lProps","_objectSpread2","commonLegendProps","dataHints","items","size","shape","w","h","onChangeVisibleItem","disableSelectItems","callAllEventHandlers","onMouseEnterItem","disableHoverItems","onMouseLeaveItem","getLegendAriaLabel","ChartLegendTable","flexLegendProps","trendLabel","trendIsVisible","onTrendIsVisibleChange","renderAxis","_this$asProps6","showXAxis","showYAxis","axisXValueFormatter","axisYValueFormatter","xTicks","yTicks","childrenX","_ref7","children","childrenY","_ref8","Fragment","YAxis","Ticks","Grid","XAxis","render","_ref","_ref2","SChart","Flex","_this$asProps7","styles","plotWidth","plotHeight","a11yAltTextConfig","duration","_extractAriaProps","extractAriaProps","extractedAriaProps","sstyled","cn","assignProps","Plot","renderTooltip","renderChart","Component","exports","showTooltip"],"sources":["../../../../src/component/Chart/AbstractChart.tsx"],"sourcesContent":["import { makeDataHintsContainer } from '../../a11y/hints';\nimport { LegendItem } from '../ChartLegend/LegendItem/LegendItem.type';\nimport { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport { interpolateValue } from '../../utils';\nimport React from 'react';\nimport { Component, Root, sstyled } from '@semcore/core';\nimport { BaseChartProps, BaseLegendProps, ListData, ObjectData } from './AbstractChart.type';\nimport { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport ChartLegend, { ChartLegendTable } from '../ChartLegend';\nimport { Flex } from '@semcore/flex-box';\n// @ts-ignore\nimport { Plot, XAxis, YAxis } from '../..';\nimport { Text } from '@semcore/typography';\nimport { LegendFlexProps } from '../ChartLegend/LegendFlex/LegendFlex.type';\nimport { LegendTableProps } from '../ChartLegend/LegendTable/LegendTable.type';\nimport { extractAriaProps } from '@semcore/core/lib/utils/ariaProps';\n\ntype ChartState = {\n dataDefinitions: Array<LegendItem & { columns: React.ReactNode[] }>;\n highlightedLine: number;\n withTrend: boolean;\n};\n\nexport abstract class AbstractChart<\n D extends ListData | ObjectData,\n T extends BaseChartProps<D>,\n E extends readonly ((...args: any[]) => any)[] = [],\n> extends Component<T, {}, ChartState, E> {\n public static style = {};\n public static defaultProps: Partial<BaseChartProps<any>> = {\n direction: 'column',\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: true,\n };\n\n /**\n * Padding from the end's of chart to the container (except axis sides)\n */\n protected plotPadding = 6;\n\n protected dataHints = makeDataHintsContainer();\n\n public state: ChartState = {\n dataDefinitions: this.getDefaultDataDefinitions(),\n highlightedLine: -1,\n withTrend: false,\n };\n\n constructor(props: T) {\n super(props);\n\n this.setHighlightedLine = this.setHighlightedLine.bind(this);\n this.handleChangeVisible = this.handleChangeVisible.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.resolveColor = this.resolveColor.bind(this);\n this.tooltipValueFormatter = this.tooltipValueFormatter.bind(this);\n this.handleWithTrendChange = this.handleWithTrendChange.bind(this);\n }\n\n public componentDidUpdate(prevProps: T) {\n if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {\n this.setState({ dataDefinitions: this.getDefaultDataDefinitions() });\n }\n }\n\n protected getDefaultDataDefinitions(): Array<LegendItem & { columns: React.ReactNode[] }> {\n const { data, legendProps } = this.props;\n\n return this.dataKeys.map((key, index) => {\n const legendData = legendProps?.legendMap?.[key];\n\n const dataDefinition: LegendItem & { columns: React.ReactNode[] } = {\n id: key,\n label: legendData?.label ?? key,\n icon: legendData?.icon ?? undefined,\n checked: legendData?.defaultChecked ?? true,\n color: this.resolveColor(key, index),\n columns: [],\n };\n\n if (legendData?.additionalInfo || legendData?.count) {\n dataDefinition.additionalInfo = legendData.additionalInfo\n ? { label: legendData.additionalInfo }\n : legendData.count\n ? { count: legendData.count }\n : undefined;\n }\n\n if (legendData && 'columns' in legendData) {\n dataDefinition.columns = legendData.columns || [];\n } else if (!Array.isArray(data)) {\n let value: number | undefined = undefined;\n let dataValue = data[key];\n\n if (data instanceof Map) {\n dataValue = data.get(key);\n }\n\n if (dataValue !== interpolateValue) {\n value = Number(dataValue);\n }\n\n const total = Object.values(data).reduce<number>((sum, i) => {\n if (i !== interpolateValue) {\n return sum + Number(i);\n }\n\n return sum;\n }, 0);\n const percent = value !== undefined ? ((value / total) * 100).toFixed(2) : undefined;\n\n dataDefinition.columns = [\n <Text key={`${key}_percent`} use={'secondary'}>\n {percent !== undefined ? `${percent}%` : ''}\n </Text>,\n <Text key={`${key}_value`} use={value ? 'primary' : 'secondary'}>\n {value ?? 'n/a'}\n </Text>,\n ];\n }\n\n return dataDefinition;\n });\n }\n\n protected abstract get xScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;\n protected abstract get yScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;\n\n protected abstract getLegendAriaLabel(): string;\n protected abstract renderChart(): React.ReactNode;\n protected abstract renderTooltip(): React.ReactNode;\n\n protected get dataKeys(): string[] {\n const { data, groupKey } = this.props;\n\n let dataKeys: string[];\n\n if (Array.isArray(data) && groupKey) {\n dataKeys = Object.keys(data[0]).filter((key) => key !== groupKey);\n } else {\n dataKeys = Object.keys(data);\n }\n\n return dataKeys;\n }\n\n protected get xTicks(): number[] | Date[] | undefined {\n const { data, invertAxis, xTicksCount, yTicksCount } = this.asProps;\n\n const scale = this.xScale;\n\n if (Array.isArray(data) && 'ticks' in scale) {\n if (invertAxis && yTicksCount) {\n return scale.ticks(yTicksCount);\n } else if (xTicksCount) {\n return scale.ticks(xTicksCount);\n }\n\n return undefined;\n }\n\n return undefined;\n }\n\n protected get yTicks(): number[] | Date[] | undefined {\n const { data, invertAxis, xTicksCount, yTicksCount } = this.asProps;\n\n const scale = this.yScale;\n\n if (Array.isArray(data) && 'ticks' in scale) {\n if (invertAxis && xTicksCount) {\n return scale.ticks(xTicksCount);\n } else if (yTicksCount) {\n return scale.ticks(yTicksCount);\n }\n\n return undefined;\n }\n\n return undefined;\n }\n\n protected get flatValues(): Set<number> {\n const { data, groupKey } = this.asProps;\n const values: any[] = Array.isArray(data) ? data : Object.values(data);\n\n const flatValues = values.reduce<Set<number>>((result, item) => {\n if (!groupKey && typeof item === 'number') {\n result.add(item);\n } else {\n Object.entries(item).forEach(([key, value]) => {\n if (key !== groupKey && typeof value === 'number') {\n result.add(value);\n }\n });\n }\n\n return result;\n }, new Set());\n\n return flatValues;\n }\n\n protected get maxStackedValue(): number {\n const { data, groupKey } = this.asProps;\n\n if (!Array.isArray(data)) {\n const max = Object.values(data).reduce<number>((sum, val) => {\n if (typeof val === 'number') {\n sum = sum + val;\n }\n\n return sum;\n }, 0);\n\n return max;\n }\n\n const max = data.reduce((max, item) => {\n const barSum = Object.entries(item).reduce<number>((sum, [key, val]) => {\n if (key === groupKey) {\n return sum;\n }\n\n if (typeof val === 'number') {\n return sum + val;\n }\n\n if (val instanceof Date && !Number.isNaN(val.getMilliseconds())) {\n return sum + val.getMilliseconds();\n }\n\n return sum;\n }, 0);\n\n if (barSum > max) {\n max = barSum;\n }\n\n return max;\n }, 0);\n\n return max;\n }\n\n protected totalValue(data: ObjectData): number {\n const { dataDefinitions } = this.state;\n\n const total = dataDefinitions.reduce((sum, legendItem) => {\n const item = data[legendItem.id];\n\n if (typeof item === 'number') {\n return sum + item;\n }\n\n if (item instanceof Date && !Number.isNaN(item.getMilliseconds())) {\n return sum + item.getMilliseconds();\n }\n\n return sum;\n }, 0);\n\n return total;\n }\n\n protected getValueScale(values: number[]): number {\n const max = Math.max(...values);\n const min = Math.min(...values);\n\n const avg = (max + min) / 2;\n const count = Math.round(Math.log10(avg));\n\n const valueScale = 100 / 10 ** count;\n\n return valueScale;\n }\n\n protected setHighlightedLine(index: number) {\n this.setState({ highlightedLine: index });\n }\n\n protected handleChangeVisible(id: string, isVisible: boolean) {\n this.setState((prevState) => {\n const dataDefinitions = prevState.dataDefinitions.map((item) => {\n if (item.id === id) {\n item.checked = isVisible;\n }\n\n return item;\n });\n\n return { dataDefinitions };\n });\n }\n\n protected handleWithTrendChange(isVisible: boolean) {\n this.setState({ withTrend: isVisible });\n }\n\n protected handleMouseEnter(id: string) {\n this.setHighlightedLine(this.state.dataDefinitions.findIndex((line) => line.id === id));\n }\n\n protected handleMouseLeave() {\n this.setHighlightedLine(-1);\n }\n\n protected resolveColor(id: string, index: number) {\n return this.props.colorMap?.[id] ?? `chart-palette-order-${index + 1}`;\n }\n\n protected tooltipValueFormatter(\n value?: string | number | typeof interpolateValue | Date,\n ): string {\n const { tooltipValueFormatter } = this.asProps;\n\n if (tooltipValueFormatter) {\n return tooltipValueFormatter(value);\n }\n\n if (value === undefined || value === interpolateValue) {\n return 'n/a';\n }\n\n if (value === null) {\n return '0';\n }\n\n if (value instanceof Date) {\n return value.toDateString();\n }\n\n return value.toString();\n }\n\n protected defaultLegendProps(): Partial<BaseLegendProps> {\n return {\n legendType: 'Flex',\n };\n }\n\n protected renderLegend() {\n const { legendProps, direction, showLegend, patterns } = this.asProps;\n\n if (\n !showLegend ||\n // we hide Legend for one item on chart except not manually set to show.\n (this.dataKeys.length === 1 && showLegend === true)\n ) {\n return null;\n }\n\n const { dataDefinitions, withTrend } = this.state;\n const lProps = {\n ...this.defaultLegendProps(),\n ...legendProps,\n };\n\n const commonLegendProps: LegendFlexProps | LegendTableProps = {\n dataHints: this.dataHints,\n items: dataDefinitions,\n size: lProps.size,\n shape: lProps.shape,\n w: lProps.w,\n h: lProps.h,\n patterns,\n direction:\n lProps.direction ?? (direction === 'row' || direction === 'row-reverse' ? 'column' : 'row'),\n onChangeVisibleItem: lProps.disableSelectItems\n ? undefined\n : callAllEventHandlers(lProps.onChangeVisibleItem, this.handleChangeVisible),\n onMouseEnterItem: lProps.disableHoverItems\n ? undefined\n : callAllEventHandlers(lProps.onMouseEnterItem, this.handleMouseEnter),\n onMouseLeaveItem: lProps.disableHoverItems\n ? undefined\n : callAllEventHandlers(lProps.onMouseLeaveItem, this.handleMouseLeave),\n 'aria-label': this.getLegendAriaLabel(),\n };\n\n if (lProps.legendType === 'Table') {\n return <ChartLegendTable {...(commonLegendProps as LegendTableProps)} />;\n }\n\n if ('withTrend' in lProps) {\n const flexLegendProps = {\n ...commonLegendProps,\n withTrend: true,\n trendLabel: lProps.trendLabel,\n trendIsVisible: withTrend,\n onTrendIsVisibleChange: this.handleWithTrendChange,\n };\n\n return <ChartLegend {...(flexLegendProps as LegendFlexProps)} />;\n }\n\n return <ChartLegend {...(commonLegendProps as LegendFlexProps)} />;\n }\n\n protected renderAxis(): React.ReactNode {\n const { invertAxis, showXAxis, showYAxis, data, axisXValueFormatter, axisYValueFormatter } =\n this.asProps;\n\n if (!Array.isArray(data)) {\n return null;\n }\n\n const xTicks = this.xTicks;\n const yTicks = this.yTicks;\n\n const childrenX = axisXValueFormatter\n ? ({ value }: any) => ({ children: axisXValueFormatter(value) })\n : undefined;\n const childrenY = axisYValueFormatter\n ? ({ value }: any) => ({ children: axisYValueFormatter(value) })\n : undefined;\n\n return (\n <>\n {showYAxis && (\n <YAxis>\n {yTicks ? (\n <YAxis.Ticks ticks={yTicks}>{childrenY}</YAxis.Ticks>\n ) : (\n <YAxis.Ticks>{childrenY}</YAxis.Ticks>\n )}\n {invertAxis !== true && (yTicks ? <YAxis.Grid ticks={yTicks} /> : <YAxis.Grid />)}\n </YAxis>\n )}\n\n {showXAxis && (\n <XAxis>\n {xTicks ? (\n <XAxis.Ticks ticks={xTicks}>{childrenX}</XAxis.Ticks>\n ) : (\n <XAxis.Ticks>{childrenX}</XAxis.Ticks>\n )}\n {invertAxis === true && (xTicks ? <XAxis.Grid ticks={xTicks} /> : <XAxis.Grid />)}\n </XAxis>\n )}\n </>\n );\n }\n\n public render() {\n const SChart = Root;\n const { styles, plotWidth, plotHeight, data, patterns, a11yAltTextConfig, duration } =\n this.asProps;\n\n const { extractedAriaProps } = extractAriaProps(this.asProps);\n\n return sstyled(styles)(\n <SChart render={Flex} gap={5} __excludeProps={['data']} role={'group'}>\n {this.renderLegend()}\n <Plot\n data={data}\n scale={[this.xScale, this.yScale]}\n width={plotWidth}\n height={plotHeight}\n dataHints={this.dataHints}\n a11yAltTextConfig={a11yAltTextConfig}\n patterns={patterns}\n duration={duration}\n {...extractedAriaProps}\n >\n {this.renderAxis()}\n {this.renderTooltip()}\n {this.renderChart()}\n </Plot>\n </SChart>,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAKA,IAAAA,KAAA,GAAAC,OAAA;AALA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAGA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,CAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAGA,IAAAW,UAAA,GAAAX,OAAA;AALA;AAAA,IAasBY,aAAa,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,aAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,OAAAC,aAAA,aAAAJ,aAAA;EAcjC;AACF;AACA;;EAWE,SAAAA,cAAYK,KAAQ,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,mBAAAP,aAAA;IACpBM,KAAA,GAAAH,MAAA,CAAAK,IAAA,OAAMH,KAAK;IAAE,IAAAI,gBAAA,iBAAAC,uBAAA,aAAAJ,KAAA,kBAXS,CAAC;IAAA,IAAAG,gBAAA,iBAAAC,uBAAA,aAAAJ,KAAA,gBAEH,IAAAK,6BAAsB,GAAE;IAAA,IAAAF,gBAAA,iBAAAC,uBAAA,aAAAJ,KAAA,YAEnB;MACzBM,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ps","_assignProps2","_flexBox","_typography","_react","_interopRequireDefault","_","_hints","_utils","_ChartLegend","_interopRequireWildcard","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","AbstractChart","exports","_Component","props","_this","_classCallCheck2","_defineProperty2","makeDataHintsContainer","dataDefinitions","getDefaultDataDefinitions","highlightedLine","withTrend","setHighlightedLine","bind","handleChangeVisible","handleMouseEnter","handleMouseLeave","resolveColor","tooltipValueFormatter","handleWithTrendChange","_inherits2","_createClass2","key","value","componentDidUpdate","prevProps","data","legendProps","setState","_this2","_this$props","dataKeys","map","index","_legendProps$legendMa","_legendData$label","_legendData$icon","_legendData$defaultCh","legendData","legendMap","dataDefinition","id","label","icon","undefined","checked","defaultChecked","color","columns","additionalInfo","count","Array","isArray","dataValue","Map","get","interpolateValue","Number","total","Object","values","reduce","sum","i","percent","toFixed","createElement","Text","concat","use","_this$props2","groupKey","keys","filter","_this$asProps","asProps","invertAxis","xTicksCount","yTicksCount","scale","xScale","ticks","_this$asProps2","yScale","_this$asProps3","flatValues","result","item","add","entries","forEach","_ref3","_ref4","_slicedToArray2","Set","_this$asProps4","max","val","barSum","_ref5","_ref6","Date","isNaN","getMilliseconds","totalValue","state","legendItem","getValueScale","Math","_toConsumableArray2","min","avg","round","log10","valueScale","pow","isVisible","prevState","findIndex","line","_this$props$colorMap$","_this$props$colorMap","colorMap","toDateString","toString","defaultLegendProps","legendType","renderLegend","_lProps$direction","_this$asProps5","direction","showLegend","patterns","length","_this$state","lProps","_objectSpread2","commonLegendProps","dataHints","size","shape","w","h","disableSelectItems","callAllEventHandlers","onChangeVisibleItem","disableHoverItems","onMouseEnterItem","onMouseLeaveItem","getLegendAriaLabel","ChartLegendTable","flexLegendProps","trendLabel","trendIsVisible","onTrendIsVisibleChange","renderAxis","_this$asProps6","showXAxis","showYAxis","axisXValueFormatter","axisYValueFormatter","xTicks","yTicks","childrenX","_ref7","children","childrenY","_ref8","Fragment","YAxis","Ticks","Grid","XAxis","render","_ref","_ref2","SChart","Flex","_this$asProps7","styles","plotWidth","plotHeight","a11yAltTextConfig","duration","_extractAriaProps","extractAriaProps","extractedAriaProps","sstyled","cn","assignProps","Plot","renderTooltip","renderChart","Component","showTooltip"],"sources":["../../../../src/component/Chart/AbstractChart.tsx"],"sourcesContent":["import { Component, Root, sstyled } from '@semcore/core';\nimport { extractAriaProps } from '@semcore/core/lib/utils/ariaProps';\nimport { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';\nimport { Flex } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport React from 'react';\n\nimport type { BaseChartProps, BaseLegendProps, ListData, ObjectData } from './AbstractChart.type';\n// @ts-ignore\nimport { Plot, XAxis, YAxis } from '../..';\nimport { makeDataHintsContainer } from '../../a11y/hints';\nimport { interpolateValue } from '../../utils';\nimport ChartLegend, { ChartLegendTable } from '../ChartLegend';\nimport type { LegendFlexProps } from '../ChartLegend/LegendFlex/LegendFlex.type';\nimport type { LegendItem } from '../ChartLegend/LegendItem/LegendItem.type';\nimport type { LegendTableProps } from '../ChartLegend/LegendTable/LegendTable.type';\n\ntype ChartState = {\n dataDefinitions: Array<LegendItem & { columns: React.ReactNode[] }>;\n highlightedLine: number;\n withTrend: boolean;\n};\n\nexport abstract class AbstractChart<\n D extends ListData | ObjectData,\n T extends BaseChartProps<D>,\n E extends readonly ((...args: any[]) => any)[] = [],\n> extends Component<T, {}, ChartState, E> {\n public static style = {};\n public static defaultProps: Partial<BaseChartProps<any>> = {\n direction: 'column',\n showXAxis: true,\n showYAxis: true,\n showTooltip: true,\n showLegend: true,\n };\n\n /**\n * Padding from the end's of chart to the container (except axis sides)\n */\n protected plotPadding = 6;\n\n protected dataHints = makeDataHintsContainer();\n\n public state: ChartState = {\n dataDefinitions: this.getDefaultDataDefinitions(),\n highlightedLine: -1,\n withTrend: false,\n };\n\n constructor(props: T) {\n super(props);\n\n this.setHighlightedLine = this.setHighlightedLine.bind(this);\n this.handleChangeVisible = this.handleChangeVisible.bind(this);\n this.handleMouseEnter = this.handleMouseEnter.bind(this);\n this.handleMouseLeave = this.handleMouseLeave.bind(this);\n this.resolveColor = this.resolveColor.bind(this);\n this.tooltipValueFormatter = this.tooltipValueFormatter.bind(this);\n this.handleWithTrendChange = this.handleWithTrendChange.bind(this);\n }\n\n public componentDidUpdate(prevProps: T) {\n if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {\n this.setState({ dataDefinitions: this.getDefaultDataDefinitions() });\n }\n }\n\n protected getDefaultDataDefinitions(): Array<LegendItem & { columns: React.ReactNode[] }> {\n const { data, legendProps } = this.props;\n\n return this.dataKeys.map((key, index) => {\n const legendData = legendProps?.legendMap?.[key];\n\n const dataDefinition: LegendItem & { columns: React.ReactNode[] } = {\n id: key,\n label: legendData?.label ?? key,\n icon: legendData?.icon ?? undefined,\n checked: legendData?.defaultChecked ?? true,\n color: this.resolveColor(key, index),\n columns: [],\n };\n\n if (legendData?.additionalInfo || legendData?.count) {\n dataDefinition.additionalInfo = legendData.additionalInfo\n ? { label: legendData.additionalInfo }\n : legendData.count\n ? { count: legendData.count }\n : undefined;\n }\n\n if (legendData && 'columns' in legendData) {\n dataDefinition.columns = legendData.columns || [];\n } else if (!Array.isArray(data)) {\n let value: number | undefined = undefined;\n let dataValue = data[key];\n\n if (data instanceof Map) {\n dataValue = data.get(key);\n }\n\n if (dataValue !== interpolateValue) {\n value = Number(dataValue);\n }\n\n const total = Object.values(data).reduce<number>((sum, i) => {\n if (i !== interpolateValue) {\n return sum + Number(i);\n }\n\n return sum;\n }, 0);\n const percent = value !== undefined ? ((value / total) * 100).toFixed(2) : undefined;\n\n dataDefinition.columns = [\n <Text key={`${key}_percent`} use='secondary'>\n {percent !== undefined ? `${percent}%` : ''}\n </Text>,\n <Text key={`${key}_value`} use={value ? 'primary' : 'secondary'}>\n {value ?? 'n/a'}\n </Text>,\n ];\n }\n\n return dataDefinition;\n });\n }\n\n protected abstract get xScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;\n protected abstract get yScale(): ScaleBand<any> | ScaleLinear<any, any> | ScaleTime<any, any>;\n\n protected abstract getLegendAriaLabel(): string;\n protected abstract renderChart(): React.ReactNode;\n protected abstract renderTooltip(): React.ReactNode;\n\n protected get dataKeys(): string[] {\n const { data, groupKey } = this.props;\n\n let dataKeys: string[];\n\n if (Array.isArray(data) && groupKey) {\n dataKeys = Object.keys(data[0]).filter((key) => key !== groupKey);\n } else {\n dataKeys = Object.keys(data);\n }\n\n return dataKeys;\n }\n\n protected get xTicks(): number[] | Date[] | undefined {\n const { data, invertAxis, xTicksCount, yTicksCount } = this.asProps;\n\n const scale = this.xScale;\n\n if (Array.isArray(data) && 'ticks' in scale) {\n if (invertAxis && yTicksCount) {\n return scale.ticks(yTicksCount);\n } else if (xTicksCount) {\n return scale.ticks(xTicksCount);\n }\n\n return undefined;\n }\n\n return undefined;\n }\n\n protected get yTicks(): number[] | Date[] | undefined {\n const { data, invertAxis, xTicksCount, yTicksCount } = this.asProps;\n\n const scale = this.yScale;\n\n if (Array.isArray(data) && 'ticks' in scale) {\n if (invertAxis && xTicksCount) {\n return scale.ticks(xTicksCount);\n } else if (yTicksCount) {\n return scale.ticks(yTicksCount);\n }\n\n return undefined;\n }\n\n return undefined;\n }\n\n protected get flatValues(): Set<number> {\n const { data, groupKey } = this.asProps;\n const values: any[] = Array.isArray(data) ? data : Object.values(data);\n\n const flatValues = values.reduce<Set<number>>((result, item) => {\n if (!groupKey && typeof item === 'number') {\n result.add(item);\n } else {\n Object.entries(item).forEach(([key, value]) => {\n if (key !== groupKey && typeof value === 'number') {\n result.add(value);\n }\n });\n }\n\n return result;\n }, new Set());\n\n return flatValues;\n }\n\n protected get maxStackedValue(): number {\n const { data, groupKey } = this.asProps;\n\n if (!Array.isArray(data)) {\n const max = Object.values(data).reduce<number>((sum, val) => {\n if (typeof val === 'number') {\n sum = sum + val;\n }\n\n return sum;\n }, 0);\n\n return max;\n }\n\n const max = data.reduce((max, item) => {\n const barSum = Object.entries(item).reduce<number>((sum, [key, val]) => {\n if (key === groupKey) {\n return sum;\n }\n\n if (typeof val === 'number') {\n return sum + val;\n }\n\n if (val instanceof Date && !Number.isNaN(val.getMilliseconds())) {\n return sum + val.getMilliseconds();\n }\n\n return sum;\n }, 0);\n\n if (barSum > max) {\n max = barSum;\n }\n\n return max;\n }, 0);\n\n return max;\n }\n\n protected totalValue(data: ObjectData): number {\n const { dataDefinitions } = this.state;\n\n const total = dataDefinitions.reduce((sum, legendItem) => {\n const item = data[legendItem.id];\n\n if (typeof item === 'number') {\n return sum + item;\n }\n\n if (item instanceof Date && !Number.isNaN(item.getMilliseconds())) {\n return sum + item.getMilliseconds();\n }\n\n return sum;\n }, 0);\n\n return total;\n }\n\n protected getValueScale(values: number[]): number {\n const max = Math.max(...values);\n const min = Math.min(...values);\n\n const avg = (max + min) / 2;\n const count = Math.round(Math.log10(avg));\n\n const valueScale = 100 / 10 ** count;\n\n return valueScale;\n }\n\n protected setHighlightedLine(index: number) {\n this.setState({ highlightedLine: index });\n }\n\n protected handleChangeVisible(id: string, isVisible: boolean) {\n this.setState((prevState) => {\n const dataDefinitions = prevState.dataDefinitions.map((item) => {\n if (item.id === id) {\n item.checked = isVisible;\n }\n\n return item;\n });\n\n return { dataDefinitions };\n });\n }\n\n protected handleWithTrendChange(isVisible: boolean) {\n this.setState({ withTrend: isVisible });\n }\n\n protected handleMouseEnter(id: string) {\n this.setHighlightedLine(this.state.dataDefinitions.findIndex((line) => line.id === id));\n }\n\n protected handleMouseLeave() {\n this.setHighlightedLine(-1);\n }\n\n protected resolveColor(id: string, index: number) {\n return this.props.colorMap?.[id] ?? `chart-palette-order-${index + 1}`;\n }\n\n protected tooltipValueFormatter(\n value?: string | number | typeof interpolateValue | Date,\n ): string {\n const { tooltipValueFormatter } = this.asProps;\n\n if (tooltipValueFormatter) {\n return tooltipValueFormatter(value);\n }\n\n if (value === undefined || value === interpolateValue) {\n return 'n/a';\n }\n\n if (value === null) {\n return '0';\n }\n\n if (value instanceof Date) {\n return value.toDateString();\n }\n\n return value.toString();\n }\n\n protected defaultLegendProps(): Partial<BaseLegendProps> {\n return {\n legendType: 'Flex',\n };\n }\n\n protected renderLegend() {\n const { legendProps, direction, showLegend, patterns } = this.asProps;\n\n if (\n !showLegend ||\n // we hide Legend for one item on chart except not manually set to show.\n (this.dataKeys.length === 1 && showLegend === true)\n ) {\n return null;\n }\n\n const { dataDefinitions, withTrend } = this.state;\n const lProps = {\n ...this.defaultLegendProps(),\n ...legendProps,\n };\n\n const commonLegendProps: LegendFlexProps | LegendTableProps = {\n 'dataHints': this.dataHints,\n 'items': dataDefinitions,\n 'size': lProps.size,\n 'shape': lProps.shape,\n 'w': lProps.w,\n 'h': lProps.h,\n patterns,\n 'direction':\n lProps.direction ?? (direction === 'row' || direction === 'row-reverse' ? 'column' : 'row'),\n 'onChangeVisibleItem': lProps.disableSelectItems\n ? undefined\n : callAllEventHandlers(lProps.onChangeVisibleItem, this.handleChangeVisible),\n 'onMouseEnterItem': lProps.disableHoverItems\n ? undefined\n : callAllEventHandlers(lProps.onMouseEnterItem, this.handleMouseEnter),\n 'onMouseLeaveItem': lProps.disableHoverItems\n ? undefined\n : callAllEventHandlers(lProps.onMouseLeaveItem, this.handleMouseLeave),\n 'aria-label': this.getLegendAriaLabel(),\n };\n\n if (lProps.legendType === 'Table') {\n return <ChartLegendTable {...(commonLegendProps as LegendTableProps)} />;\n }\n\n if ('withTrend' in lProps) {\n const flexLegendProps = {\n ...commonLegendProps,\n withTrend: true,\n trendLabel: lProps.trendLabel,\n trendIsVisible: withTrend,\n onTrendIsVisibleChange: this.handleWithTrendChange,\n };\n\n return <ChartLegend {...(flexLegendProps as LegendFlexProps)} />;\n }\n\n return <ChartLegend {...(commonLegendProps as LegendFlexProps)} />;\n }\n\n protected renderAxis(): React.ReactNode {\n const { invertAxis, showXAxis, showYAxis, data, axisXValueFormatter, axisYValueFormatter } =\n this.asProps;\n\n if (!Array.isArray(data)) {\n return null;\n }\n\n const xTicks = this.xTicks;\n const yTicks = this.yTicks;\n\n const childrenX = axisXValueFormatter\n ? ({ value }: any) => ({ children: axisXValueFormatter(value) })\n : undefined;\n const childrenY = axisYValueFormatter\n ? ({ value }: any) => ({ children: axisYValueFormatter(value) })\n : undefined;\n\n return (\n <>\n {showYAxis && (\n <YAxis>\n {yTicks\n ? (\n <YAxis.Ticks ticks={yTicks}>{childrenY}</YAxis.Ticks>\n )\n : (\n <YAxis.Ticks>{childrenY}</YAxis.Ticks>\n )}\n {invertAxis !== true && (yTicks ? <YAxis.Grid ticks={yTicks} /> : <YAxis.Grid />)}\n </YAxis>\n )}\n\n {showXAxis && (\n <XAxis>\n {xTicks\n ? (\n <XAxis.Ticks ticks={xTicks}>{childrenX}</XAxis.Ticks>\n )\n : (\n <XAxis.Ticks>{childrenX}</XAxis.Ticks>\n )}\n {invertAxis === true && (xTicks ? <XAxis.Grid ticks={xTicks} /> : <XAxis.Grid />)}\n </XAxis>\n )}\n </>\n );\n }\n\n public render() {\n const SChart = Root;\n const { styles, plotWidth, plotHeight, data, patterns, a11yAltTextConfig, duration } =\n this.asProps;\n\n const { extractedAriaProps } = extractAriaProps(this.asProps);\n\n return sstyled(styles)(\n <SChart render={Flex} gap={5} __excludeProps={['data']} role='group'>\n {this.renderLegend()}\n <Plot\n data={data}\n scale={[this.xScale, this.yScale]}\n width={plotWidth}\n height={plotHeight}\n dataHints={this.dataHints}\n a11yAltTextConfig={a11yAltTextConfig}\n patterns={patterns}\n duration={duration}\n {...extractedAriaProps}\n >\n {this.renderAxis()}\n {this.renderTooltip()}\n {this.renderChart()}\n </Plot>\n </SChart>,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;A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oF,aAAA,CAAC8G,MAAM,EAAAD,KAAA,CAAAa,EAAA,eAAApD,cAAA,qBAAAhK,KAAA,CAAAqN,WAAA;QAAA,OAAoB,CAAC;QAAA,kBAAkB,CAAC,MAAM,CAAC;QAAA,QAAO;MAAO,GAAAf,IAAA,KACjE,IAAI,CAAC/C,YAAY,CAAC,CAAC,eACpBjJ,MAAA,YAAAoF,aAAA,CAAClF,CAAA,CAAA8M,IAAI,EAAAf,KAAA,CAAAa,EAAA,aAAApD,cAAA;QAAA,QACG9G,IAAI;QAAA,SACH,CAAC,IAAI,CAACsD,MAAM,EAAE,IAAI,CAACG,MAAM,CAAC;QAAA,SAC1BiG,SAAS;QAAA,UACRC,UAAU;QAAA,aACP,IAAI,CAAC3C,SAAS;QAAA,qBACN4C,iBAAiB;QAAA,YAC1BlD,QAAQ;QAAA,YACRmD;MAAQ,GACdG,kBAAkB,IAErB,IAAI,CAAC/B,UAAU,CAAC,CAAC,EACjB,IAAI,CAACoC,aAAa,CAAC,CAAC,EACpB,IAAI,CAACC,WAAW,CAAC,CACd,CACA,CAAC;IAEb;EAAC;AAAA,EAncOC,eAAS;AAAA,IAAA3L,gBAAA,aAJGN,aAAa,WAKX,CAAC,CAAC;AAAA,IAAAM,gBAAA,aALJN,aAAa,kBAM0B;EACzDkI,SAAS,EAAE,QAAQ;EACnB2B,SAAS,EAAE,IAAI;EACfC,SAAS,EAAE,IAAI;EACfoC,WAAW,EAAE,IAAI;EACjB/D,UAAU,EAAE;AACd,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractChart.type.js","names":[],"sources":["../../../../src/component/Chart/AbstractChart.type.ts"],"sourcesContent":["import React from 'react';\nimport { FlexProps } from '@semcore/flex-box';\nimport { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\nimport Icon from '@semcore/icon';\nimport { BaseChartLegendProps } from '../ChartLegend/BaseLegend.type';\nimport { TrendProps } from '../ChartLegend/LegendFlex/LegendFlex.type';\nimport { PatternsConfig } from '../../Pattern';\n// @ts-ignore\nimport { PlotSummarizerConfig } from '../../Plot';\nimport { Intergalactic } from '@semcore/core';\n\nexport type BaseLegendProps = BaseChartLegendProps & {\n /**\n * Disable hover (for transition items legend of each not hovered)\n */\n disableHoverItems?: boolean;\n /**\n * Disable selectable of data items by checkboxes in Legend\n */\n disableSelectItems?: boolean;\n} & (\n | (TrendProps & {\n /**\n * How to render Legend - Flex view. Just list of legend items\n */\n legendType?: never | 'Flex';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Flex'>;\n })\n | {\n /**\n * How to render Legend - Table view. Table of legend items with some additional information in columns\n */\n legendType: 'Table';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Table'>;\n }\n );\n\nexport type ObjectData = Record<string, unknown>;\nexport type ListData = ObjectData[];\n\n/**\n * Chart, Legend must have an accessible names (aria-name).\n * It should describe chart or legend content.\n */\nexport type AriaNameProps = Intergalactic.RequireAtLeastOne<{\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n title?: string;\n}>;\n\nexport type BaseChartProps<T extends ListData | ObjectData> = FlexProps &\n AriaNameProps & {\n /**\n * Chart data. For all charts except Donut(Pie), Radar and Venn should be an Array\n */\n data: T;\n /**\n * Width of plot\n */\n plotWidth: number;\n /**\n * Height of plot\n */\n plotHeight: number;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /**\n * Margin (for Y axis points) from left side of chart container to Y axis\n */\n marginY?: number;\n /**\n * Margin (for X axis points) from bottom of chart container to X axis\n */\n marginX?: number;\n /**\n * invert axis and show horizontal charts (only for Bars!)\n */\n invertAxis?: boolean;\n\n /**\n * Show X axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showXAxis?: boolean;\n /**\n * Show Y axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showYAxis?: boolean;\n /**\n * Map with colors for data items\n */\n colorMap?: Record<string, string>;\n /**\n * Show tooltip's.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Show sum of values for selected point in tooltip\n */\n showTotalInTooltip?: boolean;\n /**\n * Scale for xAxis (see more in d3-scale)\n */\n xScale?: unknown;\n /**\n * Scale for yAxis (see more in d3-scale)\n */\n yScale?: unknown;\n /**\n * Count of ticks for X axis\n */\n xTicksCount?: number;\n /**\n * Count of ticks for Y axis\n */\n yTicksCount?: number;\n /**\n * Group key for all array-based charts (for get keys of items for legend except that group key)\n */\n groupKey?: string;\n /**\n * function for format axis item text\n */\n axisXValueFormatter?: (value: unknown) => string;\n axisYValueFormatter?: (value: unknown) => string;\n /**\n * Function for format text for tooltip\n */\n tooltipValueFormatter?: (value?: unknown) => string;\n /**\n * Config for a11y summary\n */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /**\n * Animations duration, set 0 to disable animations\n */\n duration?: number;\n } /**\n * By default, we show the Legend for all charts with more the one data item.\n * For hide the Legend, you should set showLegend prop to `false`.\n */ & (\n | {\n /**\n * Don't show legend\n */\n showLegend?: false;\n legendProps?: never;\n }\n | {\n /**\n * By default (if showLegend don't set), for one data item on chart,\n * Legend component will be hide, and show for more then 1 data item.\n * If set `true` - Legend component will show always.\n */\n showLegend?: true;\n /**\n * Props for Legend\n */\n legendProps?: Partial<BaseLegendProps>;\n }\n );\n\ntype LegendDataMap<T extends 'Flex' | 'Table'> = Record<\n LegendItemKey,\n {\n /**\n * Custom label for legend item (by default use keys from data item object)\n */\n label?: string;\n /**\n * Additional text after label\n */\n additionalInfo?: string;\n /**\n * Count after label\n */\n count?: number;\n /**\n * Custom Icon\n */\n icon?: typeof Icon;\n /**\n * Flag for uncheck some items by default\n */\n defaultChecked?: boolean;\n } & (T extends 'Table' ? { columns?: React.ReactNode[] } : { columns?: never })\n>;\n"],"mappings":""}
1
+ {"version":3,"file":"AbstractChart.type.js","names":[],"sources":["../../../../src/component/Chart/AbstractChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { FlexProps } from '@semcore/flex-box';\nimport type Icon from '@semcore/icon';\nimport type React from 'react';\n\nimport type { PatternsConfig } from '../../Pattern';\n// @ts-ignore\nimport type { PlotSummarizerConfig } from '../../Plot';\nimport type { BaseChartLegendProps } from '../ChartLegend/BaseLegend.type';\nimport type { TrendProps } from '../ChartLegend/LegendFlex/LegendFlex.type';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\nexport type BaseLegendProps = BaseChartLegendProps & {\n /**\n * Disable hover (for transition items legend of each not hovered)\n */\n disableHoverItems?: boolean;\n /**\n * Disable selectable of data items by checkboxes in Legend\n */\n disableSelectItems?: boolean;\n} & (\n | (TrendProps & {\n /**\n * How to render Legend - Flex view. Just list of legend items\n */\n legendType?: never | 'Flex';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Flex'>;\n })\n | {\n /**\n * How to render Legend - Table view. Table of legend items with some additional information in columns\n */\n legendType: 'Table';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Table'>;\n }\n );\n\nexport type ObjectData = Record<string, unknown>;\nexport type ListData = ObjectData[];\n\n/**\n * Chart, Legend must have an accessible names (aria-name).\n * It should describe chart or legend content.\n */\nexport type AriaNameProps = Intergalactic.RequireAtLeastOne<{\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'title'?: string;\n}>;\n\nexport type BaseChartProps<T extends ListData | ObjectData> = FlexProps &\n AriaNameProps & {\n /**\n * Chart data. For all charts except Donut(Pie), Radar and Venn should be an Array\n */\n data: T;\n /**\n * Width of plot\n */\n plotWidth: number;\n /**\n * Height of plot\n */\n plotHeight: number;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /**\n * Margin (for Y axis points) from left side of chart container to Y axis\n */\n marginY?: number;\n /**\n * Margin (for X axis points) from bottom of chart container to X axis\n */\n marginX?: number;\n /**\n * invert axis and show horizontal charts (only for Bars!)\n */\n invertAxis?: boolean;\n\n /**\n * Show X axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showXAxis?: boolean;\n /**\n * Show Y axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showYAxis?: boolean;\n /**\n * Map with colors for data items\n */\n colorMap?: Record<string, string>;\n /**\n * Show tooltip's.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Show sum of values for selected point in tooltip\n */\n showTotalInTooltip?: boolean;\n /**\n * Scale for xAxis (see more in d3-scale)\n */\n xScale?: unknown;\n /**\n * Scale for yAxis (see more in d3-scale)\n */\n yScale?: unknown;\n /**\n * Count of ticks for X axis\n */\n xTicksCount?: number;\n /**\n * Count of ticks for Y axis\n */\n yTicksCount?: number;\n /**\n * Group key for all array-based charts (for get keys of items for legend except that group key)\n */\n groupKey?: string;\n /**\n * function for format axis item text\n */\n axisXValueFormatter?: (value: unknown) => string;\n axisYValueFormatter?: (value: unknown) => string;\n /**\n * Function for format text for tooltip\n */\n tooltipValueFormatter?: (value?: unknown) => string;\n /**\n * Config for a11y summary\n */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /**\n * Animations duration, set 0 to disable animations\n */\n duration?: number;\n } /**\n * By default, we show the Legend for all charts with more the one data item.\n * For hide the Legend, you should set showLegend prop to `false`.\n */ & (\n | {\n /**\n * Don't show legend\n */\n showLegend?: false;\n legendProps?: never;\n }\n | {\n /**\n * By default (if showLegend don't set), for one data item on chart,\n * Legend component will be hide, and show for more then 1 data item.\n * If set `true` - Legend component will show always.\n */\n showLegend?: true;\n /**\n * Props for Legend\n */\n legendProps?: Partial<BaseLegendProps>;\n }\n );\n\ntype LegendDataMap<T extends 'Flex' | 'Table'> = Record<\n LegendItemKey,\n {\n /**\n * Custom label for legend item (by default use keys from data item object)\n */\n label?: string;\n /**\n * Additional text after label\n */\n additionalInfo?: string;\n /**\n * Count after label\n */\n count?: number;\n /**\n * Custom Icon\n */\n icon?: typeof Icon;\n /**\n * Flag for uncheck some items by default\n */\n defaultChecked?: boolean;\n } & (T extends 'Table' ? { columns?: React.ReactNode[] } : { columns?: never })\n>;\n"],"mappings":"","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
@@ -8,29 +8,30 @@ exports.AreaChart = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
11
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
+ var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
12
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
+ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
13
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
15
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- var _react = _interopRequireDefault(require("react"));
17
17
  var _core = require("@semcore/core");
18
+ var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
19
+ var _flexBox = require("@semcore/flex-box");
20
+ var _typography = require("@semcore/typography");
18
21
  var _d3Scale = require("d3-scale");
22
+ var _react = _interopRequireDefault(require("react"));
19
23
  var _ = require("../..");
20
24
  var _AbstractChart2 = require("./AbstractChart");
21
- var _flexBox = require("@semcore/flex-box");
22
- var _typography = require("@semcore/typography");
23
25
  var _intergalacticDynamicLocales = require("../../translations/__intergalactic-dynamic-locales");
24
- var _i18nEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/i18nEnhance"));
25
- // @ts-ignore
26
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
27
+ function _superPropGet(t, o, e, r) { var p = (0, _get2["default"])((0, _getPrototypeOf2["default"])(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } // @ts-ignore
26
28
  var AreaChartComponent = /*#__PURE__*/function (_AbstractChart) {
27
- (0, _inherits2["default"])(AreaChartComponent, _AbstractChart);
28
- var _super = (0, _createSuper2["default"])(AreaChartComponent);
29
29
  function AreaChartComponent() {
30
30
  (0, _classCallCheck2["default"])(this, AreaChartComponent);
31
- return _super.apply(this, arguments);
31
+ return _callSuper(this, AreaChartComponent, arguments);
32
32
  }
33
- (0, _createClass2["default"])(AreaChartComponent, [{
33
+ (0, _inherits2["default"])(AreaChartComponent, _AbstractChart);
34
+ return (0, _createClass2["default"])(AreaChartComponent, [{
34
35
  key: "xScale",
35
36
  get: function get() {
36
37
  var _this$asProps = this.asProps,
@@ -59,15 +60,13 @@ var AreaChartComponent = /*#__PURE__*/function (_AbstractChart) {
59
60
  _this$asProps2$margin = _this$asProps2.marginX,
60
61
  marginX = _this$asProps2$margin === void 0 ? 24 : _this$asProps2$margin,
61
62
  plotHeight = _this$asProps2.plotHeight,
62
- stacked = _this$asProps2.stacked,
63
- data = _this$asProps2.data,
64
- groupKey = _this$asProps2.groupKey;
63
+ stacked = _this$asProps2.stacked;
65
64
  if (yScale) {
66
65
  return yScale;
67
66
  }
68
- var flatValues = (0, _get2["default"])((0, _getPrototypeOf2["default"])(AreaChartComponent.prototype), "flatValues", this);
67
+ var flatValues = _superPropGet(AreaChartComponent, "flatValues", this, 1);
69
68
  var min = Math.min.apply(Math, (0, _toConsumableArray2["default"])(flatValues));
70
- var max = stacked ? (0, _get2["default"])((0, _getPrototypeOf2["default"])(AreaChartComponent.prototype), "maxStackedValue", this) : Math.max.apply(Math, (0, _toConsumableArray2["default"])(flatValues));
69
+ var max = stacked ? _superPropGet(AreaChartComponent, "maxStackedValue", this, 1) : Math.max.apply(Math, (0, _toConsumableArray2["default"])(flatValues));
71
70
  return (0, _d3Scale.scaleLinear)().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
72
71
  }
73
72
  }, {
@@ -161,10 +160,8 @@ var AreaChartComponent = /*#__PURE__*/function (_AbstractChart) {
161
160
  });
162
161
  }
163
162
  }]);
164
- return AreaChartComponent;
165
163
  }(_AbstractChart2.AbstractChart);
166
164
  (0, _defineProperty2["default"])(AreaChartComponent, "displayName", 'Chart.Area');
167
165
  (0, _defineProperty2["default"])(AreaChartComponent, "enhance", [(0, _i18nEnhance["default"])(_intergalacticDynamicLocales.localizedMessages)]);
168
- var AreaChart = (0, _core.createComponent)(AreaChartComponent);
169
- exports.AreaChart = AreaChart;
166
+ var AreaChart = exports.AreaChart = (0, _core.createComponent)(AreaChartComponent);
170
167
  //# sourceMappingURL=AreaChart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.js","names":["_react","_interopRequireDefault","require","_core","_d3Scale","_","_AbstractChart2","_flexBox","_typography","_intergalacticDynamicLocales","_i18nEnhance","AreaChartComponent","_AbstractChart","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","get","_this$asProps","asProps","xScale","_this$asProps$marginY","marginY","plotWidth","data","groupKey","testItem","range","plotPadding","domain","minMax","Date","Number","isNaN","getMilliseconds","scaleTime","scaleLinear","_this$asProps2","yScale","_this$asProps2$margin","marginX","plotHeight","stacked","flatValues","_get2","_getPrototypeOf2","prototype","min","Math","_toConsumableArray2","max","value","renderChart","_this$asProps3","curve","showDots","_this$state","state","dataDefinitions","highlightedLine","createElement","StackedArea","x","map","item","index","checked","Area","y","id","color","transparent","Dots","display","renderTooltip","_this","_this$asProps4","showTotalInTooltip","showTooltip","HoverLine","Tooltip","wMin","_ref","_dataItem$groupKey","xIndex","dataItem","total","totalValue","children","Fragment","Title","toString","Flex","justifyContent","Dot","mr","label","Text","bold","tooltipValueFormatter","mt","Box","getLegendAriaLabel","getI18nText","chartType","AbstractChart","_defineProperty2","i18nEnhance","localizedMessages","AreaChart","createComponent","exports"],"sources":["../../../../src/component/Chart/AreaChart.tsx"],"sourcesContent":["import React from 'react';\nimport { createComponent } from '@semcore/core';\nimport { ScaleLinear, scaleLinear, scaleTime } from 'd3-scale';\n// @ts-ignore\nimport { Area, minMax, HoverLine, StackedArea } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport { AreaChartData, AreaChartProps, AreaChartType } from './AreaChart.type';\nimport { Flex, Box } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\n\nclass AreaChartComponent extends AbstractChart<\n AreaChartData,\n AreaChartProps,\n typeof AreaChartComponent.enhance\n> {\n static displayName = 'Chart.Area';\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n get xScale() {\n const { xScale, marginY = 40, plotWidth, data, groupKey } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n const testItem = data[0][groupKey];\n const range = [marginY, plotWidth - this.plotPadding];\n const domain = minMax(data, groupKey);\n\n if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {\n return scaleTime(domain, range);\n }\n\n return scaleLinear(domain, range);\n }\n\n get yScale(): ScaleLinear<any, any> {\n const { yScale, marginX = 24, plotHeight, stacked, data, groupKey } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n const flatValues = super.flatValues;\n const min = Math.min(...flatValues);\n const max = stacked ? super.maxStackedValue : Math.max(...flatValues);\n\n return scaleLinear()\n .range([plotHeight - marginX, this.plotPadding])\n .domain([min, max]);\n }\n\n renderChart() {\n const { groupKey, curve, showDots, stacked } = this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n\n if (stacked) {\n return (\n <StackedArea x={groupKey}>\n {dataDefinitions.map((item, index) => {\n return (\n item.checked && (\n <StackedArea.Area\n x={groupKey}\n y={item.id}\n key={item.id}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n curve={curve}\n >\n {showDots && <StackedArea.Area.Dots display />}\n </StackedArea.Area>\n )\n );\n })}\n </StackedArea>\n );\n }\n\n return dataDefinitions.map((item, index) => {\n return (\n item.checked && (\n <Area\n x={groupKey}\n y={item.id}\n key={item.id}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n curve={curve}\n >\n {showDots && <Area.Dots display />}\n </Area>\n )\n );\n });\n }\n\n renderTooltip() {\n const { data, groupKey, showTotalInTooltip, showTooltip } = this.asProps;\n const { dataDefinitions } = this.state;\n\n if (!showTooltip) {\n return null;\n }\n\n return (\n <HoverLine.Tooltip x={groupKey} wMin={100}>\n {({ xIndex }: any) => {\n const dataItem = data[xIndex];\n const total = this.totalValue(dataItem);\n\n return {\n children: (\n <>\n <HoverLine.Tooltip.Title>{dataItem[groupKey]?.toString()}</HoverLine.Tooltip.Title>\n\n {dataDefinitions.map((item) => {\n return (\n item.checked && (\n <Flex justifyContent='space-between' key={item.id}>\n <HoverLine.Tooltip.Dot mr={4} color={item.color}>\n {item.label}\n </HoverLine.Tooltip.Dot>\n <Text bold>{this.tooltipValueFormatter(dataItem[item.id])}</Text>\n </Flex>\n )\n );\n })}\n\n {showTotalInTooltip === true && (\n <Flex mt={2} justifyContent='space-between'>\n <Box mr={4}>Total</Box>\n <Text bold>{total}</Text>\n </Flex>\n )}\n </>\n ),\n };\n }}\n </HoverLine.Tooltip>\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart',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A,EAED,SAAAmD,mBAAA,EAAuC;MACrC,OAAO,IAAI,CAACnF,OAAO,CAACoF,WAAW,CAAC,gBAAgB,EAAE;QAAEC,SAAS,EAAE;MAAO,CAAC,CAAC;IAC1E;EAAC;EAAA,OAAAjG,kBAAA;AAAA,EAxI8BkG,6BAAa;AAAA,IAAAC,gBAAA,aAAxCnG,kBAAkB,iBAKD,YAAY;AAAA,IAAAmG,gBAAA,aAL7BnG,kBAAkB,aAOL,CAAC,IAAAoG,uBAAW,EAACC,8CAAiB,CAAC,CAAC;AAoI5C,IAAMC,SAAwB,GAAG,IAAAC,qBAAe,EAACvG,kBAAkB,CAAC;AAACwG,OAAA,CAAAF,SAAA,GAAAA,SAAA"}
1
+ {"version":3,"file":"AreaChart.js","names":["_core","require","_i18nEnhance","_interopRequireDefault","_flexBox","_typography","_d3Scale","_react","_","_AbstractChart2","_intergalacticDynamicLocales","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","_superPropGet","r","p","_get2","prototype","AreaChartComponent","_AbstractChart","_classCallCheck2","arguments","_inherits2","_createClass2","key","get","_this$asProps","asProps","xScale","_this$asProps$marginY","marginY","plotWidth","data","groupKey","testItem","range","plotPadding","domain","minMax","Date","Number","isNaN","getMilliseconds","scaleTime","scaleLinear","_this$asProps2","yScale","_this$asProps2$margin","marginX","plotHeight","stacked","flatValues","min","Math","_toConsumableArray2","max","value","renderChart","_this$asProps3","curve","showDots","_this$state","state","dataDefinitions","highlightedLine","createElement","StackedArea","x","map","item","index","checked","Area","y","id","color","transparent","Dots","display","renderTooltip","_this","_this$asProps4","showTotalInTooltip","showTooltip","HoverLine","Tooltip","wMin","_ref","_dataItem$groupKey","xIndex","dataItem","total","totalValue","children","Fragment","Title","toString","Flex","justifyContent","Dot","mr","label","Text","bold","tooltipValueFormatter","mt","Box","getLegendAriaLabel","getI18nText","chartType","AbstractChart","_defineProperty2","i18nEnhance","localizedMessages","AreaChart","exports","createComponent"],"sources":["../../../../src/component/Chart/AreaChart.tsx"],"sourcesContent":["import { createComponent } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport { Flex, Box } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\nimport { type ScaleLinear, scaleLinear, scaleTime } from 'd3-scale';\nimport React from 'react';\n\n// @ts-ignore\nimport { Area, minMax, HoverLine, StackedArea } from '../..';\nimport { AbstractChart } from './AbstractChart';\nimport type { AreaChartData, AreaChartProps, AreaChartType } from './AreaChart.type';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\n\nclass AreaChartComponent extends AbstractChart<\n AreaChartData,\n AreaChartProps,\n typeof AreaChartComponent.enhance\n> {\n static displayName = 'Chart.Area';\n\n static enhance = [i18nEnhance(localizedMessages)] as const;\n\n get xScale() {\n const { xScale, marginY = 40, plotWidth, data, groupKey } = this.asProps;\n\n if (xScale) {\n return xScale;\n }\n\n const testItem = data[0][groupKey];\n const range = [marginY, plotWidth - this.plotPadding];\n const domain = minMax(data, groupKey);\n\n if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {\n return scaleTime(domain, range);\n }\n\n return scaleLinear(domain, range);\n }\n\n get yScale(): ScaleLinear<any, any> {\n const { yScale, marginX = 24, plotHeight, stacked } = this.asProps;\n\n if (yScale) {\n return yScale;\n }\n\n const flatValues = super.flatValues;\n const min = Math.min(...flatValues);\n const max = stacked ? super.maxStackedValue : Math.max(...flatValues);\n\n return scaleLinear()\n .range([plotHeight - marginX, this.plotPadding])\n .domain([min, max]);\n }\n\n renderChart() {\n const { groupKey, curve, showDots, stacked } = this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n\n if (stacked) {\n return (\n <StackedArea x={groupKey}>\n {dataDefinitions.map((item, index) => {\n return (\n item.checked && (\n <StackedArea.Area\n x={groupKey}\n y={item.id}\n key={item.id}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n curve={curve}\n >\n {showDots && <StackedArea.Area.Dots display />}\n </StackedArea.Area>\n )\n );\n })}\n </StackedArea>\n );\n }\n\n return dataDefinitions.map((item, index) => {\n return (\n item.checked && (\n <Area\n x={groupKey}\n y={item.id}\n key={item.id}\n color={item.color}\n transparent={highlightedLine !== -1 && highlightedLine !== index}\n curve={curve}\n >\n {showDots && <Area.Dots display />}\n </Area>\n )\n );\n });\n }\n\n renderTooltip() {\n const { data, groupKey, showTotalInTooltip, showTooltip } = this.asProps;\n const { dataDefinitions } = this.state;\n\n if (!showTooltip) {\n return null;\n }\n\n return (\n <HoverLine.Tooltip x={groupKey} wMin={100}>\n {({ xIndex }: any) => {\n const dataItem = data[xIndex];\n const total = this.totalValue(dataItem);\n\n return {\n children: (\n <>\n <HoverLine.Tooltip.Title>{dataItem[groupKey]?.toString()}</HoverLine.Tooltip.Title>\n\n {dataDefinitions.map((item) => {\n return (\n item.checked && (\n <Flex justifyContent='space-between' key={item.id}>\n <HoverLine.Tooltip.Dot mr={4} color={item.color}>\n {item.label}\n </HoverLine.Tooltip.Dot>\n <Text bold>{this.tooltipValueFormatter(dataItem[item.id])}</Text>\n </Flex>\n )\n );\n })}\n\n {showTotalInTooltip === true && (\n <Flex mt={2} justifyContent='space-between'>\n <Box mr={4}>Total</Box>\n <Text bold>{total}</Text>\n </Flex>\n )}\n </>\n ),\n };\n }}\n </HoverLine.Tooltip>\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'Area' });\n }\n}\n\nexport const AreaChart: AreaChartType = createComponent(AreaChartComponent);\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAG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,IAAI;YAACC,IAAI;UAAA,GAAEZ,KAAY,CACpB,CAER;QAEN,CAAC;MACH,CACiB,CAAC;IAExB;EAAC;IAAAnE,GAAA;IAAAgC,KAAA,EAED,SAAUmD,kBAAkBA,CAAA,EAAW;MACrC,OAAO,IAAI,CAAChF,OAAO,CAACiF,WAAW,CAAC,gBAAgB,EAAE;QAAEC,SAAS,EAAE;MAAO,CAAC,CAAC;IAC1E;EAAC;AAAA,EAxI8BC,6BAAa;AAAA,IAAAC,gBAAA,aAAxC7F,kBAAkB,iBAKD,YAAY;AAAA,IAAA6F,gBAAA,aAL7B7F,kBAAkB,aAOL,CAAC,IAAA8F,uBAAW,EAACC,8CAAiB,CAAC,CAAC;AAoI5C,IAAMC,SAAwB,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,qBAAe,EAAClG,kBAAkB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"AreaChart.type.js","names":[],"sources":["../../../../src/component/Chart/AreaChart.type.ts"],"sourcesContent":["import { Intergalactic } from '@semcore/core';\nimport { Flex } from '@semcore/flex-box';\nimport { interpolateValue } from '../../utils';\nimport { ScaleLinear, ScaleTime } from 'd3-scale';\nimport { CurveFactory } from 'd3-shape';\nimport { BaseChartProps } from './AbstractChart.type';\n\nexport type AreaChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type AreaChartProps = BaseChartProps<AreaChartData> & {\n groupKey: string;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n showDots?: boolean;\n curve?: CurveFactory;\n stacked?: boolean;\n};\n\nexport type AreaChartType = Intergalactic.Component<typeof Flex, AreaChartProps>;\n"],"mappings":""}
1
+ {"version":3,"file":"AreaChart.type.js","names":[],"sources":["../../../../src/component/Chart/AreaChart.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type { ScaleLinear, ScaleTime } from 'd3-scale';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { BaseChartProps } from './AbstractChart.type';\nimport type { interpolateValue } from '../../utils';\n\nexport type AreaChartData = Array<Record<string, number | typeof interpolateValue | Date>>;\n\nexport type AreaChartProps = BaseChartProps<AreaChartData> & {\n groupKey: string;\n xScale?: ScaleLinear<any, any> | ScaleTime<any, any>;\n yScale?: ScaleLinear<any, any>;\n showDots?: boolean;\n curve?: CurveFactory;\n stacked?: boolean;\n};\n\nexport type AreaChartType = Intergalactic.Component<typeof Flex, AreaChartProps>;\n"],"mappings":"","ignoreList":[]}