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

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