@semcore/d3-chart 16.5.0 → 17.0.0-prerelease.8

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 (439) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/cjs/AnimatedClipPath.js +28 -41
  3. package/lib/cjs/AnimatedClipPath.js.map +1 -1
  4. package/lib/cjs/Area.js +187 -223
  5. package/lib/cjs/Area.js.map +1 -1
  6. package/lib/cjs/Axis.js +248 -327
  7. package/lib/cjs/Axis.js.map +1 -1
  8. package/lib/cjs/Bar.js +162 -185
  9. package/lib/cjs/Bar.js.map +1 -1
  10. package/lib/cjs/Bubble.js +219 -248
  11. package/lib/cjs/Bubble.js.map +1 -1
  12. package/lib/cjs/CompactHorizontalBar.js +448 -482
  13. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  14. package/lib/cjs/Donut.js +349 -396
  15. package/lib/cjs/Donut.js.map +1 -1
  16. package/lib/cjs/Dots.js +67 -86
  17. package/lib/cjs/Dots.js.map +1 -1
  18. package/lib/cjs/GroupBar.js +78 -93
  19. package/lib/cjs/GroupBar.js.map +1 -1
  20. package/lib/cjs/HorizontalBar.js +149 -167
  21. package/lib/cjs/HorizontalBar.js.map +1 -1
  22. package/lib/cjs/Hover.js +178 -207
  23. package/lib/cjs/Hover.js.map +1 -1
  24. package/lib/cjs/Line.js +182 -222
  25. package/lib/cjs/Line.js.map +1 -1
  26. package/lib/cjs/Pattern.js +124 -126
  27. package/lib/cjs/Pattern.js.map +1 -1
  28. package/lib/cjs/Plot.js +100 -126
  29. package/lib/cjs/Plot.js.map +1 -1
  30. package/lib/cjs/Radar.js +576 -681
  31. package/lib/cjs/Radar.js.map +1 -1
  32. package/lib/cjs/RadialTree.js +518 -571
  33. package/lib/cjs/RadialTree.js.map +1 -1
  34. package/lib/cjs/Reference.js +147 -178
  35. package/lib/cjs/Reference.js.map +1 -1
  36. package/lib/cjs/ResponsiveContainer.js +64 -82
  37. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  38. package/lib/cjs/ScatterPlot.js +169 -199
  39. package/lib/cjs/ScatterPlot.js.map +1 -1
  40. package/lib/cjs/StackBar.js +135 -177
  41. package/lib/cjs/StackBar.js.map +1 -1
  42. package/lib/cjs/StackedArea.js +60 -73
  43. package/lib/cjs/StackedArea.js.map +1 -1
  44. package/lib/cjs/Tooltip.js +193 -208
  45. package/lib/cjs/Tooltip.js.map +1 -1
  46. package/lib/cjs/Venn.js +182 -217
  47. package/lib/cjs/Venn.js.map +1 -1
  48. package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
  49. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  50. package/lib/cjs/a11y/PlotA11yModule.js +37 -97
  51. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  52. package/lib/cjs/a11y/PlotA11yView.js +97 -91
  53. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  54. package/lib/cjs/a11y/bezier.js +17 -23
  55. package/lib/cjs/a11y/bezier.js.map +1 -1
  56. package/lib/cjs/a11y/focus.js +16 -16
  57. package/lib/cjs/a11y/focus.js.map +1 -1
  58. package/lib/cjs/a11y/hints.js +72 -75
  59. package/lib/cjs/a11y/hints.js.map +1 -1
  60. package/lib/cjs/a11y/insights.js +354 -525
  61. package/lib/cjs/a11y/insights.js.map +1 -1
  62. package/lib/cjs/a11y/intl.js +5 -5
  63. package/lib/cjs/a11y/intl.js.map +1 -1
  64. package/lib/cjs/a11y/locale.js +12 -19
  65. package/lib/cjs/a11y/locale.js.map +1 -1
  66. package/lib/cjs/a11y/serialize.js +164 -203
  67. package/lib/cjs/a11y/serialize.js.map +1 -1
  68. package/lib/cjs/a11y/summarize.js +7 -6
  69. package/lib/cjs/a11y/summarize.js.map +1 -1
  70. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
  71. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  72. package/lib/cjs/a11y/translations/module/de.json +2 -2
  73. package/lib/cjs/a11y/translations/module/en.json +2 -2
  74. package/lib/cjs/a11y/translations/module/es.json +2 -2
  75. package/lib/cjs/a11y/translations/module/fr.json +2 -2
  76. package/lib/cjs/a11y/translations/module/it.json +2 -2
  77. package/lib/cjs/a11y/translations/module/ja.json +2 -2
  78. package/lib/cjs/a11y/translations/module/ko.json +2 -2
  79. package/lib/cjs/a11y/translations/module/nl.json +2 -2
  80. package/lib/cjs/a11y/translations/module/pl.json +2 -2
  81. package/lib/cjs/a11y/translations/module/pt.json +2 -2
  82. package/lib/cjs/a11y/translations/module/sv.json +2 -2
  83. package/lib/cjs/a11y/translations/module/tr.json +2 -2
  84. package/lib/cjs/a11y/translations/module/vi.json +2 -2
  85. package/lib/cjs/a11y/translations/module/zh.json +2 -2
  86. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +16 -16
  87. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  88. package/lib/cjs/color.js +1 -1
  89. package/lib/cjs/color.js.map +1 -1
  90. package/lib/cjs/component/Chart/AbstractChart.js +421 -466
  91. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  92. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  93. package/lib/cjs/component/Chart/AreaChart.js +97 -115
  94. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  95. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  96. package/lib/cjs/component/Chart/BarChart.js +229 -216
  97. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  98. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  99. package/lib/cjs/component/Chart/BubbleChart.js +114 -136
  100. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  101. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  102. package/lib/cjs/component/Chart/CigaretteChart.js +280 -305
  103. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  104. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
  105. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  106. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  107. package/lib/cjs/component/Chart/DonutChart.js +80 -95
  108. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  109. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  110. package/lib/cjs/component/Chart/HistogramChart.js +126 -148
  111. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  112. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  113. package/lib/cjs/component/Chart/LineChart.js +95 -113
  114. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  115. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  116. package/lib/cjs/component/Chart/RadarChart.js +84 -110
  117. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  118. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  119. package/lib/cjs/component/Chart/ScatterPlotChart.js +119 -143
  120. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  121. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  122. package/lib/cjs/component/Chart/VennChart.js +103 -122
  123. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  124. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  125. package/lib/cjs/component/Chart/index.js +2 -2
  126. package/lib/cjs/component/Chart/index.js.map +1 -1
  127. package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
  128. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  129. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  130. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +58 -70
  131. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  132. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  133. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +208 -221
  134. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  135. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  136. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  137. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
  138. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  139. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  140. package/lib/cjs/component/ChartLegend/index.js +4 -4
  141. package/lib/cjs/component/ChartLegend/index.js.map +1 -1
  142. package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
  143. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  144. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
  145. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
  146. package/lib/cjs/component/SvgElement.js +7 -7
  147. package/lib/cjs/component/SvgElement.js.map +1 -1
  148. package/lib/cjs/createElement.js +66 -65
  149. package/lib/cjs/createElement.js.map +1 -1
  150. package/lib/cjs/index.js +62 -62
  151. package/lib/cjs/style/axis.shadow.css +3 -0
  152. package/lib/cjs/style/plot.shadow.css +1 -3
  153. package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
  154. package/lib/cjs/style/plotA11yView.shadow.css +13 -26
  155. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +15 -15
  156. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  157. package/lib/cjs/types/Axis.d.js.map +1 -1
  158. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  159. package/lib/cjs/types/Hover.d.js.map +1 -1
  160. package/lib/cjs/types/Line.d.js.map +1 -1
  161. package/lib/cjs/types/Plot.d.js.map +1 -1
  162. package/lib/cjs/types/Radar.d.js.map +1 -1
  163. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  164. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  165. package/lib/cjs/types/Venn.d.js.map +1 -1
  166. package/lib/cjs/types/index.d.js +80 -80
  167. package/lib/cjs/types/index.d.js.map +1 -1
  168. package/lib/cjs/utils.js +122 -145
  169. package/lib/cjs/utils.js.map +1 -1
  170. package/lib/es6/AnimatedClipPath.js +24 -37
  171. package/lib/es6/AnimatedClipPath.js.map +1 -1
  172. package/lib/es6/Area.js +179 -215
  173. package/lib/es6/Area.js.map +1 -1
  174. package/lib/es6/Axis.js +242 -321
  175. package/lib/es6/Axis.js.map +1 -1
  176. package/lib/es6/Bar.js +154 -177
  177. package/lib/es6/Bar.js.map +1 -1
  178. package/lib/es6/Bubble.js +206 -235
  179. package/lib/es6/Bubble.js.map +1 -1
  180. package/lib/es6/CompactHorizontalBar.js +433 -467
  181. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  182. package/lib/es6/Donut.js +337 -384
  183. package/lib/es6/Donut.js.map +1 -1
  184. package/lib/es6/Dots.js +60 -79
  185. package/lib/es6/Dots.js.map +1 -1
  186. package/lib/es6/GroupBar.js +74 -89
  187. package/lib/es6/GroupBar.js.map +1 -1
  188. package/lib/es6/HorizontalBar.js +141 -159
  189. package/lib/es6/HorizontalBar.js.map +1 -1
  190. package/lib/es6/Hover.js +174 -203
  191. package/lib/es6/Hover.js.map +1 -1
  192. package/lib/es6/Line.js +173 -213
  193. package/lib/es6/Line.js.map +1 -1
  194. package/lib/es6/Pattern.js +68 -74
  195. package/lib/es6/Pattern.js.map +1 -1
  196. package/lib/es6/Plot.js +95 -121
  197. package/lib/es6/Plot.js.map +1 -1
  198. package/lib/es6/Radar.js +554 -659
  199. package/lib/es6/Radar.js.map +1 -1
  200. package/lib/es6/RadialTree.js +500 -553
  201. package/lib/es6/RadialTree.js.map +1 -1
  202. package/lib/es6/Reference.js +140 -171
  203. package/lib/es6/Reference.js.map +1 -1
  204. package/lib/es6/ResponsiveContainer.js +58 -76
  205. package/lib/es6/ResponsiveContainer.js.map +1 -1
  206. package/lib/es6/ScatterPlot.js +161 -191
  207. package/lib/es6/ScatterPlot.js.map +1 -1
  208. package/lib/es6/StackBar.js +130 -172
  209. package/lib/es6/StackBar.js.map +1 -1
  210. package/lib/es6/StackedArea.js +56 -69
  211. package/lib/es6/StackedArea.js.map +1 -1
  212. package/lib/es6/Tooltip.js +183 -198
  213. package/lib/es6/Tooltip.js.map +1 -1
  214. package/lib/es6/Venn.js +169 -204
  215. package/lib/es6/Venn.js.map +1 -1
  216. package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
  217. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  218. package/lib/es6/a11y/PlotA11yModule.js +35 -95
  219. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  220. package/lib/es6/a11y/PlotA11yView.js +89 -84
  221. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  222. package/lib/es6/a11y/bezier.js +16 -23
  223. package/lib/es6/a11y/bezier.js.map +1 -1
  224. package/lib/es6/a11y/focus.js +15 -16
  225. package/lib/es6/a11y/focus.js.map +1 -1
  226. package/lib/es6/a11y/hints.js +67 -73
  227. package/lib/es6/a11y/hints.js.map +1 -1
  228. package/lib/es6/a11y/insights.js +353 -524
  229. package/lib/es6/a11y/insights.js.map +1 -1
  230. package/lib/es6/a11y/intl.js +4 -5
  231. package/lib/es6/a11y/intl.js.map +1 -1
  232. package/lib/es6/a11y/locale.js +11 -18
  233. package/lib/es6/a11y/locale.js.map +1 -1
  234. package/lib/es6/a11y/serialize.js +162 -203
  235. package/lib/es6/a11y/serialize.js.map +1 -1
  236. package/lib/es6/a11y/summarize.js +6 -6
  237. package/lib/es6/a11y/summarize.js.map +1 -1
  238. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
  239. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  240. package/lib/es6/a11y/translations/module/de.json +2 -2
  241. package/lib/es6/a11y/translations/module/en.json +2 -2
  242. package/lib/es6/a11y/translations/module/es.json +2 -2
  243. package/lib/es6/a11y/translations/module/fr.json +2 -2
  244. package/lib/es6/a11y/translations/module/it.json +2 -2
  245. package/lib/es6/a11y/translations/module/ja.json +2 -2
  246. package/lib/es6/a11y/translations/module/ko.json +2 -2
  247. package/lib/es6/a11y/translations/module/nl.json +2 -2
  248. package/lib/es6/a11y/translations/module/pl.json +2 -2
  249. package/lib/es6/a11y/translations/module/pt.json +2 -2
  250. package/lib/es6/a11y/translations/module/sv.json +2 -2
  251. package/lib/es6/a11y/translations/module/tr.json +2 -2
  252. package/lib/es6/a11y/translations/module/vi.json +2 -2
  253. package/lib/es6/a11y/translations/module/zh.json +2 -2
  254. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +15 -15
  255. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  256. package/lib/es6/color.js +1 -1
  257. package/lib/es6/color.js.map +1 -1
  258. package/lib/es6/component/Chart/AbstractChart.js +416 -462
  259. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  260. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  261. package/lib/es6/component/Chart/AreaChart.js +92 -111
  262. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  263. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  264. package/lib/es6/component/Chart/BarChart.js +225 -213
  265. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  266. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  267. package/lib/es6/component/Chart/BubbleChart.js +109 -132
  268. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  269. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  270. package/lib/es6/component/Chart/CigaretteChart.js +276 -301
  271. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  272. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
  273. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  274. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  275. package/lib/es6/component/Chart/DonutChart.js +74 -90
  276. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  277. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  278. package/lib/es6/component/Chart/HistogramChart.js +121 -144
  279. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  280. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  281. package/lib/es6/component/Chart/LineChart.js +90 -109
  282. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  283. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  284. package/lib/es6/component/Chart/RadarChart.js +80 -107
  285. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  286. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  287. package/lib/es6/component/Chart/ScatterPlotChart.js +113 -138
  288. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  289. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  290. package/lib/es6/component/Chart/VennChart.js +97 -117
  291. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  292. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  293. package/lib/es6/component/ChartLegend/BaseLegend.js +70 -104
  294. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  295. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  296. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +53 -65
  297. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  298. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  299. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +198 -211
  300. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  301. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  302. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  303. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
  304. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  305. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  306. package/lib/es6/component/Cigarette/Cigarette.js +108 -122
  307. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  308. package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
  309. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  310. package/lib/es6/component/SvgElement.js +4 -5
  311. package/lib/es6/component/SvgElement.js.map +1 -1
  312. package/lib/es6/createElement.js +55 -54
  313. package/lib/es6/createElement.js.map +1 -1
  314. package/lib/es6/style/axis.shadow.css +3 -0
  315. package/lib/es6/style/plot.shadow.css +1 -3
  316. package/lib/es6/style/plotA11yModule.shadow.css +10 -11
  317. package/lib/es6/style/plotA11yView.shadow.css +13 -26
  318. package/lib/es6/translations/__intergalactic-dynamic-locales.js +14 -14
  319. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  320. package/lib/es6/types/Axis.d.js.map +1 -1
  321. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  322. package/lib/es6/types/Hover.d.js.map +1 -1
  323. package/lib/es6/types/Line.d.js.map +1 -1
  324. package/lib/es6/types/Plot.d.js.map +1 -1
  325. package/lib/es6/types/Radar.d.js.map +1 -1
  326. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  327. package/lib/es6/types/Tooltip.d.js.map +1 -1
  328. package/lib/es6/types/Venn.d.js.map +1 -1
  329. package/lib/es6/utils.js +105 -144
  330. package/lib/es6/utils.js.map +1 -1
  331. package/lib/esm/AnimatedClipPath.mjs +24 -36
  332. package/lib/esm/Area.mjs +178 -149
  333. package/lib/esm/Axis.mjs +241 -242
  334. package/lib/esm/Bar.mjs +155 -137
  335. package/lib/esm/Bubble.mjs +205 -171
  336. package/lib/esm/CompactHorizontalBar.mjs +428 -383
  337. package/lib/esm/Donut.mjs +315 -266
  338. package/lib/esm/Dots.mjs +60 -49
  339. package/lib/esm/GroupBar.mjs +71 -75
  340. package/lib/esm/HorizontalBar.mjs +142 -120
  341. package/lib/esm/Hover.mjs +173 -163
  342. package/lib/esm/Line.mjs +174 -145
  343. package/lib/esm/Pattern.mjs +67 -63
  344. package/lib/esm/Plot.mjs +98 -95
  345. package/lib/esm/Radar.mjs +550 -498
  346. package/lib/esm/RadialTree.mjs +512 -416
  347. package/lib/esm/Reference.mjs +137 -122
  348. package/lib/esm/ResponsiveContainer.mjs +58 -69
  349. package/lib/esm/ScatterPlot.mjs +163 -162
  350. package/lib/esm/StackBar.mjs +126 -147
  351. package/lib/esm/StackedArea.mjs +53 -61
  352. package/lib/esm/Tooltip.mjs +185 -175
  353. package/lib/esm/Venn.mjs +170 -170
  354. package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
  355. package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
  356. package/lib/esm/a11y/PlotA11yView.mjs +99 -74
  357. package/lib/esm/a11y/bezier.mjs +16 -23
  358. package/lib/esm/a11y/focus.mjs +15 -16
  359. package/lib/esm/a11y/hints.mjs +65 -71
  360. package/lib/esm/a11y/insights.mjs +347 -495
  361. package/lib/esm/a11y/intl.mjs +4 -5
  362. package/lib/esm/a11y/locale.mjs +12 -14
  363. package/lib/esm/a11y/serialize.mjs +139 -152
  364. package/lib/esm/a11y/summarize.mjs +3 -3
  365. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
  366. package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
  367. package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
  368. package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
  369. package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
  370. package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
  371. package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
  372. package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
  373. package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
  374. package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
  375. package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
  376. package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
  377. package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
  378. package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
  379. package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
  380. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +1 -1
  381. package/lib/esm/color.mjs +1 -1
  382. package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
  383. package/lib/esm/component/Chart/AreaChart.mjs +92 -91
  384. package/lib/esm/component/Chart/BarChart.mjs +225 -177
  385. package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
  386. package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
  387. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
  388. package/lib/esm/component/Chart/DonutChart.mjs +74 -84
  389. package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
  390. package/lib/esm/component/Chart/LineChart.mjs +90 -89
  391. package/lib/esm/component/Chart/RadarChart.mjs +81 -97
  392. package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
  393. package/lib/esm/component/Chart/VennChart.mjs +98 -111
  394. package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
  395. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
  396. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
  397. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
  398. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
  399. package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
  400. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
  401. package/lib/esm/component/SvgElement.mjs +4 -4
  402. package/lib/esm/createElement.mjs +54 -37
  403. package/lib/esm/style/axis.shadow.css +3 -0
  404. package/lib/esm/style/plot.shadow.css +1 -3
  405. package/lib/esm/style/plotA11yModule.shadow.css +10 -11
  406. package/lib/esm/style/plotA11yView.shadow.css +13 -26
  407. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
  408. package/lib/esm/utils.mjs +103 -138
  409. package/lib/types/Axis.d.ts +4 -0
  410. package/lib/types/CompactHorizontalBar.d.ts +1 -1
  411. package/lib/types/Hover.d.ts +1 -1
  412. package/lib/types/Line.d.ts +1 -1
  413. package/lib/types/Plot.d.ts +1 -1
  414. package/lib/types/Radar.d.ts +1 -1
  415. package/lib/types/ResponsiveContainer.d.ts +1 -1
  416. package/lib/types/Tooltip.d.ts +1 -3
  417. package/lib/types/Venn.d.ts +1 -1
  418. package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
  419. package/lib/types/a11y/PlotA11yView.d.ts +12 -1
  420. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
  421. package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
  422. package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
  423. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
  424. package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
  425. package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
  426. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
  427. package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
  428. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
  429. package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
  430. package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
  431. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
  432. package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
  433. package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
  434. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
  435. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
  436. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
  437. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
  438. package/lib/types/utils.d.ts +10 -10
  439. package/package.json +11 -14
