@semcore/d3-chart 3.61.0-prerelease.4 → 3.61.0-prerelease.5

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 (555) hide show
  1. package/lib/cjs/AnimatedClipPath.js +11 -15
  2. package/lib/cjs/AnimatedClipPath.js.map +1 -1
  3. package/lib/cjs/Area.js +71 -48
  4. package/lib/cjs/Area.js.map +1 -1
  5. package/lib/cjs/Axis.js +170 -108
  6. package/lib/cjs/Axis.js.map +1 -1
  7. package/lib/cjs/Bar.js +29 -34
  8. package/lib/cjs/Bar.js.map +1 -1
  9. package/lib/cjs/Bubble.js +211 -137
  10. package/lib/cjs/Bubble.js.map +1 -1
  11. package/lib/cjs/CompactHorizontalBar.js +92 -82
  12. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  13. package/lib/cjs/Donut.js +154 -139
  14. package/lib/cjs/Donut.js.map +1 -1
  15. package/lib/cjs/Dots.js +55 -38
  16. package/lib/cjs/Dots.js.map +1 -1
  17. package/lib/cjs/GroupBar.js +15 -18
  18. package/lib/cjs/GroupBar.js.map +1 -1
  19. package/lib/cjs/HorizontalBar.js +29 -34
  20. package/lib/cjs/HorizontalBar.js.map +1 -1
  21. package/lib/cjs/Hover.js +52 -45
  22. package/lib/cjs/Hover.js.map +1 -1
  23. package/lib/cjs/Line.js +63 -41
  24. package/lib/cjs/Line.js.map +1 -1
  25. package/lib/cjs/Pattern.js +16 -12
  26. package/lib/cjs/Pattern.js.map +1 -1
  27. package/lib/cjs/Plot.js +29 -36
  28. package/lib/cjs/Plot.js.map +1 -1
  29. package/lib/cjs/Radar.js +281 -261
  30. package/lib/cjs/Radar.js.map +1 -1
  31. package/lib/cjs/RadialTree.js +169 -154
  32. package/lib/cjs/RadialTree.js.map +1 -1
  33. package/lib/cjs/Reference.js +45 -51
  34. package/lib/cjs/Reference.js.map +1 -1
  35. package/lib/cjs/ResponsiveContainer.js +20 -25
  36. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  37. package/lib/cjs/ScatterPlot.js +71 -61
  38. package/lib/cjs/ScatterPlot.js.map +1 -1
  39. package/lib/cjs/StackBar.js +20 -31
  40. package/lib/cjs/StackBar.js.map +1 -1
  41. package/lib/cjs/StackedArea.js +12 -16
  42. package/lib/cjs/StackedArea.js.map +1 -1
  43. package/lib/cjs/Tooltip.js +73 -73
  44. package/lib/cjs/Tooltip.js.map +1 -1
  45. package/lib/cjs/Venn.js +77 -52
  46. package/lib/cjs/Venn.js.map +1 -1
  47. package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
  48. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  49. package/lib/cjs/a11y/PlotA11yModule.js +43 -86
  50. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  51. package/lib/cjs/a11y/PlotA11yView.js +44 -19
  52. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  53. package/lib/cjs/a11y/bezier.js +1 -2
  54. package/lib/cjs/a11y/bezier.js.map +1 -1
  55. package/lib/cjs/a11y/focus.js +5 -6
  56. package/lib/cjs/a11y/focus.js.map +1 -1
  57. package/lib/cjs/a11y/hints.js +6 -9
  58. package/lib/cjs/a11y/hints.js.map +1 -1
  59. package/lib/cjs/a11y/insights.js +63 -64
  60. package/lib/cjs/a11y/insights.js.map +1 -1
  61. package/lib/cjs/a11y/intl.js +1 -2
  62. package/lib/cjs/a11y/intl.js.map +1 -1
  63. package/lib/cjs/a11y/locale.js +5 -5
  64. package/lib/cjs/a11y/locale.js.map +1 -1
  65. package/lib/cjs/a11y/serialize.js +15 -17
  66. package/lib/cjs/a11y/serialize.js.map +1 -1
  67. package/lib/cjs/a11y/summarize.js +1 -2
  68. package/lib/cjs/a11y/summarize.js.map +1 -1
  69. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
  70. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  71. package/lib/cjs/a11y/translations/module/de.json +2 -2
  72. package/lib/cjs/a11y/translations/module/en.json +2 -2
  73. package/lib/cjs/a11y/translations/module/es.json +2 -2
  74. package/lib/cjs/a11y/translations/module/fr.json +2 -2
  75. package/lib/cjs/a11y/translations/module/it.json +2 -2
  76. package/lib/cjs/a11y/translations/module/ja.json +2 -2
  77. package/lib/cjs/a11y/translations/module/ko.json +2 -2
  78. package/lib/cjs/a11y/translations/module/nl.json +2 -2
  79. package/lib/cjs/a11y/translations/module/pl.json +2 -2
  80. package/lib/cjs/a11y/translations/module/pt.json +2 -2
  81. package/lib/cjs/a11y/translations/module/sv.json +2 -2
  82. package/lib/cjs/a11y/translations/module/tr.json +2 -2
  83. package/lib/cjs/a11y/translations/module/vi.json +2 -2
  84. package/lib/cjs/a11y/translations/module/zh.json +2 -2
  85. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
  86. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  87. package/lib/cjs/color.js +2 -3
  88. package/lib/cjs/color.js.map +1 -1
  89. package/lib/cjs/component/Chart/AbstractChart.js +157 -83
  90. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  91. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  92. package/lib/cjs/component/Chart/AreaChart.js +24 -51
  93. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  94. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  95. package/lib/cjs/component/Chart/BarChart.js +85 -69
  96. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  97. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  98. package/lib/cjs/component/Chart/BubbleChart.js +31 -27
  99. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  100. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  101. package/lib/cjs/component/Chart/CigaretteChart.js +340 -147
  102. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  103. package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
  104. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +11 -15
  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 +16 -22
  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 +16 -44
  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 +22 -48
  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 +15 -19
  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 +16 -21
  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 +16 -19
  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 +7 -8
  126. package/lib/cjs/component/Chart/index.js.map +1 -1
  127. package/lib/cjs/component/ChartLegend/BaseLegend.js +45 -23
  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 +19 -24
  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 +108 -83
  134. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  135. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
  136. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  137. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -23
  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 +1 -2
  141. package/lib/cjs/component/ChartLegend/index.js.map +1 -1
  142. package/lib/cjs/component/Cigarette/Cigarette.js +16 -20
  143. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  144. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +19 -24
  145. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
  146. package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  147. package/lib/cjs/component/SvgElement.js +21 -0
  148. package/lib/cjs/component/SvgElement.js.map +1 -0
  149. package/lib/cjs/createElement.d.js.map +1 -1
  150. package/lib/cjs/createElement.js +10 -12
  151. package/lib/cjs/createElement.js.map +1 -1
  152. package/lib/cjs/index.js +9 -2
  153. package/lib/cjs/index.js.map +1 -1
  154. package/lib/cjs/style/abstract-chart.shadow.css +12 -0
  155. package/lib/cjs/style/axis.shadow.css +39 -1
  156. package/lib/cjs/style/bubble.shadow.css +8 -0
  157. package/lib/cjs/style/hover.shadow.css +2 -2
  158. package/lib/cjs/style/plot.shadow.css +8 -6
  159. package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
  160. package/lib/cjs/style/plotA11yView.shadow.css +13 -26
  161. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
  162. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  163. package/lib/cjs/translations/de.json +1 -0
  164. package/lib/cjs/translations/es.json +1 -0
  165. package/lib/cjs/translations/fr.json +1 -0
  166. package/lib/cjs/translations/it.json +1 -0
  167. package/lib/cjs/translations/ja.json +1 -0
  168. package/lib/cjs/translations/ko.json +1 -0
  169. package/lib/cjs/translations/nl.json +1 -0
  170. package/lib/cjs/translations/pl.json +1 -0
  171. package/lib/cjs/translations/pt.json +1 -0
  172. package/lib/cjs/translations/sv.json +1 -0
  173. package/lib/cjs/translations/tr.json +2 -1
  174. package/lib/cjs/translations/vi.json +1 -0
  175. package/lib/cjs/translations/zh.json +1 -0
  176. package/lib/cjs/types/Area.d.js.map +1 -1
  177. package/lib/cjs/types/Axis.d.js.map +1 -1
  178. package/lib/cjs/types/Bar.d.js.map +1 -1
  179. package/lib/cjs/types/Bubble.d.js.map +1 -1
  180. package/lib/cjs/types/ClipPath.d.js.map +1 -1
  181. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  182. package/lib/cjs/types/Donut.d.js.map +1 -1
  183. package/lib/cjs/types/GroupBar.d.js.map +1 -1
  184. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  185. package/lib/cjs/types/Hover.d.js.map +1 -1
  186. package/lib/cjs/types/Line.d.js.map +1 -1
  187. package/lib/cjs/types/Plot.d.js.map +1 -1
  188. package/lib/cjs/types/Radar.d.js.map +1 -1
  189. package/lib/cjs/types/Reference.d.js.map +1 -1
  190. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  191. package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
  192. package/lib/cjs/types/StackBar.d.js.map +1 -1
  193. package/lib/cjs/types/StackedArea.d.js.map +1 -1
  194. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  195. package/lib/cjs/types/Venn.d.js.map +1 -1
  196. package/lib/cjs/types/context.d.js.map +1 -1
  197. package/lib/cjs/types/index.d.js +14 -2
  198. package/lib/cjs/types/index.d.js.map +1 -1
  199. package/lib/cjs/utils.js +36 -55
  200. package/lib/cjs/utils.js.map +1 -1
  201. package/lib/es6/AnimatedClipPath.js +9 -11
  202. package/lib/es6/AnimatedClipPath.js.map +1 -1
  203. package/lib/es6/Area.js +70 -45
  204. package/lib/es6/Area.js.map +1 -1
  205. package/lib/es6/Axis.js +168 -104
  206. package/lib/es6/Axis.js.map +1 -1
  207. package/lib/es6/Bar.js +27 -29
  208. package/lib/es6/Bar.js.map +1 -1
  209. package/lib/es6/Bubble.js +211 -135
  210. package/lib/es6/Bubble.js.map +1 -1
  211. package/lib/es6/CompactHorizontalBar.js +89 -77
  212. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  213. package/lib/es6/Donut.js +154 -137
  214. package/lib/es6/Donut.js.map +1 -1
  215. package/lib/es6/Dots.js +55 -36
  216. package/lib/es6/Dots.js.map +1 -1
  217. package/lib/es6/GroupBar.js +13 -15
  218. package/lib/es6/GroupBar.js.map +1 -1
  219. package/lib/es6/HorizontalBar.js +27 -29
  220. package/lib/es6/HorizontalBar.js.map +1 -1
  221. package/lib/es6/Hover.js +51 -41
  222. package/lib/es6/Hover.js.map +1 -1
  223. package/lib/es6/Line.js +61 -37
  224. package/lib/es6/Line.js.map +1 -1
  225. package/lib/es6/Pattern.js +7 -3
  226. package/lib/es6/Pattern.js.map +1 -1
  227. package/lib/es6/Plot.js +28 -32
  228. package/lib/es6/Plot.js.map +1 -1
  229. package/lib/es6/Radar.js +279 -257
  230. package/lib/es6/Radar.js.map +1 -1
  231. package/lib/es6/RadialTree.js +168 -151
  232. package/lib/es6/RadialTree.js.map +1 -1
  233. package/lib/es6/Reference.js +43 -45
  234. package/lib/es6/Reference.js.map +1 -1
  235. package/lib/es6/ResponsiveContainer.js +16 -19
  236. package/lib/es6/ResponsiveContainer.js.map +1 -1
  237. package/lib/es6/ScatterPlot.js +71 -59
  238. package/lib/es6/ScatterPlot.js.map +1 -1
  239. package/lib/es6/StackBar.js +17 -27
  240. package/lib/es6/StackBar.js.map +1 -1
  241. package/lib/es6/StackedArea.js +10 -13
  242. package/lib/es6/StackedArea.js.map +1 -1
  243. package/lib/es6/Tooltip.js +68 -65
  244. package/lib/es6/Tooltip.js.map +1 -1
  245. package/lib/es6/Venn.js +75 -48
  246. package/lib/es6/Venn.js.map +1 -1
  247. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  248. package/lib/es6/a11y/PlotA11yModule.js +43 -86
  249. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  250. package/lib/es6/a11y/PlotA11yView.js +43 -16
  251. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  252. package/lib/es6/a11y/bezier.js.map +1 -1
  253. package/lib/es6/a11y/focus.js +4 -4
  254. package/lib/es6/a11y/focus.js.map +1 -1
  255. package/lib/es6/a11y/hints.js +2 -2
  256. package/lib/es6/a11y/hints.js.map +1 -1
  257. package/lib/es6/a11y/insights.js +61 -61
  258. package/lib/es6/a11y/insights.js.map +1 -1
  259. package/lib/es6/a11y/intl.js.map +1 -1
  260. package/lib/es6/a11y/locale.js +3 -2
  261. package/lib/es6/a11y/locale.js.map +1 -1
  262. package/lib/es6/a11y/serialize.js +14 -13
  263. package/lib/es6/a11y/serialize.js.map +1 -1
  264. package/lib/es6/a11y/summarize.js.map +1 -1
  265. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
  266. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  267. package/lib/es6/a11y/translations/module/de.json +2 -2
  268. package/lib/es6/a11y/translations/module/en.json +2 -2
  269. package/lib/es6/a11y/translations/module/es.json +2 -2
  270. package/lib/es6/a11y/translations/module/fr.json +2 -2
  271. package/lib/es6/a11y/translations/module/it.json +2 -2
  272. package/lib/es6/a11y/translations/module/ja.json +2 -2
  273. package/lib/es6/a11y/translations/module/ko.json +2 -2
  274. package/lib/es6/a11y/translations/module/nl.json +2 -2
  275. package/lib/es6/a11y/translations/module/pl.json +2 -2
  276. package/lib/es6/a11y/translations/module/pt.json +2 -2
  277. package/lib/es6/a11y/translations/module/sv.json +2 -2
  278. package/lib/es6/a11y/translations/module/tr.json +2 -2
  279. package/lib/es6/a11y/translations/module/vi.json +2 -2
  280. package/lib/es6/a11y/translations/module/zh.json +2 -2
  281. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
  282. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  283. package/lib/es6/color.js +1 -1
  284. package/lib/es6/color.js.map +1 -1
  285. package/lib/es6/component/Chart/AbstractChart.js +159 -80
  286. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  287. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  288. package/lib/es6/component/Chart/AreaChart.js +23 -48
  289. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  290. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  291. package/lib/es6/component/Chart/BarChart.js +84 -67
  292. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  293. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  294. package/lib/es6/component/Chart/BubbleChart.js +30 -24
  295. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  296. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  297. package/lib/es6/component/Chart/CigaretteChart.js +341 -144
  298. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  299. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  300. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +9 -12
  301. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  302. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  303. package/lib/es6/component/Chart/DonutChart.js +14 -18
  304. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  305. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  306. package/lib/es6/component/Chart/HistogramChart.js +15 -41
  307. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  308. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  309. package/lib/es6/component/Chart/LineChart.js +20 -45
  310. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  311. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  312. package/lib/es6/component/Chart/RadarChart.js +13 -16
  313. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  314. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  315. package/lib/es6/component/Chart/ScatterPlotChart.js +15 -18
  316. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  317. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  318. package/lib/es6/component/Chart/VennChart.js +14 -16
  319. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  320. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  321. package/lib/es6/component/Chart/index.js +6 -6
  322. package/lib/es6/component/Chart/index.js.map +1 -1
  323. package/lib/es6/component/ChartLegend/BaseLegend.js +43 -20
  324. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  325. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  326. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +17 -19
  327. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  328. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  329. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +102 -74
  330. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  331. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  332. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +15 -17
  333. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  334. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  335. package/lib/es6/component/ChartLegend/index.js.map +1 -1
  336. package/lib/es6/component/Cigarette/Cigarette.js +14 -17
  337. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  338. package/lib/es6/component/StackGroupBar/StackGroupBar.js +17 -21
  339. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  340. package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  341. package/lib/es6/component/SvgElement.js +14 -0
  342. package/lib/es6/component/SvgElement.js.map +1 -0
  343. package/lib/es6/createElement.d.js.map +1 -1
  344. package/lib/es6/createElement.js +7 -7
  345. package/lib/es6/createElement.js.map +1 -1
  346. package/lib/es6/index.js +1 -0
  347. package/lib/es6/index.js.map +1 -1
  348. package/lib/es6/style/abstract-chart.shadow.css +12 -0
  349. package/lib/es6/style/axis.shadow.css +39 -1
  350. package/lib/es6/style/bubble.shadow.css +8 -0
  351. package/lib/es6/style/hover.shadow.css +2 -2
  352. package/lib/es6/style/plot.shadow.css +8 -6
  353. package/lib/es6/style/plotA11yModule.shadow.css +10 -11
  354. package/lib/es6/style/plotA11yView.shadow.css +13 -26
  355. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  356. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  357. package/lib/es6/translations/de.json +1 -0
  358. package/lib/es6/translations/es.json +1 -0
  359. package/lib/es6/translations/fr.json +1 -0
  360. package/lib/es6/translations/it.json +1 -0
  361. package/lib/es6/translations/ja.json +1 -0
  362. package/lib/es6/translations/ko.json +1 -0
  363. package/lib/es6/translations/nl.json +1 -0
  364. package/lib/es6/translations/pl.json +1 -0
  365. package/lib/es6/translations/pt.json +1 -0
  366. package/lib/es6/translations/sv.json +1 -0
  367. package/lib/es6/translations/tr.json +2 -1
  368. package/lib/es6/translations/vi.json +1 -0
  369. package/lib/es6/translations/zh.json +1 -0
  370. package/lib/es6/types/Area.d.js.map +1 -1
  371. package/lib/es6/types/Axis.d.js.map +1 -1
  372. package/lib/es6/types/Bar.d.js.map +1 -1
  373. package/lib/es6/types/Bubble.d.js.map +1 -1
  374. package/lib/es6/types/ClipPath.d.js.map +1 -1
  375. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  376. package/lib/es6/types/Donut.d.js.map +1 -1
  377. package/lib/es6/types/GroupBar.d.js.map +1 -1
  378. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  379. package/lib/es6/types/Hover.d.js.map +1 -1
  380. package/lib/es6/types/Line.d.js.map +1 -1
  381. package/lib/es6/types/Plot.d.js.map +1 -1
  382. package/lib/es6/types/Radar.d.js.map +1 -1
  383. package/lib/es6/types/Reference.d.js.map +1 -1
  384. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  385. package/lib/es6/types/ScatterPlot.d.js.map +1 -1
  386. package/lib/es6/types/StackBar.d.js.map +1 -1
  387. package/lib/es6/types/StackedArea.d.js.map +1 -1
  388. package/lib/es6/types/Tooltip.d.js.map +1 -1
  389. package/lib/es6/types/Venn.d.js.map +1 -1
  390. package/lib/es6/types/context.d.js.map +1 -1
  391. package/lib/es6/types/index.d.js +2 -0
  392. package/lib/es6/types/index.d.js.map +1 -1
  393. package/lib/es6/utils.js +16 -16
  394. package/lib/es6/utils.js.map +1 -1
  395. package/lib/esm/AnimatedClipPath.mjs +9 -16
  396. package/lib/esm/Area.mjs +51 -36
  397. package/lib/esm/Axis.mjs +143 -86
  398. package/lib/esm/Bar.mjs +31 -34
  399. package/lib/esm/Bubble.mjs +154 -106
  400. package/lib/esm/CompactHorizontalBar.mjs +88 -80
  401. package/lib/esm/Donut.mjs +87 -75
  402. package/lib/esm/Dots.mjs +50 -34
  403. package/lib/esm/GroupBar.mjs +12 -14
  404. package/lib/esm/HorizontalBar.mjs +31 -34
  405. package/lib/esm/Hover.mjs +53 -50
  406. package/lib/esm/Line.mjs +45 -31
  407. package/lib/esm/Pattern.mjs +4 -2
  408. package/lib/esm/Plot.mjs +30 -35
  409. package/lib/esm/Radar.mjs +188 -175
  410. package/lib/esm/RadialTree.mjs +105 -111
  411. package/lib/esm/Reference.mjs +37 -40
  412. package/lib/esm/ResponsiveContainer.mjs +18 -21
  413. package/lib/esm/ScatterPlot.mjs +49 -40
  414. package/lib/esm/StackBar.mjs +18 -28
  415. package/lib/esm/StackedArea.mjs +13 -16
  416. package/lib/esm/Tooltip.mjs +56 -59
  417. package/lib/esm/Venn.mjs +67 -47
  418. package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
  419. package/lib/esm/a11y/PlotA11yModule.mjs +35 -74
  420. package/lib/esm/a11y/PlotA11yView.mjs +41 -17
  421. package/lib/esm/a11y/focus.mjs +4 -4
  422. package/lib/esm/a11y/hints.mjs +2 -2
  423. package/lib/esm/a11y/insights.mjs +76 -76
  424. package/lib/esm/a11y/locale.mjs +2 -2
  425. package/lib/esm/a11y/serialize.mjs +12 -12
  426. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
  427. package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
  428. package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
  429. package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
  430. package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
  431. package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
  432. package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
  433. package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
  434. package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
  435. package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
  436. package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
  437. package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
  438. package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
  439. package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
  440. package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
  441. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
  442. package/lib/esm/component/Chart/AbstractChart.mjs +141 -65
  443. package/lib/esm/component/Chart/AreaChart.mjs +27 -51
  444. package/lib/esm/component/Chart/BarChart.mjs +64 -51
  445. package/lib/esm/component/Chart/BubbleChart.mjs +30 -25
  446. package/lib/esm/component/Chart/CigaretteChart.mjs +298 -119
  447. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +13 -15
  448. package/lib/esm/component/Chart/DonutChart.mjs +16 -19
  449. package/lib/esm/component/Chart/HistogramChart.mjs +22 -46
  450. package/lib/esm/component/Chart/LineChart.mjs +23 -46
  451. package/lib/esm/component/Chart/RadarChart.mjs +16 -18
  452. package/lib/esm/component/Chart/ScatterPlotChart.mjs +18 -21
  453. package/lib/esm/component/Chart/VennChart.mjs +16 -19
  454. package/lib/esm/component/Chart/index.mjs +6 -6
  455. package/lib/esm/component/ChartLegend/BaseLegend.mjs +45 -22
  456. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +19 -22
  457. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +88 -75
  458. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +22 -25
  459. package/lib/esm/component/ChartLegend/index.mjs +2 -0
  460. package/lib/esm/component/Cigarette/Cigarette.mjs +16 -19
  461. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +18 -22
  462. package/lib/esm/component/SvgElement.mjs +14 -0
  463. package/lib/esm/createElement.mjs +8 -10
  464. package/lib/esm/index.mjs +3 -0
  465. package/lib/esm/style/abstract-chart.shadow.css +12 -0
  466. package/lib/esm/style/axis.shadow.css +39 -1
  467. package/lib/esm/style/bubble.shadow.css +8 -0
  468. package/lib/esm/style/hover.shadow.css +2 -2
  469. package/lib/esm/style/plot.shadow.css +8 -6
  470. package/lib/esm/style/plotA11yModule.shadow.css +10 -11
  471. package/lib/esm/style/plotA11yView.shadow.css +13 -26
  472. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  473. package/lib/esm/translations/es.json.mjs +1 -0
  474. package/lib/esm/translations/fr.json.mjs +1 -0
  475. package/lib/esm/translations/it.json.mjs +1 -0
  476. package/lib/esm/translations/ja.json.mjs +1 -0
  477. package/lib/esm/translations/ko.json.mjs +1 -0
  478. package/lib/esm/translations/nl.json.mjs +1 -0
  479. package/lib/esm/translations/pl.json.mjs +1 -0
  480. package/lib/esm/translations/pt.json.mjs +1 -0
  481. package/lib/esm/translations/sv.json.mjs +1 -0
  482. package/lib/esm/translations/tr.json.mjs +2 -1
  483. package/lib/esm/translations/vi.json.mjs +1 -0
  484. package/lib/esm/translations/zh.json.mjs +1 -0
  485. package/lib/esm/utils.mjs +11 -11
  486. package/lib/types/Area.d.ts +9 -6
  487. package/lib/types/Axis.d.ts +10 -3
  488. package/lib/types/Bar.d.ts +7 -6
  489. package/lib/types/Bubble.d.ts +21 -5
  490. package/lib/types/ClipPath.d.ts +4 -3
  491. package/lib/types/CompactHorizontalBar.d.ts +7 -8
  492. package/lib/types/Donut.d.ts +8 -5
  493. package/lib/types/GroupBar.d.ts +6 -6
  494. package/lib/types/HorizontalBar.d.ts +7 -6
  495. package/lib/types/Hover.d.ts +8 -8
  496. package/lib/types/Line.d.ts +9 -6
  497. package/lib/types/Pattern.d.ts +51 -51
  498. package/lib/types/Plot.d.ts +11 -9
  499. package/lib/types/Radar.d.ts +10 -7
  500. package/lib/types/RadialTree.d.ts +10 -54
  501. package/lib/types/Reference.d.ts +6 -5
  502. package/lib/types/ResponsiveContainer.d.ts +5 -4
  503. package/lib/types/ScatterPlot.d.ts +8 -5
  504. package/lib/types/StackBar.d.ts +7 -6
  505. package/lib/types/StackedArea.d.ts +6 -5
  506. package/lib/types/Tooltip.d.ts +12 -12
  507. package/lib/types/Venn.d.ts +7 -6
  508. package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
  509. package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
  510. package/lib/types/a11y/PlotA11yView.d.ts +13 -2
  511. package/lib/types/a11y/hints.d.ts +5 -5
  512. package/lib/types/a11y/insights.d.ts +1 -1
  513. package/lib/types/a11y/intl.d.ts +1 -1
  514. package/lib/types/a11y/serialize.d.ts +7 -7
  515. package/lib/types/a11y/summarize.d.ts +2 -2
  516. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
  517. package/lib/types/component/Chart/AbstractChart.d.ts +20 -13
  518. package/lib/types/component/Chart/AbstractChart.type.d.ts +39 -25
  519. package/lib/types/component/Chart/AreaChart.d.ts +1 -1
  520. package/lib/types/component/Chart/AreaChart.type.d.ts +17 -7
  521. package/lib/types/component/Chart/BarChart.d.ts +1 -1
  522. package/lib/types/component/Chart/BarChart.type.d.ts +14 -9
  523. package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
  524. package/lib/types/component/Chart/BubbleChart.type.d.ts +10 -5
  525. package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
  526. package/lib/types/component/Chart/CigaretteChart.type.d.ts +18 -8
  527. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
  528. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +10 -6
  529. package/lib/types/component/Chart/DonutChart.d.ts +1 -1
  530. package/lib/types/component/Chart/DonutChart.type.d.ts +16 -7
  531. package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
  532. package/lib/types/component/Chart/HistogramChart.type.d.ts +7 -4
  533. package/lib/types/component/Chart/LineChart.d.ts +1 -1
  534. package/lib/types/component/Chart/LineChart.type.d.ts +16 -7
  535. package/lib/types/component/Chart/RadarChart.d.ts +1 -1
  536. package/lib/types/component/Chart/RadarChart.type.d.ts +7 -5
  537. package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
  538. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +12 -6
  539. package/lib/types/component/Chart/VennChart.d.ts +1 -1
  540. package/lib/types/component/Chart/VennChart.type.d.ts +12 -6
  541. package/lib/types/component/ChartLegend/BaseLegend.d.ts +8 -6
  542. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
  543. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
  544. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
  545. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
  546. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
  547. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
  548. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
  549. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
  550. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
  551. package/lib/types/component/SvgElement.d.ts +10 -0
  552. package/lib/types/index.d.ts +3 -1
  553. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +12 -0
  554. package/lib/types/utils.d.ts +17 -17
  555. package/package.json +10 -10
