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

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 +9 -12
@@ -1,9 +1,3 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
5
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
2
  import { createComponent } from "@semcore/core";
9
3
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
@@ -15,63 +9,58 @@ import { HoverLine } from "../../Hover.mjs";
15
9
  import { minMax } from "../../utils.mjs";
16
10
  import { AbstractChart } from "./AbstractChart.mjs";
17
11
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
18
- var AreaChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
19
- function AreaChartComponent2() {
20
- _classCallCheck(this, AreaChartComponent2);
21
- return _callSuper(this, AreaChartComponent2, arguments);
22
- }
23
- _inherits(AreaChartComponent2, _AbstractChart);
24
- return _createClass(AreaChartComponent2, [{
25
- key: "xScale",
26
- get: function get() {
27
- var _this$asProps = this.asProps, xScale = _this$asProps.xScale, _this$asProps$marginY = _this$asProps.marginY, marginY = _this$asProps$marginY === void 0 ? 40 : _this$asProps$marginY, plotWidth = _this$asProps.plotWidth, data = _this$asProps.data, groupKey = _this$asProps.groupKey;
28
- if (xScale) {
29
- return xScale;
30
- }
31
- var testItem = data[0][groupKey];
32
- var range = [marginY, plotWidth - this.plotPadding];
33
- var domain = minMax(data, groupKey);
34
- if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
35
- return scaleTime(domain, range);
36
- }
37
- return scaleLinear(domain, range);
12
+ class AreaChartComponent extends AbstractChart {
13
+ get xScale() {
14
+ const {
15
+ xScale,
16
+ marginY = 40,
17
+ plotWidth,
18
+ data,
19
+ groupKey
20
+ } = this.asProps;
21
+ if (xScale) {
22
+ return xScale;
38
23
  }
39
- }, {
40
- key: "yScale",
41
- get: function get() {
42
- var _this$asProps2 = this.asProps, yScale = _this$asProps2.yScale, _this$asProps2$margin = _this$asProps2.marginX, marginX = _this$asProps2$margin === void 0 ? 24 : _this$asProps2$margin, plotHeight = _this$asProps2.plotHeight, stacked = _this$asProps2.stacked;
43
- if (yScale) {
44
- return yScale;
45
- }
46
- var flatValues = _superPropGet(AreaChartComponent2, "flatValues", this, 1);
47
- var min = Math.min.apply(Math, _toConsumableArray(flatValues));
48
- var max = stacked ? _superPropGet(AreaChartComponent2, "maxStackedValue", this, 1) : Math.max.apply(Math, _toConsumableArray(flatValues));
49
- return scaleLinear().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
24
+ const testItem = data[0][groupKey];
25
+ const range = [marginY, plotWidth - this.plotPadding];
26
+ const domain = minMax(data, groupKey);
27
+ if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
28
+ return scaleTime(domain, range);
50
29
  }
51
- }, {
52
- key: "renderChart",
53
- value: function renderChart() {
54
- var _this$asProps3 = this.asProps, groupKey = _this$asProps3.groupKey, curve = _this$asProps3.curve, showDots = _this$asProps3.showDots, stacked = _this$asProps3.stacked, onClickArea = _this$asProps3.onClickArea;
55
- var _this$state = this.state, dataDefinitions = _this$state.dataDefinitions, highlightedLine = _this$state.highlightedLine;
56
- if (stacked) {
57
- return /* @__PURE__ */ React.createElement(StackedArea, {
58
- x: groupKey
59
- }, dataDefinitions.map(function(item, index) {
60
- return item.checked && /* @__PURE__ */ React.createElement(StackedArea.Area, {
61
- x: groupKey,
62
- y: item.id,
63
- key: item.id,
64
- color: item.color,
65
- transparent: highlightedLine !== -1 && highlightedLine !== index,
66
- curve,
67
- onClick: onClickArea
68
- }, showDots && /* @__PURE__ */ React.createElement(StackedArea.Area.Dots, {
69
- display: true
70
- }));
71
- }));
72
- }
73
- return dataDefinitions.map(function(item, index) {
74
- return item.checked && /* @__PURE__ */ React.createElement(Area, {
30
+ return scaleLinear(domain, range);
31
+ }
32
+ get yScale() {
33
+ const {
34
+ yScale,
35
+ marginX = 24,
36
+ plotHeight,
37
+ stacked
38
+ } = this.asProps;
39
+ if (yScale) {
40
+ return yScale;
41
+ }
42
+ const flatValues = super.flatValues;
43
+ const min = Math.min(...flatValues);
44
+ const max = stacked ? super.maxStackedValue : Math.max(...flatValues);
45
+ return scaleLinear().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
46
+ }
47
+ renderChart() {
48
+ const {
49
+ groupKey,
50
+ curve,
51
+ showDots,
52
+ stacked,
53
+ onClickArea
54
+ } = this.asProps;
55
+ const {
56
+ dataDefinitions,
57
+ highlightedLine
58
+ } = this.state;
59
+ if (stacked) {
60
+ return /* @__PURE__ */ React.createElement(StackedArea, {
61
+ x: groupKey
62
+ }, dataDefinitions.map((item, index) => {
63
+ return item.checked && /* @__PURE__ */ React.createElement(StackedArea.Area, {
75
64
  x: groupKey,
76
65
  y: item.id,
77
66
  key: item.id,
@@ -79,42 +68,54 @@ var AreaChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
79
68
  transparent: highlightedLine !== -1 && highlightedLine !== index,
80
69
  curve,
81
70
  onClick: onClickArea
82
- }, showDots && /* @__PURE__ */ React.createElement(Area.Dots, {
71
+ }, showDots && /* @__PURE__ */ React.createElement(StackedArea.Area.Dots, {
83
72
  display: true
84
73
  }));
85
- });
74
+ }));
86
75
  }
87
- }, {
88
- key: "renderTooltip",
89
- value: function renderTooltip() {
90
- var _this = this;
91
- var _this$asProps4 = this.asProps, data = _this$asProps4.data, groupKey = _this$asProps4.groupKey;
92
- return /* @__PURE__ */ React.createElement(HoverLine.Tooltip, {
76
+ return dataDefinitions.map((item, index) => {
77
+ return item.checked && /* @__PURE__ */ React.createElement(Area, {
93
78
  x: groupKey,
94
- wMin: 100
95
- }, function(_ref) {
96
- var xIndex = _ref.xIndex;
97
- var dataItem = data[xIndex];
98
- return {
99
- children: _this.getTooltipChildren({
100
- Tooltip: HoverLine.Tooltip,
101
- dataItem
102
- })
103
- };
104
- });
105
- }
106
- }, {
107
- key: "getLegendAriaLabel",
108
- value: function getLegendAriaLabel() {
109
- return this.asProps.getI18nText("legendForChart", {
110
- chartType: "Area"
111
- });
112
- }
113
- }]);
114
- })(AbstractChart);
79
+ y: item.id,
80
+ key: item.id,
81
+ color: item.color,
82
+ transparent: highlightedLine !== -1 && highlightedLine !== index,
83
+ curve,
84
+ onClick: onClickArea
85
+ }, showDots && /* @__PURE__ */ React.createElement(Area.Dots, {
86
+ display: true
87
+ }));
88
+ });
89
+ }
90
+ renderTooltip() {
91
+ const {
92
+ data,
93
+ groupKey
94
+ } = this.asProps;
95
+ return /* @__PURE__ */ React.createElement(HoverLine.Tooltip, {
96
+ x: groupKey,
97
+ wMin: 100
98
+ }, ({
99
+ xIndex
100
+ }) => {
101
+ const dataItem = data[xIndex];
102
+ return {
103
+ children: this.getTooltipChildren({
104
+ Tooltip: HoverLine.Tooltip,
105
+ dataItem
106
+ })
107
+ };
108
+ });
109
+ }
110
+ getLegendAriaLabel() {
111
+ return this.asProps.getI18nText("legendForChart", {
112
+ chartType: "Area"
113
+ });
114
+ }
115
+ }
115
116
  _defineProperty(AreaChartComponent, "displayName", "Chart.Area");
116
117
  _defineProperty(AreaChartComponent, "enhance", [i18nEnhance(localizedMessages)]);
117
- var AreaChart = createComponent(AreaChartComponent);
118
+ const AreaChart = createComponent(AreaChartComponent);
118
119
  export {
119
120
  AreaChart
120
121
  };
@@ -1,212 +1,260 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
1
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
6
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
7
- import _inherits from "@babel/runtime/helpers/esm/inherits";
8
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
3
  import { createComponent } from "@semcore/core";
10
4
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
11
5
  import { scaleTime, scaleBand, scaleLinear } from "d3-scale";
12
6
  import React from "react";
13
7
  import { AbstractChart } from "./AbstractChart.mjs";
8
+ import { YAxis, XAxis } from "../../Axis.mjs";
14
9
  import Line from "../../Line.mjs";
15
10
  import GroupBar from "../../GroupBar.mjs";
16
11
  import StackBar from "../../StackBar.mjs";
17
12
  import { HoverRect } from "../../Hover.mjs";
18
13
  import { minMax } from "../../utils.mjs";
19
14
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
20
- var BarChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
21
- function BarChartComponent2() {
22
- var _this;
23
- _classCallCheck(this, BarChartComponent2);
24
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
- args[_key] = arguments[_key];
26
- }
27
- _this = _callSuper(this, BarChartComponent2, [].concat(args));
28
- _defineProperty(_this, "handleClickBar", function(_data, e, barIndex, barKey) {
29
- var onClickBar = _this.asProps.onClickBar;
15
+ class BarChartComponent extends AbstractChart {
16
+ constructor(...args) {
17
+ super(...args);
18
+ _defineProperty(this, "handleClickBar", (_data, e, barIndex, barKey) => {
19
+ const {
20
+ onClickBar
21
+ } = this.asProps;
30
22
  if (onClickBar) {
31
23
  onClickBar(barIndex, barKey, e);
32
24
  }
33
25
  });
34
- return _this;
35
26
  }
36
- _inherits(BarChartComponent2, _AbstractChart);
37
- return _createClass(BarChartComponent2, [{
38
- key: "xScale",
39
- get: function get() {
40
- var _this$asProps = this.asProps, xScale = _this$asProps.xScale, invertAxis = _this$asProps.invertAxis;
41
- if (xScale) {
42
- return xScale;
43
- }
44
- return invertAxis ? this.valueScale : this.categoryScale;
27
+ get xScale() {
28
+ const {
29
+ xScale,
30
+ invertAxis
31
+ } = this.asProps;
32
+ if (xScale) {
33
+ return xScale;
45
34
  }
46
- }, {
47
- key: "yScale",
48
- get: function get() {
49
- var _this$asProps2 = this.asProps, yScale = _this$asProps2.yScale, invertAxis = _this$asProps2.invertAxis;
50
- if (yScale) {
51
- return yScale;
52
- }
53
- return invertAxis ? this.categoryScale : this.valueScale;
35
+ return invertAxis ? this.valueScale : this.categoryScale;
36
+ }
37
+ get yScale() {
38
+ const {
39
+ yScale,
40
+ invertAxis
41
+ } = this.asProps;
42
+ if (yScale) {
43
+ return yScale;
54
44
  }
55
- }, {
56
- key: "defaultLegendProps",
57
- value: function defaultLegendProps() {
58
- if (this.props.trend !== void 0) {
59
- return {
60
- withTrend: true
61
- };
62
- }
63
- return {};
45
+ return invertAxis ? this.categoryScale : this.valueScale;
46
+ }
47
+ defaultLegendProps() {
48
+ if (this.props.trend !== void 0) {
49
+ return {
50
+ withTrend: true
51
+ };
64
52
  }
65
- }, {
66
- key: "renderTrend",
67
- value: function renderTrend(key) {
68
- var _this$asProps3 = this.asProps, groupKey = _this$asProps3.groupKey, invertAxis = _this$asProps3.invertAxis, trend = _this$asProps3.trend;
69
- var withTrend = this.state.withTrend;
70
- var trendItem = trend === null || trend === void 0 ? void 0 : trend[key];
71
- if (withTrend && trendItem) {
72
- return /* @__PURE__ */ React.createElement(Line, {
73
- data: trendItem,
74
- key: "".concat(key, "_").concat(groupKey),
75
- x: invertAxis ? "y" : "x",
76
- y: invertAxis ? "x" : "y",
77
- color: "wall",
78
- style: {
79
- strokeWidth: 3,
80
- strokeDasharray: 5
81
- }
82
- }, /* @__PURE__ */ React.createElement(Line.Dots, {
83
- data: trendItem,
84
- display: true
85
- }));
86
- }
87
- return null;
53
+ return {};
54
+ }
55
+ renderTrend(key) {
56
+ const {
57
+ groupKey,
58
+ invertAxis,
59
+ trend
60
+ } = this.asProps;
61
+ const {
62
+ withTrend
63
+ } = this.state;
64
+ const trendItem = trend == null ? void 0 : trend[key];
65
+ if (withTrend && trendItem) {
66
+ return /* @__PURE__ */ React.createElement(Line, {
67
+ data: trendItem,
68
+ key: `${key}_${groupKey}`,
69
+ x: invertAxis ? "y" : "x",
70
+ y: invertAxis ? "x" : "y",
71
+ color: "wall",
72
+ style: {
73
+ strokeWidth: 3,
74
+ strokeDasharray: 5
75
+ }
76
+ }, /* @__PURE__ */ React.createElement(Line.Dots, {
77
+ data: trendItem,
78
+ display: true
79
+ }));
80
+ }
81
+ return null;
82
+ }
83
+ renderChart() {
84
+ const {
85
+ groupKey,
86
+ type = "group",
87
+ invertAxis
88
+ } = this.asProps;
89
+ const {
90
+ dataDefinitions,
91
+ highlightedLine
92
+ } = this.state;
93
+ if (dataDefinitions.length === 1) {
94
+ const item = dataDefinitions[0];
95
+ const BarComponent = invertAxis ? GroupBar.HorizontalBar : GroupBar.Bar;
96
+ return item.checked && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(BarComponent, {
97
+ x: invertAxis ? item.id : groupKey,
98
+ y: invertAxis ? groupKey : item.id,
99
+ key: item.id,
100
+ color: item.color,
101
+ onClick: this.handleClickBar
102
+ }), this.renderTrend(item.id));
88
103
  }
89
- }, {
90
- key: "renderChart",
91
- value: function renderChart() {
92
- var _this2 = this;
93
- var _this$asProps4 = this.asProps, groupKey = _this$asProps4.groupKey, _this$asProps4$type = _this$asProps4.type, type = _this$asProps4$type === void 0 ? "group" : _this$asProps4$type, invertAxis = _this$asProps4.invertAxis;
94
- var _this$state = this.state, dataDefinitions = _this$state.dataDefinitions, highlightedLine = _this$state.highlightedLine;
95
- if (dataDefinitions.length === 1) {
96
- var item = dataDefinitions[0];
97
- var BarComponent = invertAxis ? GroupBar.HorizontalBar : GroupBar.Bar;
98
- return item.checked && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(BarComponent, {
99
- x: invertAxis ? item.id : groupKey,
100
- y: invertAxis ? groupKey : item.id,
101
- key: item.id,
104
+ if (type === "group") {
105
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(GroupBar, {
106
+ x: invertAxis ? void 0 : groupKey,
107
+ y: invertAxis ? groupKey : void 0
108
+ }, dataDefinitions.map((item, index) => {
109
+ const BarComponent = invertAxis ? GroupBar.HorizontalBar : GroupBar.Bar;
110
+ const commonBarComponentProps = {
102
111
  color: item.color,
112
+ transparent: highlightedLine !== -1 && highlightedLine !== index,
103
113
  onClick: this.handleClickBar
104
- }), this.renderTrend(item.id));
105
- }
106
- if (type === "group") {
107
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(GroupBar, {
108
- x: invertAxis ? void 0 : groupKey,
109
- y: invertAxis ? groupKey : void 0
110
- }, dataDefinitions.map(function(item2, index) {
111
- var BarComponent2 = invertAxis ? GroupBar.HorizontalBar : GroupBar.Bar;
112
- var commonBarComponentProps = {
113
- color: item2.color,
114
- transparent: highlightedLine !== -1 && highlightedLine !== index,
115
- onClick: _this2.handleClickBar
116
- };
117
- if (invertAxis) {
118
- commonBarComponentProps.x = item2.id;
119
- } else {
120
- commonBarComponentProps.y = item2.id;
121
- }
122
- return item2.checked && /* @__PURE__ */ React.createElement(BarComponent2, _extends({
123
- key: item2.id
124
- }, commonBarComponentProps));
125
- })), dataDefinitions.map(function(item2) {
126
- return item2.checked && _this2.renderTrend(item2.id);
127
- }));
128
- }
129
- if (type === "stack") {
130
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(StackBar, {
131
- x: invertAxis ? void 0 : groupKey,
132
- y: invertAxis ? groupKey : void 0
133
- }, dataDefinitions.map(function(item2, index) {
134
- var BarComponent2 = invertAxis ? StackBar.HorizontalBar : StackBar.Bar;
135
- var commonBarComponentProps = {
136
- color: item2.color,
137
- transparent: highlightedLine !== -1 && highlightedLine !== index,
138
- onClick: _this2.handleClickBar
139
- };
140
- if (invertAxis) {
141
- commonBarComponentProps.x = item2.id;
142
- } else {
143
- commonBarComponentProps.y = item2.id;
144
- }
145
- return item2.checked && /* @__PURE__ */ React.createElement(BarComponent2, _extends({
146
- key: item2.id
147
- }, commonBarComponentProps));
148
- })), dataDefinitions.map(function(item2) {
149
- return item2.checked && _this2.renderTrend(item2.id);
150
- }));
151
- }
152
- return null;
114
+ };
115
+ if (invertAxis) {
116
+ commonBarComponentProps.x = item.id;
117
+ } else {
118
+ commonBarComponentProps.y = item.id;
119
+ }
120
+ return item.checked && /* @__PURE__ */ React.createElement(BarComponent, _extends({
121
+ key: item.id
122
+ }, commonBarComponentProps));
123
+ })), dataDefinitions.map((item) => item.checked && this.renderTrend(item.id)));
153
124
  }
154
- }, {
155
- key: "renderTooltip",
156
- value: function renderTooltip() {
157
- var _this3 = this;
158
- var _this$asProps5 = this.asProps, data = _this$asProps5.data, groupKey = _this$asProps5.groupKey, invertAxis = _this$asProps5.invertAxis, onClickHoverRect = _this$asProps5.onClickHoverRect;
159
- return /* @__PURE__ */ React.createElement(HoverRect.Tooltip, {
125
+ if (type === "stack") {
126
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(StackBar, {
160
127
  x: invertAxis ? void 0 : groupKey,
161
- y: invertAxis ? groupKey : void 0,
162
- wMin: 100,
163
- onClick: onClickHoverRect
164
- }, function(_ref) {
165
- var xIndex = _ref.xIndex, yIndex = _ref.yIndex;
166
- var index = invertAxis ? yIndex : xIndex;
167
- var dataItem = data[index];
168
- return {
169
- children: _this3.getTooltipChildren({
170
- Tooltip: HoverRect.Tooltip,
171
- dataItem
172
- })
128
+ y: invertAxis ? groupKey : void 0
129
+ }, dataDefinitions.map((item, index) => {
130
+ const BarComponent = invertAxis ? StackBar.HorizontalBar : StackBar.Bar;
131
+ const commonBarComponentProps = {
132
+ color: item.color,
133
+ transparent: highlightedLine !== -1 && highlightedLine !== index,
134
+ onClick: this.handleClickBar
173
135
  };
174
- });
136
+ if (invertAxis) {
137
+ commonBarComponentProps.x = item.id;
138
+ } else {
139
+ commonBarComponentProps.y = item.id;
140
+ }
141
+ return item.checked && /* @__PURE__ */ React.createElement(BarComponent, _extends({
142
+ key: item.id
143
+ }, commonBarComponentProps));
144
+ })), dataDefinitions.map((item) => item.checked && this.renderTrend(item.id)));
175
145
  }
176
- }, {
177
- key: "getLegendAriaLabel",
178
- value: function getLegendAriaLabel() {
179
- return this.asProps.getI18nText("legendForChart", {
180
- chartType: "Bar"
181
- });
182
- }
183
- }, {
184
- key: "categoryScale",
185
- get: function get() {
186
- var _this$asProps6 = this.asProps, _this$asProps6$margin = _this$asProps6.marginY, marginY = _this$asProps6$margin === void 0 ? 40 : _this$asProps6$margin, _this$asProps6$margin2 = _this$asProps6.marginX, marginX = _this$asProps6$margin2 === void 0 ? 24 : _this$asProps6$margin2, plotWidth = _this$asProps6.plotWidth, plotHeight = _this$asProps6.plotHeight, invertAxis = _this$asProps6.invertAxis, data = _this$asProps6.data, groupKey = _this$asProps6.groupKey;
187
- var testItem = data[0][groupKey];
188
- var range = invertAxis ? [plotHeight - marginX, this.plotPadding] : [marginY, plotWidth - this.plotPadding];
189
- if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
190
- var _domain = minMax(data, groupKey);
191
- return scaleTime(_domain, range);
192
- }
193
- var domain = data.map(function(item) {
194
- return item[groupKey];
195
- });
196
- return scaleBand(domain, range).paddingInner(0.4).paddingOuter(0.2);
146
+ return null;
147
+ }
148
+ renderTooltip() {
149
+ const {
150
+ data,
151
+ groupKey,
152
+ invertAxis,
153
+ onClickHoverRect
154
+ } = this.asProps;
155
+ return /* @__PURE__ */ React.createElement(HoverRect.Tooltip, {
156
+ x: invertAxis ? void 0 : groupKey,
157
+ y: invertAxis ? groupKey : void 0,
158
+ wMin: 100,
159
+ onClick: onClickHoverRect
160
+ }, ({
161
+ xIndex,
162
+ yIndex
163
+ }) => {
164
+ const index = invertAxis ? yIndex : xIndex;
165
+ const dataItem = data[index];
166
+ return {
167
+ children: this.getTooltipChildren({
168
+ Tooltip: HoverRect.Tooltip,
169
+ dataItem
170
+ })
171
+ };
172
+ });
173
+ }
174
+ renderAxis() {
175
+ const {
176
+ invertAxis,
177
+ showXAxis,
178
+ showYAxis,
179
+ data,
180
+ axisXValueFormatter,
181
+ axisYValueFormatter,
182
+ multilineXTicks,
183
+ multilineYTicks
184
+ } = this.asProps;
185
+ if (!Array.isArray(data)) {
186
+ return null;
197
187
  }
198
- }, {
199
- key: "valueScale",
200
- get: function get() {
201
- var _this$asProps7 = this.asProps, _this$asProps7$margin = _this$asProps7.marginY, marginY = _this$asProps7$margin === void 0 ? 40 : _this$asProps7$margin, _this$asProps7$margin2 = _this$asProps7.marginX, marginX = _this$asProps7$margin2 === void 0 ? 24 : _this$asProps7$margin2, plotWidth = _this$asProps7.plotWidth, plotHeight = _this$asProps7.plotHeight, invertAxis = _this$asProps7.invertAxis, type = _this$asProps7.type;
202
- var max = type === "stack" ? _superPropGet(BarChartComponent2, "maxStackedValue", this, 1) : Math.max.apply(Math, _toConsumableArray(_superPropGet(BarChartComponent2, "flatValues", this, 1)));
203
- return scaleLinear().range(invertAxis ? [marginY, plotWidth - this.plotPadding] : [plotHeight - marginX, this.plotPadding]).domain([0, max]);
188
+ const xTicks = this.xTicks;
189
+ const yTicks = this.yTicks;
190
+ const childrenX = axisXValueFormatter ? ({
191
+ value
192
+ }) => ({
193
+ children: axisXValueFormatter(value)
194
+ }) : void 0;
195
+ const childrenY = axisYValueFormatter ? ({
196
+ value
197
+ }) => ({
198
+ children: axisYValueFormatter(value)
199
+ }) : void 0;
200
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, showYAxis && /* @__PURE__ */ React.createElement(YAxis, null, yTicks ? /* @__PURE__ */ React.createElement(YAxis.Ticks, {
201
+ primaryText: invertAxis,
202
+ multiline: multilineYTicks,
203
+ ticks: yTicks
204
+ }, childrenY) : /* @__PURE__ */ React.createElement(YAxis.Ticks, {
205
+ primaryText: invertAxis,
206
+ multiline: multilineYTicks
207
+ }, childrenY), invertAxis !== true && (yTicks ? /* @__PURE__ */ React.createElement(YAxis.Grid, {
208
+ ticks: yTicks
209
+ }) : /* @__PURE__ */ React.createElement(YAxis.Grid, null))), showXAxis && /* @__PURE__ */ React.createElement(XAxis, null, xTicks ? /* @__PURE__ */ React.createElement(XAxis.Ticks, {
210
+ multiline: multilineXTicks,
211
+ ticks: xTicks
212
+ }, childrenX) : /* @__PURE__ */ React.createElement(XAxis.Ticks, {
213
+ multiline: multilineXTicks
214
+ }, childrenX), invertAxis === true && (xTicks ? /* @__PURE__ */ React.createElement(XAxis.Grid, {
215
+ ticks: xTicks
216
+ }) : /* @__PURE__ */ React.createElement(XAxis.Grid, null))));
217
+ }
218
+ getLegendAriaLabel() {
219
+ return this.asProps.getI18nText("legendForChart", {
220
+ chartType: "Bar"
221
+ });
222
+ }
223
+ get categoryScale() {
224
+ const {
225
+ marginY = 40,
226
+ marginX = 24,
227
+ plotWidth,
228
+ plotHeight,
229
+ invertAxis,
230
+ data,
231
+ groupKey
232
+ } = this.asProps;
233
+ const testItem = data[0][groupKey];
234
+ const range = invertAxis ? [plotHeight - marginX, this.plotPadding] : [marginY, plotWidth - this.plotPadding];
235
+ if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
236
+ const domain2 = minMax(data, groupKey);
237
+ return scaleTime(domain2, range);
204
238
  }
205
- }]);
206
- })(AbstractChart);
239
+ const domain = data.map((item) => item[groupKey]);
240
+ return scaleBand(domain, range).paddingInner(0.4).paddingOuter(0.2);
241
+ }
242
+ get valueScale() {
243
+ const {
244
+ marginY = 40,
245
+ marginX = 24,
246
+ plotWidth,
247
+ plotHeight,
248
+ invertAxis,
249
+ type
250
+ } = this.asProps;
251
+ const max = type === "stack" ? super.maxStackedValue : Math.max(...super.flatValues);
252
+ return scaleLinear().range(invertAxis ? [marginY, plotWidth - this.plotPadding] : [plotHeight - marginX, this.plotPadding]).domain([0, max]);
253
+ }
254
+ }
207
255
  _defineProperty(BarChartComponent, "displayName", "Chart.Bar");
208
256
  _defineProperty(BarChartComponent, "enhance", [i18nEnhance(localizedMessages)]);
209
- var BarChart = createComponent(BarChartComponent);
257
+ const BarChart = createComponent(BarChartComponent);
210
258
  export {
211
259
  BarChart
212
260
  };