@@ -1,19 +1,11 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
- import _readOnlyError from "@babel/runtime/helpers/readOnlyError";
3
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
- import _createClass from "@babel/runtime/helpers/createClass";
7
- import _callSuper from "@babel/runtime/helpers/callSuper";
8
- import _inherits from "@babel/runtime/helpers/inherits";
9
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
2
  import { sstyled as _sstyled } from "@semcore/core";
11
3
  import { assignProps as _assignProps2 } from "@semcore/core";
12
4
  import { assignProps as _assignProps } from "@semcore/core";
5
+ import { Flex, Box } from '@semcore/base-components';
13
6
  import { Component, Root, sstyled } from '@semcore/core';
14
7
  import { extractAriaProps } from '@semcore/core/lib/utils/ariaProps';
15
8
  import { callAllEventHandlers } from '@semcore/core/lib/utils/assignProps';
16
- import { Flex, Box } from '@semcore/flex-box';
17
9
  import { Text } from '@semcore/typography';
18
10
  import React, { Fragment } from 'react';
19
11
 
@@ -23,518 +15,480 @@ import React, { Fragment } from 'react';
23
15
  import { Plot, XAxis, YAxis } from '../..';
24
16
  import { makeDataHintsContainer } from '../../a11y/hints';
25
17
  /*!__reshadow-styles__:"../../style/abstract-chart.shadow.css"*/