@@ -1,45 +1,86 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
5
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
6
  import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
6
- import _get from "@babel/runtime/helpers/esm/get";
7
- import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
7
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
8
+ import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
8
9
  import _inherits from "@babel/runtime/helpers/esm/inherits";
9
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
10
10
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
11
- import createComponent, { sstyled, assignProps } from "@semcore/core";
12
- import React from "react";
11
+ import { sstyled, assignProps, createComponent } from "@semcore/core";
12
+ import { Box, Flex } from "@semcore/base-components";
13
+ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
14
+ import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
15
+ import trottle from "@semcore/core/lib/utils/rafTrottle";
16
+ import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
13
17
  import Divider from "@semcore/divider";
14
- import { Flex, Box } from "@semcore/flex-box";
15
18
  import { Text } from "@semcore/typography";
16
- import resolveColorEnhance from "@semcore/utils/lib/enhances/resolveColorEnhance";
17
- import uniqueIDEnhancement from "@semcore/utils/lib/uniqueID";
18
- import { scaleBand, scaleLinear } from "d3-scale";
19
- import Plot from "../../Plot.mjs";
20
- import { HoverRect } from "../../Hover.mjs";
21
- import { interpolateValue, scaleToBand } from "../../utils.mjs";
19
+ import { scaleLinear, scaleThreshold } from "d3-scale";
20
+ import React from "react";
21
+ import "../../index.mjs";
22
+ import { NOT_A_VALUE, AbstractChart } from "./AbstractChart.mjs";
22
23
  import AnimatedClipPath from "../../AnimatedClipPath.mjs";