26
- var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltipChildrenWrapper_1xuth_gg_{display:grid;grid-column-gap:var(--intergalactic-spacing-2x, 8px);-moz-column-gap:var(--intergalactic-spacing-2x, 8px);column-gap:var(--intergalactic-spacing-2x, 8px)}.___STooltipChildrenWrapper_1xuth_gg_._columnsCount_2_1xuth_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_1xuth_gg_._columnsCount_3_1xuth_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}", /*__inner_css_end__*/"1xuth_gg_"),
18
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltipChildrenWrapper_135h8_gg_{display:grid;grid-column-gap:var(--intergalactic-spacing-2x, 8px);-moz-column-gap:var(--intergalactic-spacing-2x, 8px);column-gap:var(--intergalactic-spacing-2x, 8px)}.___STooltipChildrenWrapper_135h8_gg_._columnsCount_2_135h8_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_135h8_gg_._columnsCount_3_135h8_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}", /*__inner_css_end__*/"135h8_gg_"),
27
19
  /*__reshadow_css_end__*/
28
20
  {
29
- "__STooltipChildrenWrapper": "___STooltipChildrenWrapper_1xuth_gg_",
30
- "_columnsCount_2": "_columnsCount_2_1xuth_gg_",
31
- "_columnsCount_3": "_columnsCount_3_1xuth_gg_"
21
+ "__STooltipChildrenWrapper": "___STooltipChildrenWrapper_135h8_gg_",
22
+ "_columnsCount_2": "_columnsCount_2_135h8_gg_",
23
+ "_columnsCount_3": "_columnsCount_3_135h8_gg_"
32
24
  });
33
25
  import { interpolateValue } from '../../utils';