23
- import { AbstractChart } from "./AbstractChart.mjs";
24
- import Cigarette from "../Cigarette/Cigarette.mjs";
25
24
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
26
- import i18nEnhance from "@semcore/utils/lib/enhances/i18nEnhance";
27
- var wMin = 2;
28
- var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
29
- _inherits(CigaretteChartComponent2, _AbstractChart);
30
- var _super = _createSuper(CigaretteChartComponent2);
31
- function CigaretteChartComponent2() {
25
+ import { eventToPoint, interpolateValue } from "../../utils.mjs";
26
+ import Cigarette from "../Cigarette/Cigarette.mjs";
27
+ import { HoverRect } from "../../Hover.mjs";
28
+ import Plot from "../../Plot.mjs";
29
+ var DEFAULT_MINIMAL_BAR_WIDTH = 2;
30
+ var DEFAULT_GAP = 2;
31
+ var CigaretteChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
32
+ function CigaretteChartComponent2(props) {
32
33
  var _this;
33
34
  _classCallCheck(this, CigaretteChartComponent2);
34
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
- args[_key] = arguments[_key];
36
- }
37
- _this = _super.call.apply(_super, [this].concat(args));
38
- _defineProperty(_assertThisInitialized(_this), "plotPadding", 0);
39
- _defineProperty(_assertThisInitialized(_this), "offset", 0);
35
+ _this = _callSuper(this, CigaretteChartComponent2, [props]);
36
+ _defineProperty(_this, "plotRef", /* @__PURE__ */ React.createRef());
37
+ _defineProperty(_this, "plotPadding", 0);
38
+ _defineProperty(_this, "offset", 0);
39
+ _defineProperty(_this, "onPlotMouseMove", trottle(function(event) {
40
+ if (!_this.plotRef.current) return;
41
+ var _eventToPoint = eventToPoint(event, _this.plotRef.current), _eventToPoint2 = _slicedToArray(_eventToPoint, 2), pX = _eventToPoint2[0], pY = _eventToPoint2[1];
42
+ _this.setState(function(prevState) {
43
+ return {
44
+ pX,
45
+ pY
46
+ };
47
+ });
48
+ }));
49
+ _defineProperty(_this, "onPlotMouseLeave", trottle(function() {
50
+ _this.setState(function(prevState) {
51
+ return {
52
+ pX: null,
53
+ pY: null
54
+ };
55
+ });
56
+ }));
57
+ _this.state = _objectSpread(_objectSpread({}, _this.state), {}, {
58
+ pX: null,
59
+ pY: null
60
+ });
40
61
  return _this;
41
62
  }