34
26
  import ChartLegend, { ChartLegendTable } from '../ChartLegend';
35
- export var NOT_A_VALUE = 'n/a';
36
- export var AbstractChart = /*#__PURE__*/function (_Component) {
37
- function AbstractChart(props) {
38
- var _this;
39
- _classCallCheck(this, AbstractChart);
40
- _this = _callSuper(this, AbstractChart, [props]);
27
+ export const NOT_A_VALUE = 'n/a';
28
+ export class AbstractChart extends Component {
29
+ constructor(props) {
30
+ super(props);
41
31
  /**
42
32
  * Padding from the end's of chart to the container (except axis sides)
43
33
  */
44
- _defineProperty(_this, "plotPadding", 6);
45
- _defineProperty(_this, "dataHints", makeDataHintsContainer());
46
- _defineProperty(_this, "state", {
47
- dataDefinitions: _this.getDefaultDataDefinitions(),
34
+ _defineProperty(this, "plotPadding", 6);
35
+ _defineProperty(this, "dataHints", makeDataHintsContainer());
36
+ _defineProperty(this, "state", {
37
+ dataDefinitions: this.getDefaultDataDefinitions(),
48
38
  highlightedLine: -1,
49
39
  withTrend: false
50
40
  });
51
- _this.setHighlightedLine = _this.setHighlightedLine.bind(_this);
52
- _this.handleChangeVisible = _this.handleChangeVisible.bind(_this);
53
- _this.handleMouseEnter = _this.handleMouseEnter.bind(_this);
54
- _this.handleMouseLeave = _this.handleMouseLeave.bind(_this);
55
- _this.resolveColor = _this.resolveColor.bind(_this);
56
- _this.tooltipValueFormatter = _this.tooltipValueFormatter.bind(_this);
57
- _this.handleWithTrendChange = _this.handleWithTrendChange.bind(_this);
58
- return _this;
41
+ this.setHighlightedLine = this.setHighlightedLine.bind(this);
42
+ this.handleChangeVisible = this.handleChangeVisible.bind(this);
43
+ this.handleMouseEnter = this.handleMouseEnter.bind(this);
44
+ this.handleMouseLeave = this.handleMouseLeave.bind(this);
45
+ this.resolveColor = this.resolveColor.bind(this);
46
+ this.tooltipValueFormatter = this.tooltipValueFormatter.bind(this);
47
+ this.handleWithTrendChange = this.handleWithTrendChange.bind(this);
59
48
  }
60
- _inherits(AbstractChart, _Component);
61
- return _createClass(AbstractChart, [{
62
- key: "componentDidUpdate",
63
- value: function componentDidUpdate(prevProps) {
64
- if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {
65
- this.setState({
66
- dataDefinitions: this.getDefaultDataDefinitions()
67
- });
68
- }
49
+ componentDidUpdate(prevProps) {
50
+ if (prevProps.data !== this.props.data || prevProps.legendProps !== this.props.legendProps) {
51
+ this.setState({
52
+ dataDefinitions: this.getDefaultDataDefinitions()
53
+ });
69
54
  }
70
- }, {
71
- key: "getDefaultDataDefinitions",
72
- value: function getDefaultDataDefinitions() {
73
- var _this2 = this;
74
- var _this$props = this.props,
75
- data = _this$props.data,
76
- legendProps = _this$props.legendProps;
77
- return this.dataKeys.map(function (key, index) {
78
- var _legendProps$legendMa, _legendData$label, _legendData$icon, _legendData$defaultCh;
79
- var legendData = legendProps === null || legendProps === void 0 || (_legendProps$legendMa = legendProps.legendMap) === null || _legendProps$legendMa === void 0 ? void 0 : _legendProps$legendMa[key];
80
- var dataDefinition = {
81
- id: key,
82
- label: (_legendData$label = legendData === null || legendData === void 0 ? void 0 : legendData.label) !== null && _legendData$label !== void 0 ? _legendData$label : key,
83
- icon: (_legendData$icon = legendData === null || legendData === void 0 ? void 0 : legendData.icon) !== null && _legendData$icon !== void 0 ? _legendData$icon : undefined,
84
- checked: (_legendData$defaultCh = legendData === null || legendData === void 0 ? void 0 : legendData.defaultChecked) !== null && _legendData$defaultCh !== void 0 ? _legendData$defaultCh : true,
85
- color: _this2.resolveColor(key, index),
86
- columns: []
87
- };
88
- if (legendData !== null && legendData !== void 0 && legendData.additionalInfo || legendData !== null && legendData !== void 0 && legendData.count) {
89
- dataDefinition.additionalInfo = legendData.additionalInfo ? {
90
- label: legendData.additionalInfo
91
- } : legendData.count ? {
92
- count: legendData.count
93
- } : undefined;
55
+ }
56
+ getDefaultDataDefinitions() {
57
+ const {
58
+ data,
59
+ legendProps
60
+ } = this.props;
61
+ return this.dataKeys.map((key, index) => {
62
+ const legendData = legendProps?.legendMap?.[key];
63
+ const dataDefinition = {
64
+ id: key,
65
+ label: legendData?.label ?? key,
66
+ icon: legendData?.icon ?? undefined,
67
+ checked: legendData?.defaultChecked ?? true,
68
+ color: this.resolveColor(key, index),
69
+ columns: []
70
+ };
71
+ if (legendData?.additionalInfo || legendData?.count) {
72
+ dataDefinition.additionalInfo = legendData.additionalInfo ? {
73
+ label: legendData.additionalInfo
74
+ } : legendData.count ? {
75
+ count: legendData.count
76
+ } : undefined;
77
+ }
78
+ if (legendData && 'columns' in legendData) {
79
+ dataDefinition.columns = legendData.columns || [];
80
+ } else if (!Array.isArray(data)) {
81
+ let value = undefined;
82
+ let dataValue = data[key];
83
+ if (data instanceof Map) {
84
+ dataValue = data.get(key);
94
85
  }
95
- if (legendData && 'columns' in legendData) {
96
- dataDefinition.columns = legendData.columns || [];
97
- } else if (!Array.isArray(data)) {
98
- var value = undefined;
99
- var dataValue = data[key];
100
- if (data instanceof Map) {
101
- dataValue = data.get(key);
102
- }
103
- if (dataValue !== interpolateValue) {
104
- value = Number(dataValue);
105
- }
106
- var total = Object.values(data).reduce(function (sum, i) {
107
- if (i !== interpolateValue) {
108
- return sum + Number(i);
109
- }
110
- return sum;
111
- }, 0);
112
- var percent = value !== undefined ? (value / total * 100).toFixed(2) : undefined;
113
- dataDefinition.columns = [/*#__PURE__*/React.createElement(Text, {
114
- key: "".concat(key, "_percent"),
115
- use: "secondary"
116
- }, percent !== undefined ? "".concat(percent, "%") : ''), /*#__PURE__*/React.createElement(Text, {
117
- key: "".concat(key, "_value"),
118
- use: value ? 'primary' : 'secondary'
119
- }, value !== null && value !== void 0 ? value : NOT_A_VALUE)];
86
+ if (dataValue !== interpolateValue) {
87
+ value = Number(dataValue);
120
88
  }
121
- return dataDefinition;
122
- });
123
- }
124
- }, {
125
- key: "dataKeys",
126
- get: function get() {
127
- var _this$props2 = this.props,
128
- data = _this$props2.data,
129
- groupKey = _this$props2.groupKey;
130
- var dataKeys;
131
- if (Array.isArray(data) && groupKey) {
132
- dataKeys = Object.keys(data[0]).filter(function (key) {
133
- return key !== groupKey;
134
- });
135
- } else {
136
- dataKeys = Object.keys(data);
89
+ const total = Object.values(data).reduce((sum, i) => {
90
+ if (i !== interpolateValue) {
91
+ return sum + Number(i);
92
+ }
93
+ return sum;
94
+ }, 0);
95
+ const percent = value !== undefined ? (value / total * 100).toFixed(2) : undefined;
96
+ dataDefinition.columns = [/*#__PURE__*/React.createElement(Text, {
97
+ key: `${key}_percent`,
98
+ use: "secondary"
99
+ }, percent !== undefined ? `${percent}%` : ''), /*#__PURE__*/React.createElement(Text, {
100
+ key: `${key}_value`,
101
+ use: value ? 'primary' : 'secondary'
102
+ }, value ?? NOT_A_VALUE)];
137
103
  }
138
- return dataKeys;
104
+ return dataDefinition;
105
+ });
106
+ }
107
+ get dataKeys() {
108
+ const {
109
+ data,
110
+ groupKey
111
+ } = this.props;
112
+ let dataKeys;
113
+ if (Array.isArray(data) && groupKey) {
114
+ dataKeys = Object.keys(data[0]).filter(key => key !== groupKey);
115
+ } else {
116
+ dataKeys = Object.keys(data);
139
117
  }
140
- }, {
141
- key: "xTicks",
142
- get: function get() {
143
- var _this$asProps = this.asProps,
144
- data = _this$asProps.data,
145
- invertAxis = _this$asProps.invertAxis,
146
- xTicksCount = _this$asProps.xTicksCount,
147
- yTicksCount = _this$asProps.yTicksCount;
148
- var scale = this.xScale;
149
- if (Array.isArray(data) && 'ticks' in scale) {
150
- if (invertAxis && yTicksCount) {
151
- return scale.ticks(yTicksCount);
152
- } else if (xTicksCount) {
153
- return scale.ticks(xTicksCount);
154
- }
155
- return undefined;
118
+ return dataKeys;
119
+ }
120
+ get xTicks() {
121
+ const {
122
+ data,
123
+ invertAxis,
124
+ xTicksCount,
125
+ yTicksCount
126
+ } = this.asProps;
127
+ const scale = this.xScale;
128
+ if (Array.isArray(data) && 'ticks' in scale) {
129
+ if (invertAxis && yTicksCount) {
130
+ return scale.ticks(yTicksCount);
131
+ } else if (xTicksCount) {
132
+ return scale.ticks(xTicksCount);
156
133
  }
157
134
  return undefined;
158
135
  }
159
- }, {
160
- key: "yTicks",
161
- get: function get() {
162
- var _this$asProps2 = this.asProps,
163
- data = _this$asProps2.data,
164
- invertAxis = _this$asProps2.invertAxis,
165
- xTicksCount = _this$asProps2.xTicksCount,
166
- yTicksCount = _this$asProps2.yTicksCount;
167
- var scale = this.yScale;
168
- if (Array.isArray(data) && 'ticks' in scale) {
169
- if (invertAxis && xTicksCount) {
170
- return scale.ticks(xTicksCount);
171
- } else if (yTicksCount) {
172
- return scale.ticks(yTicksCount);
173
- }
174
- return undefined;
136
+ return undefined;
137
+ }
138
+ get yTicks() {
139
+ const {
140
+ data,
141
+ invertAxis,
142
+ xTicksCount,
143
+ yTicksCount
144
+ } = this.asProps;
145
+ const scale = this.yScale;
146
+ if (Array.isArray(data) && 'ticks' in scale) {
147
+ if (invertAxis && xTicksCount) {
148
+ return scale.ticks(xTicksCount);
149
+ } else if (yTicksCount) {
150
+ return scale.ticks(yTicksCount);
175
151
  }
176
152
  return undefined;
177
153
  }
178
- }, {
179
- key: "flatValues",
180
- get: function get() {
181
- var _this$asProps3 = this.asProps,
182
- data = _this$asProps3.data,
183
- groupKey = _this$asProps3.groupKey;
184
- var values = Array.isArray(data) ? data : Object.values(data);
185
- var flatValues = values.reduce(function (result, item) {
186
- if (!groupKey && typeof item === 'number') {
187
- result.add(item);
188
- } else {
189
- Object.entries(item).forEach(function (_ref5) {
190
- var _ref6 = _slicedToArray(_ref5, 2),
191
- key = _ref6[0],
192
- value = _ref6[1];
193
- if (key !== groupKey && typeof value === 'number') {
194
- result.add(value);
195
- }
196
- });
197
- }
198
- return result;
199
- }, new Set());
200
- return flatValues;
201
- }
202
- }, {
203
- key: "maxStackedValue",
204
- get: function get() {
205
- var _this$asProps4 = this.asProps,
206
- data = _this$asProps4.data,
207
- groupKey = _this$asProps4.groupKey;
208
- if (!Array.isArray(data)) {
209
- var _max = Object.values(data).reduce(function (sum, val) {
210
- if (typeof val === 'number') {
211
- sum = sum + val;
154
+ return undefined;
155
+ }
156
+ get flatValues() {
157
+ const {
158
+ data,
159
+ groupKey
160
+ } = this.asProps;
161
+ const values = Array.isArray(data) ? data : Object.values(data);
162
+ const flatValues = values.reduce((result, item) => {
163
+ if (!groupKey && typeof item === 'number') {
164
+ result.add(item);
165
+ } else {
166
+ Object.entries(item).forEach(([key, value]) => {
167
+ if (key !== groupKey && typeof value === 'number') {
168
+ result.add(value);
212
169
  }
213
- return sum;
214
- }, 0);
215
- return _max;
170
+ });
216
171
  }
217
- var max = data.reduce(function (max, item) {
218
- var barSum = Object.entries(item).reduce(function (sum, _ref7) {
219
- var _ref8 = _slicedToArray(_ref7, 2),
220
- key = _ref8[0],
221
- val = _ref8[1];
222
- if (key === groupKey) {
223
- return sum;
224
- }
225
- if (typeof val === 'number') {
226
- return sum + val;
227
- }
228
- if (val instanceof Date && !Number.isNaN(val.getMilliseconds())) {
229
- return sum + val.getMilliseconds();
230
- }
231
- return sum;
232
- }, 0);
233
- if (barSum > max) {
234
- max = barSum;
172
+ return result;
173
+ }, new Set());
174
+ return flatValues;
175
+ }
176
+ get maxStackedValue() {
177
+ const {
178
+ data,
179
+ groupKey
180
+ } = this.asProps;
181
+ if (!Array.isArray(data)) {
182
+ const max = Object.values(data).reduce((sum, val) => {
183
+ if (typeof val === 'number') {
184
+ sum = sum + val;
235
185
  }
236
- return max;
186
+ return sum;
237
187
  }, 0);
238
188
  return max;
239
189
  }
240
- }, {
241
- key: "totalValue",
242
- value: function totalValue(data) {
243
- var dataDefinitions = this.state.dataDefinitions;
244
- var allNotAValue = true;
245
- var total = dataDefinitions.reduce(function (sum, legendItem) {
246
- var item = data[legendItem.id];
247
- if (item === null) {
248
- allNotAValue = false;
190
+ const max = data.reduce((max, item) => {
191
+ const barSum = Object.entries(item).reduce((sum, [key, val]) => {
192
+ if (key === groupKey) {
249
193
  return sum;
250
194
  }
251
- if (typeof item === 'number') {
252
- allNotAValue = false;
253
- return sum + item;
195
+ if (typeof val === 'number') {
196
+ return sum + val;
254
197
  }
255
- if (item instanceof Date && !Number.isNaN(item.getMilliseconds())) {
256
- allNotAValue = false;
257
- return sum + item.getMilliseconds();
198
+ if (val instanceof Date && !Number.isNaN(val.getMilliseconds())) {
199
+ return sum + val.getMilliseconds();
258
200
  }
259
201
  return sum;
260
202
  }, 0);
261
- if (allNotAValue) {
262
- return Number.NaN;
203
+ if (barSum > max) {
204
+ max = barSum;
263
205
  }
264
- return total;
265
- }
266
- }, {
267
- key: "percentValue",
268
- value: function percentValue(data, key) {
269
- var total = this.totalValue(data);
270
- var value = data[key];
271
- if (typeof value === 'number' && total !== 0) {
272
- var percent = Math.round(100 * value / total);
273
- return "".concat(percent, "%");
206
+ return max;
207
+ }, 0);
208
+ return max;
209
+ }
210
+ totalValue(data) {
211
+ const {
212
+ dataDefinitions
213
+ } = this.state;
214
+ let allNotAValue = true;
215
+ const total = dataDefinitions.reduce((sum, legendItem) => {
216
+ const item = data[legendItem.id];
217
+ if (item === null) {
218
+ allNotAValue = false;
219
+ return sum;
274
220
  }
275
- if (value === null) {
276
- return "0%";
221
+ if (typeof item === 'number') {
222
+ allNotAValue = false;
223
+ return sum + item;
277
224
  }
278
- return NOT_A_VALUE;
279
- }
280
- }, {
281
- key: "getValueScale",
282
- value: function getValueScale(values) {
283
- var max = Math.max.apply(Math, _toConsumableArray(values));
284
- var min = Math.min.apply(Math, _toConsumableArray(values));
285
- var avg = (max + min) / 2;
286
- var count = Math.round(Math.log10(avg));
287
- var valueScale = 100 / Math.pow(10, count);
288
- return valueScale;
225
+ if (item instanceof Date && !Number.isNaN(item.getMilliseconds())) {
226
+ allNotAValue = false;
227
+ return sum + item.getMilliseconds();
228
+ }
229
+ return sum;
230
+ }, 0);
231
+ if (allNotAValue) {
232
+ return Number.NaN;
289
233
  }
290
- }, {
291
- key: "setHighlightedLine",
292
- value: function setHighlightedLine(index) {
293
- this.setState({
294
- highlightedLine: index
295
- });
234
+ return total;
235
+ }
236
+ percentValue(data, key) {
237
+ const total = this.totalValue(data);
238
+ const value = data[key];
239
+ if (typeof value === 'number' && total !== 0) {
240
+ const percent = Math.round(100 * value / total);
241
+ return `${percent}%`;
296
242
  }
297
- }, {
298
- key: "handleChangeVisible",
299
- value: function handleChangeVisible(id, isVisible) {
300
- this.setState(function (prevState) {
301
- var dataDefinitions = prevState.dataDefinitions.map(function (item) {
302
- if (item.id === id) {
303
- item.checked = isVisible;
304
- }
305
- return item;
306
- });
307
- return {
308
- dataDefinitions: dataDefinitions
309
- };
310
- });
243
+ if (value === null) {
244
+ return `0%`;
311
245
  }
312
- }, {
313
- key: "handleWithTrendChange",
314
- value: function handleWithTrendChange(isVisible) {
315
- this.setState({
316
- withTrend: isVisible
246
+ return NOT_A_VALUE;
247
+ }
248
+ getValueScale(values) {
249
+ const max = Math.max(...values);
250
+ const min = Math.min(...values);
251
+ const avg = (max + min) / 2;
252
+ const count = Math.round(Math.log10(avg));
253
+ const valueScale = 100 / 10 ** count;
254
+ return valueScale;
255
+ }
256
+ setHighlightedLine(index) {
257
+ this.setState({
258
+ highlightedLine: index
259
+ });
260
+ }
261
+ handleChangeVisible(id, isVisible) {
262
+ this.setState(prevState => {
263
+ const dataDefinitions = prevState.dataDefinitions.map(item => {
264
+ if (item.id === id) {
265
+ item.checked = isVisible;
266
+ }
267
+ return item;
317
268
  });
269
+ return {
270
+ dataDefinitions
271
+ };
272
+ });
273
+ }
274
+ handleWithTrendChange(isVisible) {
275
+ this.setState({
276
+ withTrend: isVisible
277
+ });
278
+ }
279
+ handleMouseEnter(id) {
280
+ this.setHighlightedLine(this.state.dataDefinitions.findIndex(line => line.id === id));
281
+ }
282
+ handleMouseLeave() {
283
+ this.setHighlightedLine(-1);
284
+ }
285
+ resolveColor(id, index) {
286
+ return this.props.colorMap?.[id] ?? `chart-palette-order-${index + 1}`;
287
+ }
288
+ tooltipValueFormatter(value) {
289
+ const {
290
+ tooltipValueFormatter
291
+ } = this.asProps;
292
+ if (tooltipValueFormatter) {
293
+ return tooltipValueFormatter(value);
318
294
  }
319
- }, {
320
- key: "handleMouseEnter",
321
- value: function handleMouseEnter(id) {
322
- this.setHighlightedLine(this.state.dataDefinitions.findIndex(function (line) {
323
- return line.id === id;
324
- }));
295
+ if (value === undefined || value === interpolateValue) {
296
+ return NOT_A_VALUE;
325
297
  }
326
- }, {
327
- key: "handleMouseLeave",
328
- value: function handleMouseLeave() {
329
- this.setHighlightedLine(-1);
298
+ if (value === null) {
299
+ return '0';
330
300
  }
331
- }, {
332
- key: "resolveColor",
333
- value: function resolveColor(id, index) {
334
- var _this$props$colorMap$, _this$props$colorMap;
335
- return (_this$props$colorMap$ = (_this$props$colorMap = this.props.colorMap) === null || _this$props$colorMap === void 0 ? void 0 : _this$props$colorMap[id]) !== null && _this$props$colorMap$ !== void 0 ? _this$props$colorMap$ : "chart-palette-order-".concat(index + 1);
301
+ if (value instanceof Date) {
302
+ return value.toDateString();
336
303
  }
337
- }, {
338
- key: "tooltipValueFormatter",
339
- value: function tooltipValueFormatter(value) {
340
- var tooltipValueFormatter = this.asProps.tooltipValueFormatter;
341
- if (tooltipValueFormatter) {
342
- return tooltipValueFormatter(value);
343
- }
344
- if (value === undefined || value === interpolateValue) {
345
- return NOT_A_VALUE;
346
- }
347
- if (value === null) {
348
- return '0';
349
- }
350
- if (value instanceof Date) {
351
- return value.toDateString();
352
- }
353
- return value.toString();
304
+ return value.toString();
305
+ }
306
+ defaultLegendProps() {
307
+ return {
308
+ legendType: 'Flex'
309
+ };
310
+ }
311
+ renderLegend() {
312
+ const {
313
+ legendProps,
314
+ direction,
315
+ showLegend,
316
+ patterns
317
+ } = this.asProps;
318
+ if (
319
+ // we hide Legend for one item on chart except not manually set to show.
320
+ showLegend === undefined && this.dataKeys.length === 1 || showLegend === false) {
321
+ return null;
354
322
  }
355
- }, {
356
- key: "defaultLegendProps",
357
- value: function defaultLegendProps() {
358
- return {
359
- legendType: 'Flex'
360
- };
323
+ const {
324
+ dataDefinitions,
325
+ withTrend
326
+ } = this.state;
327
+ const lProps = {
328
+ ...this.defaultLegendProps(),
329
+ ...legendProps
330
+ };
331
+ const commonLegendProps = {
332
+ 'dataHints': this.dataHints,
333
+ 'items': dataDefinitions,
334
+ 'size': lProps.size,
335
+ 'shape': lProps.shape,
336
+ 'w': lProps.w,
337
+ 'h': lProps.h,
338
+ patterns,
339
+ 'direction': lProps.direction ?? (direction === 'row' || direction === 'row-reverse' ? 'column' : 'row'),
340
+ 'onChangeVisibleItem': lProps.disableSelectItems ? undefined : callAllEventHandlers(lProps.onChangeVisibleItem, this.handleChangeVisible),
341
+ 'onMouseEnterItem': lProps.disableHoverItems ? undefined : callAllEventHandlers(lProps.onMouseEnterItem, this.handleMouseEnter),
342
+ 'onMouseLeaveItem': lProps.disableHoverItems ? undefined : callAllEventHandlers(lProps.onMouseLeaveItem, this.handleMouseLeave),
343
+ 'aria-label': this.getLegendAriaLabel()
344
+ };
345
+ if (lProps.legendType === 'Table') {
346
+ return /*#__PURE__*/React.createElement(ChartLegendTable, commonLegendProps);
361
347
  }
362
- }, {
363
- key: "renderLegend",
364
- value: function renderLegend() {
365
- var _lProps$direction;
366
- var _this$asProps5 = this.asProps,
367
- legendProps = _this$asProps5.legendProps,
368
- direction = _this$asProps5.direction,
369
- showLegend = _this$asProps5.showLegend,
370
- patterns = _this$asProps5.patterns;
371
- if (
372
- // we hide Legend for one item on chart except not manually set to show.
373
- showLegend === undefined && this.dataKeys.length === 1 || showLegend === false) {
374
- return null;
375
- }
376
- var _this$state = this.state,
377
- dataDefinitions = _this$state.dataDefinitions,
378
- withTrend = _this$state.withTrend;
379
- var lProps = _objectSpread(_objectSpread({}, this.defaultLegendProps()), legendProps);
380
- var commonLegendProps = {
381
- 'dataHints': this.dataHints,
382
- 'items': dataDefinitions,
383
- 'size': lProps.size,
384
- 'shape': lProps.shape,
385
- 'w': lProps.w,
386
- 'h': lProps.h,
387
- patterns: patterns,
388
- 'direction': (_lProps$direction = lProps.direction) !== null && _lProps$direction !== void 0 ? _lProps$direction : direction === 'row' || direction === 'row-reverse' ? 'column' : 'row',
389
- 'onChangeVisibleItem': lProps.disableSelectItems ? undefined : callAllEventHandlers(lProps.onChangeVisibleItem, this.handleChangeVisible),
390
- 'onMouseEnterItem': lProps.disableHoverItems ? undefined : callAllEventHandlers(lProps.onMouseEnterItem, this.handleMouseEnter),
391
- 'onMouseLeaveItem': lProps.disableHoverItems ? undefined : callAllEventHandlers(lProps.onMouseLeaveItem, this.handleMouseLeave),
392
- 'aria-label': this.getLegendAriaLabel()
348
+ if ('withTrend' in lProps) {
349
+ const flexLegendProps = {
350
+ ...commonLegendProps,
351
+ withTrend: true,
352
+ trendLabel: lProps.trendLabel,
353
+ trendIsVisible: withTrend,
354
+ onTrendIsVisibleChange: this.handleWithTrendChange
393
355
  };
394
- if (lProps.legendType === 'Table') {
395
- return /*#__PURE__*/React.createElement(ChartLegendTable, commonLegendProps);
396
- }
397
- if ('withTrend' in lProps) {
398
- var flexLegendProps = _objectSpread(_objectSpread({}, commonLegendProps), {}, {
399
- withTrend: true,
400
- trendLabel: lProps.trendLabel,
401
- trendIsVisible: withTrend,
402
- onTrendIsVisibleChange: this.handleWithTrendChange
403
- });
404
- return /*#__PURE__*/React.createElement(ChartLegend, flexLegendProps);
405
- }
406
- return /*#__PURE__*/React.createElement(ChartLegend, commonLegendProps);
356
+ return /*#__PURE__*/React.createElement(ChartLegend, flexLegendProps);
407
357
  }
408
- }, {
409
- key: "renderAxis",
410
- value: function renderAxis() {
411
- var _this$asProps6 = this.asProps,
412
- invertAxis = _this$asProps6.invertAxis,
413
- showXAxis = _this$asProps6.showXAxis,
414
- showYAxis = _this$asProps6.showYAxis,
415
- data = _this$asProps6.data,
416
- axisXValueFormatter = _this$asProps6.axisXValueFormatter,
417
- axisYValueFormatter = _this$asProps6.axisYValueFormatter,
418
- multilineXTicks = _this$asProps6.multilineXTicks,
419
- multilineYTicks = _this$asProps6.multilineYTicks;
420
- if (!Array.isArray(data)) {
421
- return null;
422
- }
423
- var xTicks = this.xTicks;
424
- var yTicks = this.yTicks;
425
- var childrenX = axisXValueFormatter ? function (_ref9) {
426
- var value = _ref9.value;
427
- return {
428
- children: axisXValueFormatter(value)
429
- };
430
- } : undefined;
431
- var childrenY = axisYValueFormatter ? function (_ref0) {
432
- var value = _ref0.value;
433
- return {
434
- children: axisYValueFormatter(value)
435
- };
436
- } : undefined;
437
- return /*#__PURE__*/React.createElement(React.Fragment, null, showYAxis && /*#__PURE__*/React.createElement(YAxis, null, yTicks ? /*#__PURE__*/React.createElement(YAxis.Ticks, {
438
- multiline: multilineYTicks,
439
- ticks: yTicks
440
- }, childrenY) : /*#__PURE__*/React.createElement(YAxis.Ticks, {
441
- multiline: multilineYTicks
442
- }, childrenY), invertAxis !== true && (yTicks ? /*#__PURE__*/React.createElement(YAxis.Grid, {
443
- ticks: yTicks
444
- }) : /*#__PURE__*/React.createElement(YAxis.Grid, null))), showXAxis && /*#__PURE__*/React.createElement(XAxis, null, xTicks ? /*#__PURE__*/React.createElement(XAxis.Ticks, {
445
- multiline: multilineXTicks,
446
- ticks: xTicks
447
- }, childrenX) : /*#__PURE__*/React.createElement(XAxis.Ticks, {
448
- multiline: multilineXTicks
449
- }, childrenX), invertAxis === true && (xTicks ? /*#__PURE__*/React.createElement(XAxis.Grid, {
450
- ticks: xTicks
451
- }) : /*#__PURE__*/React.createElement(XAxis.Grid, null))));
358
+ return /*#__PURE__*/React.createElement(ChartLegend, commonLegendProps);
359
+ }
360
+ renderAxis() {
361
+ const {
362
+ invertAxis,
363
+ showXAxis,
364
+ showYAxis,
365
+ data,
366
+ axisXValueFormatter,
367
+ axisYValueFormatter,
368
+ multilineXTicks,
369
+ multilineYTicks
370
+ } = this.asProps;
371
+ if (!Array.isArray(data)) {
372
+ return null;
452
373
  }
453
- }, {
454
- key: "getTooltipChildren",
455
- value: function getTooltipChildren(options) {
456
- var _ref = this.asProps,
457
- _ref3,
458
- _dataItem,
459
- _this3 = this;
460
- var STooltipChildrenWrapper = Box;
461
- var Tooltip = options.Tooltip,
462
- dataItem = options.dataItem;
463
- var _this$asProps7 = this.asProps,
464
- styles = _this$asProps7.styles,
465
- groupKey = _this$asProps7.groupKey;
466
- var dataDefinitions = this.state.dataDefinitions;
467
- var title = (_dataItem = dataItem[groupKey]) === null || _dataItem === void 0 ? void 0 : _dataItem.toString();
468
- return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(Flex, _ref3.cn("Flex", {
469
- "direction": 'column'
470
- }), title && /*#__PURE__*/React.createElement(Tooltip.Title, null, title), /*#__PURE__*/React.createElement(STooltipChildrenWrapper, _ref3.cn("STooltipChildrenWrapper", _objectSpread({}, _assignProps({
374
+ const xTicks = this.xTicks;
375
+ const yTicks = this.yTicks;
376
+ const childrenX = axisXValueFormatter ? ({
377
+ value
378
+ }) => ({
379
+ children: axisXValueFormatter(value)
380
+ }) : undefined;
381
+ const childrenY = axisYValueFormatter ? ({
382
+ value
383
+ }) => ({
384
+ children: axisYValueFormatter(value)
385
+ }) : undefined;
386
+ return /*#__PURE__*/React.createElement(React.Fragment, null, showYAxis && /*#__PURE__*/React.createElement(YAxis, null, yTicks ? /*#__PURE__*/React.createElement(YAxis.Ticks, {
387
+ multiline: multilineYTicks,
388
+ ticks: yTicks
389
+ }, childrenY) : /*#__PURE__*/React.createElement(YAxis.Ticks, {
390
+ multiline: multilineYTicks
391
+ }, childrenY), invertAxis !== true && (yTicks ? /*#__PURE__*/React.createElement(YAxis.Grid, {
392
+ ticks: yTicks
393
+ }) : /*#__PURE__*/React.createElement(YAxis.Grid, null))), showXAxis && /*#__PURE__*/React.createElement(XAxis, null, xTicks ? /*#__PURE__*/React.createElement(XAxis.Ticks, {
394
+ multiline: multilineXTicks,
395
+ ticks: xTicks
396
+ }, childrenX) : /*#__PURE__*/React.createElement(XAxis.Ticks, {
397
+ multiline: multilineXTicks
398
+ }, childrenX), invertAxis === true && (xTicks ? /*#__PURE__*/React.createElement(XAxis.Grid, {
399
+ ticks: xTicks
400
+ }) : /*#__PURE__*/React.createElement(XAxis.Grid, null))));
401
+ }
402
+ getTooltipChildren(options) {
403
+ var _ref = this.asProps,
404
+ _ref3;
405
+ const STooltipChildrenWrapper = Box;
406
+ const {
407
+ Tooltip,
408
+ dataItem
409
+ } = options;
410
+ const {
411
+ styles,
412
+ groupKey
413
+ } = this.asProps;
414
+ const {
415
+ dataDefinitions
416
+ } = this.state;
417
+ const title = dataItem[groupKey]?.toString();
418
+ return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(Flex, _ref3.cn("Flex", {
419
+ "direction": 'column'
420
+ }), title && /*#__PURE__*/React.createElement(Tooltip.Title, null, title), /*#__PURE__*/React.createElement(STooltipChildrenWrapper, _ref3.cn("STooltipChildrenWrapper", {
421
+ ..._assignProps({
471
422
  "columnsCount": '2',
472
423
  "__excludeProps": ['data']
473
- }, _ref))), dataDefinitions.map(function (item) {
474
- return item.checked && /*#__PURE__*/React.createElement(Fragment, {
475
- key: item.id
476
- }, /*#__PURE__*/React.createElement(Tooltip.Dot, {
477
- mr: 2,
478
- color: item.color
479
- }, item.label), /*#__PURE__*/React.createElement(Text, {
480
- textAlign: "end",
481
- bold: true
482
- }, _this3.tooltipValueFormatter(dataItem[item.id])));
483
- }), this.renderTooltipTotalLine(dataItem)));
484
- }
485
- }, {
486
- key: "renderTooltipTotalLine",
487
- value: function renderTooltipTotalLine(dataItem) {
488
- var showTotalInTooltip = this.asProps.showTotalInTooltip;
489
- if (!showTotalInTooltip) {
490
- return null;
491
- }
492
- var total = this.totalValue(dataItem);
493
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
494
- mt: 2,
495
- mr: 2
496
- }, "Total"), /*#__PURE__*/React.createElement(Text, {
497
- mt: 2,
424
+ }, _ref)
425
+ }), dataDefinitions.map(item => {
426
+ return item.checked && /*#__PURE__*/React.createElement(Fragment, {
427
+ key: item.id
428
+ }, /*#__PURE__*/React.createElement(Tooltip.Dot, {
429
+ mr: 2,
430
+ color: item.color
431
+ }, item.label), /*#__PURE__*/React.createElement(Text, {
498
432
  textAlign: "end",
499
433
  bold: true
500
- }, Number.isNaN(total) ? NOT_A_VALUE : total));
434
+ }, this.tooltipValueFormatter(dataItem[item.id])));
435
+ }), this.renderTooltipTotalLine(dataItem)));
436
+ }
437
+ renderTooltipTotalLine(dataItem) {
438
+ const {
439
+ showTotalInTooltip
440
+ } = this.asProps;
441
+ if (!showTotalInTooltip) {
442
+ return null;
501
443
  }
502
- }, {
503
- key: "render",
504
- value: function render() {
505
- var _ref2 = this.asProps,
506
- _ref4;
507
- var SChart = Flex;
508
- var _this$asProps8 = this.asProps,
509
- styles = _this$asProps8.styles,
510
- plotWidth = _this$asProps8.plotWidth,
511
- plotHeight = _this$asProps8.plotHeight,
512
- data = _this$asProps8.data,
513
- patterns = _this$asProps8.patterns,
514
- a11yAltTextConfig = _this$asProps8.a11yAltTextConfig,
515
- duration = _this$asProps8.duration,
516
- eventEmitter = _this$asProps8.eventEmitter,
517
- showTooltip = _this$asProps8.showTooltip;
518
- var _extractAriaProps = extractAriaProps(this.asProps),
519
- extractedAriaProps = _extractAriaProps.extractedAriaProps;
520
- return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SChart, _ref4.cn("SChart", _objectSpread({}, _assignProps2({
444
+ const total = this.totalValue(dataItem);
445
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
446
+ mt: 2,
447
+ mr: 2
448
+ }, "Total"), /*#__PURE__*/React.createElement(Text, {
449
+ mt: 2,
450
+ textAlign: "end",
451
+ bold: true
452
+ }, Number.isNaN(total) ? NOT_A_VALUE : total));
453
+ }
454
+ render() {
455
+ var _ref2 = this.asProps,
456
+ _ref4;
457
+ const SChart = Flex;
458
+ const {
459
+ styles,
460
+ plotWidth,
461
+ plotHeight,
462
+ data,
463
+ patterns,
464
+ a11yAltTextConfig,
465
+ duration,
466
+ eventEmitter,
467
+ showTooltip
468
+ } = this.asProps;
469
+ const {
470
+ extractedAriaProps
471
+ } = extractAriaProps(this.asProps);
472
+ return _ref4 = sstyled(styles), /*#__PURE__*/React.createElement(SChart, _ref4.cn("SChart", {
473
+ ..._assignProps2({
521
474
  "gap": 5,
522
475
  "__excludeProps": ['data', 'eventEmitter'],
523
476
  "role": 'group'
524
- }, _ref2))), this.renderLegend(), /*#__PURE__*/React.createElement(Plot, _ref4.cn("Plot", _objectSpread({
525
- "data": data,
526
- "scale": [this.xScale, this.yScale],
527
- "width": plotWidth,
528
- "height": plotHeight,
529
- "dataHints": this.dataHints,
530
- "a11yAltTextConfig": a11yAltTextConfig,
531
- "patterns": patterns,
532
- "duration": duration,
533
- "eventEmitter": eventEmitter
534
- }, extractedAriaProps)), this.renderAxis(), !showTooltip ? null : this.renderTooltip(), this.renderChart()));
535
- }
536
- }]);
537
- }(Component);
477
+ }, _ref2)
478
+ }), this.renderLegend(), /*#__PURE__*/React.createElement(Plot, _ref4.cn("Plot", {
479
+ "data": data,
480
+ "scale": [this.xScale, this.yScale],
481
+ "width": plotWidth,
482
+ "height": plotHeight,
483
+ "dataHints": this.dataHints,
484
+ "a11yAltTextConfig": a11yAltTextConfig,
485
+ "patterns": patterns,
486
+ "duration": duration,
487
+ "eventEmitter": eventEmitter,
488
+ ...extractedAriaProps
489
+ }), this.renderAxis(), !showTooltip ? null : this.renderTooltip(), this.renderChart()));
490
+ }
491
+ }
538
492
  _defineProperty(AbstractChart, "style", style);
539
493
  _defineProperty(AbstractChart, "defaultProps", {
540
494
  direction: 'column',