42
- _createClass(CigaretteChartComponent2, [{
63
+ _inherits(CigaretteChartComponent2, _AbstractChart);
64
+ return _createClass(CigaretteChartComponent2, [{
65
+ key: "activeDataDefinitions",
66
+ get: function get() {
67
+ var dataDefinitions = this.state.dataDefinitions;
68
+ return dataDefinitions.filter(function(_ref7) {
69
+ var checked = _ref7.checked;
70
+ return checked;
71
+ });
72
+ }
73
+ }, {
74
+ key: "activePositiveDataDefinitions",
75
+ get: function get() {
76
+ var data = this.asProps.data;
77
+ return this.activeDataDefinitions.filter(function(_ref8) {
78
+ var id = _ref8.id;
79
+ var itemValue = data[id];
80
+ return typeof itemValue === "number" && itemValue > 0;
81
+ });
82
+ }
83
+ }, {
43
84
  key: "resolveColor",
44
85
  value: function resolveColor(id, index) {
45
86
  var _this$props$colorMap$, _this$props$colorMap;
@@ -48,7 +89,7 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
48
89
  }, {
49
90
  key: "getDefaultDataDefinitions",
50
91
  value: function getDefaultDataDefinitions() {
51
- var dataDefinitions = _get(_getPrototypeOf(CigaretteChartComponent2.prototype), "getDefaultDataDefinitions", this).call(this);
92
+ var dataDefinitions = _superPropGet(CigaretteChartComponent2, "getDefaultDataDefinitions", this, 3)([]);
52
93
  return dataDefinitions.map(function(dataDef) {
53
94
  dataDef.columns = dataDef.columns.slice(1);
54
95
  return dataDef;
@@ -62,37 +103,122 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
62
103
  w: "fit-content"
63
104
  };
64
105
  }
106
+ }, {
107
+ key: "totalValue",
108
+ value: function totalValue() {
109
+ var data = this.asProps.data;
110
+ return this.activeDataDefinitions.reduce(function(acc, _ref9) {
111
+ var id = _ref9.id;
112
+ var itemValue = data[id];
113
+ if (typeof itemValue === "number") {
114
+ acc += itemValue;
115
+ }
116
+ return acc;
117
+ }, 0);
118
+ }
119
+ }, {
120
+ key: "computeCigaretteItems",
121
+ value: function computeCigaretteItems() {
122
+ var _this$asProps = this.asProps, plotWidth = _this$asProps.plotWidth, plotHeight = _this$asProps.plotHeight, data = _this$asProps.data, invertAxis = _this$asProps.invertAxis, minimalBarWidth = _this$asProps.minimalBarWidth;
123
+ var dataDefinitions = invertAxis ? this.activeDataDefinitions : _toConsumableArray(this.activeDataDefinitions).reverse();
124
+ var count = this.activePositiveDataDefinitions.length;
125
+ var totalGapWidth = DEFAULT_GAP * Math.max(0, count - 1);
126
+ var availableSpace = Math.max(0, (invertAxis ? plotWidth : plotHeight) - totalGapWidth);
127
+ var totalValue = this.totalValue();
128
+ var dataDefinitionsItemSize = dataDefinitions.map(function(_ref0) {
129
+ var id = _ref0.id;
130
+ if (totalValue === 0) {
131
+ return 0;
132
+ }
133
+ var itemValue = data[id];
134
+ if (typeof itemValue !== "number") return 0;
135
+ return itemValue / totalValue * availableSpace;
136
+ });
137
+ var result = dataDefinitions.map(function(dd, index) {
138
+ return _objectSpread(_objectSpread({}, dd), {}, {
139
+ value: data[dd.id],
140
+ dataWidth: dataDefinitionsItemSize[index],
141
+ visualWidth: dataDefinitionsItemSize[index],
142
+ isMinVisible: false
143
+ });
144
+ });
145
+ var smallItems = result.filter(function(r) {
146
+ var value = r.value, dataWidth = r.dataWidth;
147
+ if (typeof value !== "number") return false;
148
+ return value > 0 && dataWidth < minimalBarWidth;
149
+ });
150
+ if (smallItems.length === 0) return result;
151
+ var extraNeeded = 0;
152
+ var _iterator = _createForOfIteratorHelper(smallItems), _step;
153
+ try {
154
+ for (_iterator.s(); !(_step = _iterator.n()).done; ) {
155
+ var smallItem = _step.value;
156
+ extraNeeded += minimalBarWidth - smallItem.dataWidth;
157
+ smallItem.visualWidth = minimalBarWidth;
158
+ smallItem.isMinVisible = true;
159
+ }
160
+ } catch (err) {
161
+ _iterator.e(err);
162
+ } finally {
163
+ _iterator.f();
164
+ }
165
+ var donors = result.filter(function(r) {
166
+ return !r.isMinVisible && r.dataWidth > minimalBarWidth;
167
+ });
168
+ var donorCapacity = donors.reduce(function(s, d) {
169
+ return s + (d.dataWidth - minimalBarWidth);
170
+ }, 0);
171
+ var _iterator2 = _createForOfIteratorHelper(donors), _step2;
172
+ try {
173
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
174
+ var donor = _step2.value;
175
+ var available = donor.dataWidth - minimalBarWidth;
176
+ var share = available / donorCapacity;
177
+ var taken = share * extraNeeded;
178
+ donor.visualWidth = donor.dataWidth - taken;
179
+ }
180
+ } catch (err) {
181
+ _iterator2.e(err);
182
+ } finally {
183
+ _iterator2.f();
184
+ }
185
+ return result;
186
+ }
65
187
  }, {
66
188
  key: "xScale",
67
189
  get: function get() {
68
- var invertAxis = this.asProps.invertAxis;
69
- return invertAxis ? this.valueScale : this.categoryScale;
190
+ var plotWidth = this.asProps.plotWidth;
191
+ return scaleLinear([0, plotWidth]);
70
192
  }
71
193
  }, {
72
194
  key: "yScale",
73
195
  get: function get() {
74
- var invertAxis = this.asProps.invertAxis;
75
- return invertAxis ? this.categoryScale : this.valueScale;
196
+ var plotHeight = this.asProps.plotHeight;
197
+ return scaleLinear([plotHeight, 0]);
76
198
  }
77
199
  }, {
78
200
  key: "renderChart",
79
201
  value: function renderChart() {
80
202
  var _this2 = this;
81
- var _this$asProps = this.asProps, invertAxis = _this$asProps.invertAxis, data = _this$asProps.data, uid = _this$asProps.uid, duration = _this$asProps.duration, patterns = _this$asProps.patterns, plotHeight = _this$asProps.plotHeight, plotWidth = _this$asProps.plotWidth, onClick = _this$asProps.onClick;
203
+ var _this$asProps2 = this.asProps, invertAxis = _this$asProps2.invertAxis, data = _this$asProps2.data, uid = _this$asProps2.uid, duration = _this$asProps2.duration, patterns = _this$asProps2.patterns, plotHeight = _this$asProps2.plotHeight, plotWidth = _this$asProps2.plotWidth, onClick = _this$asProps2.onClick;
82
204
  var _this$state = this.state, dataDefinitions = _this$state.dataDefinitions, highlightedLine = _this$state.highlightedLine;
83
205
  this.offset = 0;
84
- return /* @__PURE__ */ React.createElement(React.Fragment, null, (invertAxis ? dataDefinitions : _toConsumableArray(dataDefinitions).reverse()).map(function(item, index) {
85
- var value = data[item.id];
86
- if (!item.checked || value === interpolateValue || value === null) {
206
+ var items = this.computeCigaretteItems();
207
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, items.map(function(item, index) {
208
+ var visualWidth = item.visualWidth, id = item.id;
209
+ var value = data[id];
210
+ if (value === interpolateValue || value === null) {
87
211
  return null;
88
212
  }
89
- var absWidth = Math.abs(_this2.valueScale(value) - Math.max(_this2.valueScale(_this2.valueScale.domain()[0]), _this2.valueScale(0)));
90
- var height = scaleToBand(_this2.categoryScale).bandwidth() - 4;
91
- var width = value === 0 ? 0 : Math.max(absWidth, wMin * 2) - wMin;
92
- var y = 2;
93
- var x = index === 0 ? 0 : _this2.offset;
213
+ var height = invertAxis ? plotHeight - DEFAULT_GAP * 2 : plotWidth - DEFAULT_GAP * 2;
214
+ var width = visualWidth;
215
+ var y = DEFAULT_GAP;
216
+ var x = _this2.offset;
94
217
  var r = height < 28 ? 2 : 4;
95
- _this2.offset = _this2.offset + width + wMin;
218
+ _this2.offset += visualWidth;
219
+ if (index < items.length - 1) {
220
+ _this2.offset += DEFAULT_GAP;
221
+ }
96
222
  return /* @__PURE__ */ React.createElement(Cigarette, {
97
223
  key: item.id,
98
224
  dataKey: item.id,
@@ -124,9 +250,10 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
124
250
  }, {
125
251
  key: "renderTooltip",
126
252
  value: function renderTooltip() {
127
- var _this3 = this;
128
- var _this$asProps2 = this.asProps, data = _this$asProps2.data, showTotalInTooltip = _this$asProps2.showTotalInTooltip, showTooltip = _this$asProps2.showTooltip, invertAxis = _this$asProps2.invertAxis, tooltipTitle = _this$asProps2.tooltipTitle, tooltipViewType = _this$asProps2.tooltipViewType;
129
- var dataDefinitions = this.state.dataDefinitions;
253
+ var _ref = this.asProps, _this3 = this;
254
+ var _this$asProps3 = this.asProps, data = _this$asProps3.data, invertAxis = _this$asProps3.invertAxis, tooltipTitle = _this$asProps3.tooltipTitle, tooltipViewType = _this$asProps3.tooltipViewType, showPercentValueInTooltip = _this$asProps3.showPercentValueInTooltip, styles = _this$asProps3.styles, showTooltip = _this$asProps3.showTooltip;
255
+ var _this$state2 = this.state, dataDefinitions = _this$state2.dataDefinitions, pX = _this$state2.pX, pY = _this$state2.pY;
256
+ var STooltipChildrenWrapper = Box;
130
257
  if (!showTooltip) {
131
258
  return null;
132
259
  }
@@ -134,54 +261,105 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
134
261
  x: invertAxis ? "" : void 0,
135
262
  y: invertAxis ? void 0 : "",
136
263
  wMin: 100,
137
- hideHoverLine: true
264
+ hideHoverLine: true,
265
+ xIndex: pX !== null ? this.visualScale(pX) : void 0,
266
+ yIndex: pY !== null ? this.visualScale(pY) : void 0
138
267
  }, function(tooltipProps) {
268
+ var _ref4;
139
269
  var dataKey = invertAxis ? tooltipProps.xIndex : tooltipProps.yIndex;
140
- var total = _this3.totalValue(data);
270
+ var showPercentColumn = showPercentValueInTooltip && _this3.totalValue() !== 0;
141
271
  if (tooltipViewType === "single") {
272
+ var _ref3;
142
273
  var item = dataDefinitions.find(function(dataDefItem) {
143
274
  return dataDefItem.id === dataKey;
144
275
  });
145
276
  if (!item) {
146
- return null;
277
+ return {
278
+ children: null
279
+ };
147
280
  }
148
281
  return {
149
- children: /* @__PURE__ */ React.createElement(Flex, {
150
- justifyContent: "space-between",
151
- key: dataKey
152
- }, /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Dot, {
153
- mr: 4,
282
+ children: (_ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(STooltipChildrenWrapper, _ref3.cn("STooltipChildrenWrapper", _objectSpread({}, assignProps({
283
+ "columnsCount": showPercentColumn ? "3" : "2",
284
+ "__excludeProps": ["data"]
285
+ }, _ref))), /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Dot, {
286
+ mr: 2,
154
287
  color: item.color
155
- }, item.label), /* @__PURE__ */ React.createElement(Text, {
156
- bold: true
157
- }, _this3.tooltipValueFormatter(data[dataKey])))
288
+ }, item.label), showPercentColumn && /* @__PURE__ */ React.createElement(Text, _ref3.cn("Text", {
289
+ "textAlign": "end",
290
+ "color": "text-secondary"
291
+ }), _this3.percentValue(data, item.id)), /* @__PURE__ */ React.createElement(Text, _ref3.cn("Text", {
292
+ "textAlign": "end",
293
+ "bold": true
294
+ }), _this3.tooltipValueFormatter(data[item.id]))))
158
295
  };
159
296
  }
160
297
  return {
161
- children: /* @__PURE__ */ React.createElement(React.Fragment, null, tooltipTitle && /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Title, null, "Some tooltip title"), dataDefinitions.map(function(item2) {
162
- return item2.checked && /* @__PURE__ */ React.createElement(Flex, {
163
- justifyContent: "space-between",
164
- key: item2.id,
165
- style: {
166
- opacity: item2.id === dataKey ? 1 : 0.3
167
- }
298
+ children: (_ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(Flex, _ref4.cn("Flex", {
299
+ "direction": "column"
300
+ }), tooltipTitle && /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Title, null, "Some tooltip title"), /* @__PURE__ */ React.createElement(STooltipChildrenWrapper, _ref4.cn("STooltipChildrenWrapper", _objectSpread({}, assignProps({
301
+ "columnsCount": showPercentColumn ? "3" : "2",
302
+ "__excludeProps": ["data"]
303
+ }, _ref))), dataDefinitions.map(function(item2) {
304
+ var style = {
305
+ opacity: item2.id === dataKey ? 1 : 0.3
306
+ };
307
+ return item2.checked && /* @__PURE__ */ React.createElement(React.Fragment, {
308
+ key: item2.id
168
309
  }, /* @__PURE__ */ React.createElement(HoverRect.Tooltip.Dot, {
169
- mr: 4,
170
- color: item2.color
171
- }, item2.label), /* @__PURE__ */ React.createElement(Text, {
172
- bold: true
310
+ mr: 2,
311
+ color: item2.color,
312
+ style
313
+ }, item2.label), showPercentColumn && /* @__PURE__ */ React.createElement(Text, {
314
+ textAlign: "end",
315
+ color: "text-secondary",
316
+ style
317
+ }, _this3.percentValue(data, item2.id)), /* @__PURE__ */ React.createElement(Text, {
318
+ textAlign: "end",
319
+ bold: true,
320
+ style
173
321
  }, _this3.tooltipValueFormatter(data[item2.id])));
174
- }), showTotalInTooltip === true && /* @__PURE__ */ React.createElement(Flex, {
175
- mt: 2,
176
- justifyContent: "space-between"
177
- }, /* @__PURE__ */ React.createElement(Box, {
178
- mr: 4
179
- }, "Total"), /* @__PURE__ */ React.createElement(Text, {
180
- bold: true
181
- }, total)))
322
+ }), _this3.renderTooltipTotalLine(data))))
182
323
  };
183
324
  });
184
325
  }
326
+ }, {
327
+ key: "percentValue",
328
+ value: function percentValue(data, key) {
329
+ var percentFormatter = this.asProps.percentFormatter;
330
+ var total = this.totalValue();
331
+ var value = data[key];
332
+ if (typeof value === "number" && total !== 0) {
333
+ var rawPercent = 100 * value / total;
334
+ var formattedPercent = percentFormatter ? percentFormatter(rawPercent) : Math.round(rawPercent);
335
+ return "".concat(formattedPercent, "%");
336
+ }
337
+ if (value === null) {
338
+ return "0%";
339
+ }
340
+ return NOT_A_VALUE;
341
+ }
342
+ }, {
343
+ key: "renderTooltipTotalLine",
344
+ value: function renderTooltipTotalLine(dataItem) {
345
+ var _this$asProps4 = this.asProps, showTotalInTooltip = _this$asProps4.showTotalInTooltip, showPercentValueInTooltip = _this$asProps4.showPercentValueInTooltip;
346
+ if (!showTotalInTooltip) {
347
+ return null;
348
+ }
349
+ var total = this.totalValue();
350
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, {
351
+ mt: 2,
352
+ mr: 2
353
+ }, "Total"), showPercentValueInTooltip && total !== 0 && /* @__PURE__ */ React.createElement(Text, {
354
+ mt: 2,
355
+ textAlign: "end",
356
+ color: "text-secondary"
357
+ }, Number.isNaN(total) ? NOT_A_VALUE : "100%"), /* @__PURE__ */ React.createElement(Text, {
358
+ mt: 2,
359
+ textAlign: "end",
360
+ bold: true
361
+ }, Number.isNaN(total) ? NOT_A_VALUE : total));
362
+ }
185
363
  }, {
186
364
  key: "renderHeader",
187
365
  value: function renderHeader() {
@@ -191,43 +369,49 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
191
369
  }, {
192
370
  key: "render",
193
371
  value: function render() {
194
- var _ref = this.asProps, _ref3;
372
+ var _ref2 = this.asProps, _ref6;
195
373
  var SChart = Flex;
196
- var _this$asProps3 = this.asProps, styles = _this$asProps3.styles, plotWidth = _this$asProps3.plotWidth, plotHeight = _this$asProps3.plotHeight, data = _this$asProps3.data, patterns = _this$asProps3.patterns, invertAxis = _this$asProps3.invertAxis, a11yAltTextConfig = _this$asProps3.a11yAltTextConfig;
374
+ var _this$asProps5 = this.asProps, styles = _this$asProps5.styles, plotWidth = _this$asProps5.plotWidth, plotHeight = _this$asProps5.plotHeight, data = _this$asProps5.data, patterns = _this$asProps5.patterns, invertAxis = _this$asProps5.invertAxis, a11yAltTextConfig = _this$asProps5.a11yAltTextConfig;
197
375
  var header = this.renderHeader();
198
376
  if (invertAxis) {
199
- var _ref2;
200
- return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SChart, _ref2.cn("SChart", _objectSpread({}, assignProps({
377
+ var _ref5;
378
+ return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SChart, _ref5.cn("SChart", _objectSpread({}, assignProps({
201
379
  "gap": 6,
202
380
  "direction": "column",
203
381
  "__excludeProps": ["onClick", "data"]
204
- }, _ref))), /* @__PURE__ */ React.createElement(Flex, _ref2.cn("Flex", {
382
+ }, _ref2))), /* @__PURE__ */ React.createElement(Flex, _ref5.cn("Flex", {
205
383
  "direction": "column"
206
- }), header, /* @__PURE__ */ React.createElement(Plot, _ref2.cn("Plot", {
384
+ }), header, /* @__PURE__ */ React.createElement(Plot, _ref5.cn("Plot", {
385
+ "ref": this.plotRef,
207
386
  "data": data,
208
387
  "scale": [this.xScale, this.yScale],
209
388
  "width": plotWidth,
210
389
  "height": plotHeight,
211
390
  "dataHints": this.dataHints,
212
391
  "patterns": patterns,
213
- "a11yAltTextConfig": a11yAltTextConfig
392
+ "a11yAltTextConfig": a11yAltTextConfig,
393
+ "onMouseMove": this.onPlotMouseMove,
394
+ "onMouseLeave": this.onPlotMouseLeave
214
395
  }), this.renderTooltip(), this.renderChart())), this.renderLegend());
215
396
  }
216
- return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SChart, _ref3.cn("SChart", _objectSpread({}, assignProps({
397
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SChart, _ref6.cn("SChart", _objectSpread({}, assignProps({
217
398
  "gap": 6,
218
399
  "__excludeProps": ["onClick", "data"]
219
- }, _ref))), /* @__PURE__ */ React.createElement(Plot, _ref3.cn("Plot", {
400
+ }, _ref2))), /* @__PURE__ */ React.createElement(Plot, _ref6.cn("Plot", {
401
+ "ref": this.plotRef,
220
402
  "data": data,
221
403
  "scale": [this.xScale, this.yScale],
222
404
  "width": plotWidth,
223
405
  "height": plotHeight,
224
406
  "dataHints": this.dataHints,
225
407
  "patterns": patterns,
226
- "a11yAltTextConfig": a11yAltTextConfig
227
- }), this.renderTooltip(), this.renderChart()), /* @__PURE__ */ React.createElement(Flex, _ref3.cn("Flex", {
408
+ "a11yAltTextConfig": a11yAltTextConfig,
409
+ "onMouseMove": this.onPlotMouseMove,
410
+ "onMouseLeave": this.onPlotMouseLeave
411
+ }), this.renderTooltip(), this.renderChart()), /* @__PURE__ */ React.createElement(Flex, _ref6.cn("Flex", {
228
412
  "direction": "column",
229
413
  "gap": 2
230
- }), header && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, _ref3.cn("Box", {}), header), /* @__PURE__ */ React.createElement(Divider, _ref3.cn("Divider", {}))), this.renderLegend()));
414
+ }), header && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Box, _ref6.cn("Box", {}), header), /* @__PURE__ */ React.createElement(Divider, _ref6.cn("Divider", {}))), this.renderLegend()));
231
415
  }
232
416
  }, {
233
417
  key: "getLegendAriaLabel",
@@ -237,39 +421,32 @@ var CigaretteChartComponent = /* @__PURE__ */ function(_AbstractChart) {
237
421
  });
238
422
  }
239
423
  }, {
240
- key: "selectedData",
424
+ key: "visualScale",
241
425
  get: function get() {
242
- var data = this.asProps.data;
243
- var dataDefinitions = this.state.dataDefinitions;
244
- var result = /* @__PURE__ */ new Map();
245
- dataDefinitions.forEach(function(dataDefItem) {
246
- var value = data[dataDefItem.id];
247
- if (dataDefItem.checked && value !== interpolateValue) {
248
- result.set(dataDefItem.id, value);
426
+ var cigaretteItems = this.computeCigaretteItems();
427
+ var _cigaretteItems$reduc = cigaretteItems.reduce(function(acc, _ref1, index) {
428
+ var id = _ref1.id, visualWidth = _ref1.visualWidth;
429
+ var range2 = acc.range, domain2 = acc.domain;
430
+ if (visualWidth) {
431
+ range2.push(id);
432
+ if (domain2.length === 0) {
433
+ domain2.push(visualWidth + DEFAULT_GAP);
434
+ return acc;
435
+ }
436
+ if (index !== cigaretteItems.length - 1) {
437
+ var lastAddedDomain = domain2[domain2.length - 1];
438
+ domain2.push(lastAddedDomain + visualWidth + DEFAULT_GAP);
439
+ }
249
440
  }
250
- });
251
- return result;
252
- }
253
- }, {
254
- key: "categoryScale",
255
- get: function get() {
256
- var _this$asProps4 = this.asProps, plotWidth = _this$asProps4.plotWidth, plotHeight = _this$asProps4.plotHeight, invertAxis = _this$asProps4.invertAxis;
257
- var range = invertAxis ? [plotHeight, 0] : [0, plotWidth];
258
- return scaleBand([0], range);
259
- }
260
- }, {
261
- key: "valueScale",
262
- get: function get() {
263
- var _this$asProps5 = this.asProps, plotWidth = _this$asProps5.plotWidth, plotHeight = _this$asProps5.plotHeight, invertAxis = _this$asProps5.invertAxis;
264
- var max = 0;
265
- this.selectedData.forEach(function(value) {
266
- max = max + value;
267
- });
268
- return scaleLinear().range(invertAxis ? [0, plotWidth] : [plotHeight, 0]).domain([0, max]);
441
+ return acc;
442
+ }, {
443
+ range: [],
444
+ domain: []
445
+ }), range = _cigaretteItems$reduc.range, domain = _cigaretteItems$reduc.domain;
446
+ return scaleThreshold(domain, range);
269
447
  }
270
448
  }]);
271
- return CigaretteChartComponent2;
272
- }(AbstractChart);
449
+ })(AbstractChart);
273
450
  _defineProperty(CigaretteChartComponent, "displayName", "Cigarette.Bar");
274
451
  _defineProperty(CigaretteChartComponent, "defaultProps", function(props) {
275
452
  var _props$invertAxis;
@@ -284,7 +461,9 @@ _defineProperty(CigaretteChartComponent, "defaultProps", function(props) {
284
461
  marginY: 0,
285
462
  duration: 500,
286
463
  plotWidth: !invertAxis && !props.plotWidth ? 44 : props.plotWidth,
287
- plotHeight: invertAxis && !props.plotHeight ? 28 : props.plotHeight
464
+ plotHeight: invertAxis && !props.plotHeight ? 28 : props.plotHeight,
465
+ showPercentValueInTooltip: false,
466
+ minimalBarWidth: DEFAULT_MINIMAL_BAR_WIDTH
288
467
  };
289
468
  });
290
469
  _defineProperty(CigaretteChartComponent, "enhance", [resolveColorEnhance(), uniqueIDEnhancement(), i18nEnhance(localizedMessages)]);
@@ -1,26 +1,25 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _get from "@babel/runtime/helpers/esm/get";
5
- import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
4
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
5
+ import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
6
6
  import _inherits from "@babel/runtime/helpers/esm/inherits";
7
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
8
7
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
- import React from "react";
10
- import createComponent from "@semcore/core";
8
+ import { createComponent } from "@semcore/core";
9
+ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
11
10
  import { scaleBand, scaleLinear } from "d3-scale";
12
- import CompactHorizontalBar from "../../CompactHorizontalBar.mjs";
11
+ import React from "react";
12
+ import "../../index.mjs";
13
13
  import { AbstractChart } from "./AbstractChart.mjs";
14
14
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
15
- import i18nEnhance from "@semcore/utils/lib/enhances/i18nEnhance";
16
- var CompactHorizontalBarChartComponent = /* @__PURE__ */ function(_AbstractChart) {
17
- _inherits(CompactHorizontalBarChartComponent2, _AbstractChart);
18
- var _super = _createSuper(CompactHorizontalBarChartComponent2);
15
+ import CompactHorizontalBar from "../../CompactHorizontalBar.mjs";
16
+ var CompactHorizontalBarChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
19
17
  function CompactHorizontalBarChartComponent2() {
20
18
  _classCallCheck(this, CompactHorizontalBarChartComponent2);
21
- return _super.apply(this, arguments);
19
+ return _callSuper(this, CompactHorizontalBarChartComponent2, arguments);
22
20
  }
23
- _createClass(CompactHorizontalBarChartComponent2, [{
21
+ _inherits(CompactHorizontalBarChartComponent2, _AbstractChart);
22
+ return _createClass(CompactHorizontalBarChartComponent2, [{
24
23
  key: "xScale",
25
24
  get: function get() {
26
25
  var _this$asProps$xScale;
@@ -90,14 +89,13 @@ var CompactHorizontalBarChartComponent = /* @__PURE__ */ function(_AbstractChart
90
89
  key: "valueScale",
91
90
  get: function get() {
92
91
  var _this$asProps4 = this.asProps, _this$asProps4$margin = _this$asProps4.marginY, marginY = _this$asProps4$margin === void 0 ? 0 : _this$asProps4$margin, plotWidth = _this$asProps4.plotWidth;
93
- var sum = _toConsumableArray(_get(_getPrototypeOf(CompactHorizontalBarChartComponent2.prototype), "flatValues", this).values()).reduce(function(acc, d) {
92
+ var sum = _toConsumableArray(_superPropGet(CompactHorizontalBarChartComponent2, "flatValues", this, 1).values()).reduce(function(acc, d) {
94
93
  return acc + d;
95
94
  }, 0);
96
95
  return scaleLinear().range([marginY, plotWidth]).domain([marginY, sum]);
97
96
  }
98
97
  }]);
99
- return CompactHorizontalBarChartComponent2;
100
- }(AbstractChart);
98
+ })(AbstractChart);
101
99
  _defineProperty(CompactHorizontalBarChartComponent, "displayName", "Chart.CompactHorizontalBar");
102
100
  _defineProperty(CompactHorizontalBarChartComponent, "defaultProps", {
103
101
  direction: "column",