@semcore/d3-chart 3.61.0-prerelease.1 → 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 (579) 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/area.shadow.css +2 -2
  156. package/lib/cjs/style/axis.shadow.css +39 -1
  157. package/lib/cjs/style/bar.shadow.css +1 -1
  158. package/lib/cjs/style/bubble.shadow.css +11 -3
  159. package/lib/cjs/style/donut.shadow.css +1 -1
  160. package/lib/cjs/style/dot.shadow.css +1 -1
  161. package/lib/cjs/style/hover.shadow.css +2 -2
  162. package/lib/cjs/style/line.shadow.css +2 -2
  163. package/lib/cjs/style/plot.shadow.css +8 -6
  164. package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
  165. package/lib/cjs/style/plotA11yView.shadow.css +13 -26
  166. package/lib/cjs/style/radar.shadow.css +3 -3
  167. package/lib/cjs/style/radial-tree.shadow.css +2 -2
  168. package/lib/cjs/style/scatterplot.shadow.css +2 -2
  169. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
  170. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  171. package/lib/cjs/translations/de.json +1 -0
  172. package/lib/cjs/translations/es.json +1 -0
  173. package/lib/cjs/translations/fr.json +1 -0
  174. package/lib/cjs/translations/it.json +1 -0
  175. package/lib/cjs/translations/ja.json +1 -0
  176. package/lib/cjs/translations/ko.json +1 -0
  177. package/lib/cjs/translations/nl.json +1 -0
  178. package/lib/cjs/translations/pl.json +1 -0
  179. package/lib/cjs/translations/pt.json +1 -0
  180. package/lib/cjs/translations/sv.json +1 -0
  181. package/lib/cjs/translations/tr.json +2 -1
  182. package/lib/cjs/translations/vi.json +1 -0
  183. package/lib/cjs/translations/zh.json +1 -0
  184. package/lib/cjs/types/Area.d.js.map +1 -1
  185. package/lib/cjs/types/Axis.d.js.map +1 -1
  186. package/lib/cjs/types/Bar.d.js.map +1 -1
  187. package/lib/cjs/types/Bubble.d.js.map +1 -1
  188. package/lib/cjs/types/ClipPath.d.js.map +1 -1
  189. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  190. package/lib/cjs/types/Donut.d.js.map +1 -1
  191. package/lib/cjs/types/GroupBar.d.js.map +1 -1
  192. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  193. package/lib/cjs/types/Hover.d.js.map +1 -1
  194. package/lib/cjs/types/Line.d.js.map +1 -1
  195. package/lib/cjs/types/Plot.d.js.map +1 -1
  196. package/lib/cjs/types/Radar.d.js.map +1 -1
  197. package/lib/cjs/types/Reference.d.js.map +1 -1
  198. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  199. package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
  200. package/lib/cjs/types/StackBar.d.js.map +1 -1
  201. package/lib/cjs/types/StackedArea.d.js.map +1 -1
  202. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  203. package/lib/cjs/types/Venn.d.js.map +1 -1
  204. package/lib/cjs/types/context.d.js.map +1 -1
  205. package/lib/cjs/types/index.d.js +14 -2
  206. package/lib/cjs/types/index.d.js.map +1 -1
  207. package/lib/cjs/utils.js +36 -55
  208. package/lib/cjs/utils.js.map +1 -1
  209. package/lib/es6/AnimatedClipPath.js +9 -11
  210. package/lib/es6/AnimatedClipPath.js.map +1 -1
  211. package/lib/es6/Area.js +70 -45
  212. package/lib/es6/Area.js.map +1 -1
  213. package/lib/es6/Axis.js +168 -104
  214. package/lib/es6/Axis.js.map +1 -1
  215. package/lib/es6/Bar.js +27 -29
  216. package/lib/es6/Bar.js.map +1 -1
  217. package/lib/es6/Bubble.js +211 -135
  218. package/lib/es6/Bubble.js.map +1 -1
  219. package/lib/es6/CompactHorizontalBar.js +89 -77
  220. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  221. package/lib/es6/Donut.js +154 -137
  222. package/lib/es6/Donut.js.map +1 -1
  223. package/lib/es6/Dots.js +55 -36
  224. package/lib/es6/Dots.js.map +1 -1
  225. package/lib/es6/GroupBar.js +13 -15
  226. package/lib/es6/GroupBar.js.map +1 -1
  227. package/lib/es6/HorizontalBar.js +27 -29
  228. package/lib/es6/HorizontalBar.js.map +1 -1
  229. package/lib/es6/Hover.js +51 -41
  230. package/lib/es6/Hover.js.map +1 -1
  231. package/lib/es6/Line.js +61 -37
  232. package/lib/es6/Line.js.map +1 -1
  233. package/lib/es6/Pattern.js +7 -3
  234. package/lib/es6/Pattern.js.map +1 -1
  235. package/lib/es6/Plot.js +28 -32
  236. package/lib/es6/Plot.js.map +1 -1
  237. package/lib/es6/Radar.js +279 -257
  238. package/lib/es6/Radar.js.map +1 -1
  239. package/lib/es6/RadialTree.js +168 -151
  240. package/lib/es6/RadialTree.js.map +1 -1
  241. package/lib/es6/Reference.js +43 -45
  242. package/lib/es6/Reference.js.map +1 -1
  243. package/lib/es6/ResponsiveContainer.js +16 -19
  244. package/lib/es6/ResponsiveContainer.js.map +1 -1
  245. package/lib/es6/ScatterPlot.js +71 -59
  246. package/lib/es6/ScatterPlot.js.map +1 -1
  247. package/lib/es6/StackBar.js +17 -27
  248. package/lib/es6/StackBar.js.map +1 -1
  249. package/lib/es6/StackedArea.js +10 -13
  250. package/lib/es6/StackedArea.js.map +1 -1
  251. package/lib/es6/Tooltip.js +68 -65
  252. package/lib/es6/Tooltip.js.map +1 -1
  253. package/lib/es6/Venn.js +75 -48
  254. package/lib/es6/Venn.js.map +1 -1
  255. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  256. package/lib/es6/a11y/PlotA11yModule.js +43 -86
  257. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  258. package/lib/es6/a11y/PlotA11yView.js +43 -16
  259. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  260. package/lib/es6/a11y/bezier.js.map +1 -1
  261. package/lib/es6/a11y/focus.js +4 -4
  262. package/lib/es6/a11y/focus.js.map +1 -1
  263. package/lib/es6/a11y/hints.js +2 -2
  264. package/lib/es6/a11y/hints.js.map +1 -1
  265. package/lib/es6/a11y/insights.js +61 -61
  266. package/lib/es6/a11y/insights.js.map +1 -1
  267. package/lib/es6/a11y/intl.js.map +1 -1
  268. package/lib/es6/a11y/locale.js +3 -2
  269. package/lib/es6/a11y/locale.js.map +1 -1
  270. package/lib/es6/a11y/serialize.js +14 -13
  271. package/lib/es6/a11y/serialize.js.map +1 -1
  272. package/lib/es6/a11y/summarize.js.map +1 -1
  273. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
  274. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  275. package/lib/es6/a11y/translations/module/de.json +2 -2
  276. package/lib/es6/a11y/translations/module/en.json +2 -2
  277. package/lib/es6/a11y/translations/module/es.json +2 -2
  278. package/lib/es6/a11y/translations/module/fr.json +2 -2
  279. package/lib/es6/a11y/translations/module/it.json +2 -2
  280. package/lib/es6/a11y/translations/module/ja.json +2 -2
  281. package/lib/es6/a11y/translations/module/ko.json +2 -2
  282. package/lib/es6/a11y/translations/module/nl.json +2 -2
  283. package/lib/es6/a11y/translations/module/pl.json +2 -2
  284. package/lib/es6/a11y/translations/module/pt.json +2 -2
  285. package/lib/es6/a11y/translations/module/sv.json +2 -2
  286. package/lib/es6/a11y/translations/module/tr.json +2 -2
  287. package/lib/es6/a11y/translations/module/vi.json +2 -2
  288. package/lib/es6/a11y/translations/module/zh.json +2 -2
  289. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
  290. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  291. package/lib/es6/color.js +1 -1
  292. package/lib/es6/color.js.map +1 -1
  293. package/lib/es6/component/Chart/AbstractChart.js +159 -80
  294. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  295. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  296. package/lib/es6/component/Chart/AreaChart.js +23 -48
  297. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  298. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  299. package/lib/es6/component/Chart/BarChart.js +84 -67
  300. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  301. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  302. package/lib/es6/component/Chart/BubbleChart.js +30 -24
  303. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  304. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  305. package/lib/es6/component/Chart/CigaretteChart.js +341 -144
  306. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  307. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  308. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +9 -12
  309. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  310. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  311. package/lib/es6/component/Chart/DonutChart.js +14 -18
  312. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  313. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  314. package/lib/es6/component/Chart/HistogramChart.js +15 -41
  315. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  316. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  317. package/lib/es6/component/Chart/LineChart.js +20 -45
  318. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  319. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  320. package/lib/es6/component/Chart/RadarChart.js +13 -16
  321. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  322. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  323. package/lib/es6/component/Chart/ScatterPlotChart.js +15 -18
  324. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  325. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  326. package/lib/es6/component/Chart/VennChart.js +14 -16
  327. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  328. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  329. package/lib/es6/component/Chart/index.js +6 -6
  330. package/lib/es6/component/Chart/index.js.map +1 -1
  331. package/lib/es6/component/ChartLegend/BaseLegend.js +43 -20
  332. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  333. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  334. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +17 -19
  335. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  336. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  337. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +102 -74
  338. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  339. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  340. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +15 -17
  341. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  342. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  343. package/lib/es6/component/ChartLegend/index.js.map +1 -1
  344. package/lib/es6/component/Cigarette/Cigarette.js +14 -17
  345. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  346. package/lib/es6/component/StackGroupBar/StackGroupBar.js +17 -21
  347. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  348. package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  349. package/lib/es6/component/SvgElement.js +14 -0
  350. package/lib/es6/component/SvgElement.js.map +1 -0
  351. package/lib/es6/createElement.d.js.map +1 -1
  352. package/lib/es6/createElement.js +7 -7
  353. package/lib/es6/createElement.js.map +1 -1
  354. package/lib/es6/index.js +1 -0
  355. package/lib/es6/index.js.map +1 -1
  356. package/lib/es6/style/abstract-chart.shadow.css +12 -0
  357. package/lib/es6/style/area.shadow.css +2 -2
  358. package/lib/es6/style/axis.shadow.css +39 -1
  359. package/lib/es6/style/bar.shadow.css +1 -1
  360. package/lib/es6/style/bubble.shadow.css +11 -3
  361. package/lib/es6/style/donut.shadow.css +1 -1
  362. package/lib/es6/style/dot.shadow.css +1 -1
  363. package/lib/es6/style/hover.shadow.css +2 -2
  364. package/lib/es6/style/line.shadow.css +2 -2
  365. package/lib/es6/style/plot.shadow.css +8 -6
  366. package/lib/es6/style/plotA11yModule.shadow.css +10 -11
  367. package/lib/es6/style/plotA11yView.shadow.css +13 -26
  368. package/lib/es6/style/radar.shadow.css +3 -3
  369. package/lib/es6/style/radial-tree.shadow.css +2 -2
  370. package/lib/es6/style/scatterplot.shadow.css +2 -2
  371. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  372. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  373. package/lib/es6/translations/de.json +1 -0
  374. package/lib/es6/translations/es.json +1 -0
  375. package/lib/es6/translations/fr.json +1 -0
  376. package/lib/es6/translations/it.json +1 -0
  377. package/lib/es6/translations/ja.json +1 -0
  378. package/lib/es6/translations/ko.json +1 -0
  379. package/lib/es6/translations/nl.json +1 -0
  380. package/lib/es6/translations/pl.json +1 -0
  381. package/lib/es6/translations/pt.json +1 -0
  382. package/lib/es6/translations/sv.json +1 -0
  383. package/lib/es6/translations/tr.json +2 -1
  384. package/lib/es6/translations/vi.json +1 -0
  385. package/lib/es6/translations/zh.json +1 -0
  386. package/lib/es6/types/Area.d.js.map +1 -1
  387. package/lib/es6/types/Axis.d.js.map +1 -1
  388. package/lib/es6/types/Bar.d.js.map +1 -1
  389. package/lib/es6/types/Bubble.d.js.map +1 -1
  390. package/lib/es6/types/ClipPath.d.js.map +1 -1
  391. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  392. package/lib/es6/types/Donut.d.js.map +1 -1
  393. package/lib/es6/types/GroupBar.d.js.map +1 -1
  394. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  395. package/lib/es6/types/Hover.d.js.map +1 -1
  396. package/lib/es6/types/Line.d.js.map +1 -1
  397. package/lib/es6/types/Plot.d.js.map +1 -1
  398. package/lib/es6/types/Radar.d.js.map +1 -1
  399. package/lib/es6/types/Reference.d.js.map +1 -1
  400. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  401. package/lib/es6/types/ScatterPlot.d.js.map +1 -1
  402. package/lib/es6/types/StackBar.d.js.map +1 -1
  403. package/lib/es6/types/StackedArea.d.js.map +1 -1
  404. package/lib/es6/types/Tooltip.d.js.map +1 -1
  405. package/lib/es6/types/Venn.d.js.map +1 -1
  406. package/lib/es6/types/context.d.js.map +1 -1
  407. package/lib/es6/types/index.d.js +2 -0
  408. package/lib/es6/types/index.d.js.map +1 -1
  409. package/lib/es6/utils.js +16 -16
  410. package/lib/es6/utils.js.map +1 -1
  411. package/lib/esm/AnimatedClipPath.mjs +9 -16
  412. package/lib/esm/Area.mjs +51 -36
  413. package/lib/esm/Axis.mjs +143 -86
  414. package/lib/esm/Bar.mjs +31 -34
  415. package/lib/esm/Bubble.mjs +154 -106
  416. package/lib/esm/CompactHorizontalBar.mjs +88 -80
  417. package/lib/esm/Donut.mjs +87 -75
  418. package/lib/esm/Dots.mjs +50 -34
  419. package/lib/esm/GroupBar.mjs +12 -14
  420. package/lib/esm/HorizontalBar.mjs +31 -34
  421. package/lib/esm/Hover.mjs +53 -50
  422. package/lib/esm/Line.mjs +45 -31
  423. package/lib/esm/Pattern.mjs +4 -2
  424. package/lib/esm/Plot.mjs +30 -35
  425. package/lib/esm/Radar.mjs +188 -175
  426. package/lib/esm/RadialTree.mjs +105 -111
  427. package/lib/esm/Reference.mjs +37 -40
  428. package/lib/esm/ResponsiveContainer.mjs +18 -21
  429. package/lib/esm/ScatterPlot.mjs +49 -40
  430. package/lib/esm/StackBar.mjs +18 -28
  431. package/lib/esm/StackedArea.mjs +13 -16
  432. package/lib/esm/Tooltip.mjs +56 -59
  433. package/lib/esm/Venn.mjs +67 -47
  434. package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
  435. package/lib/esm/a11y/PlotA11yModule.mjs +35 -74
  436. package/lib/esm/a11y/PlotA11yView.mjs +41 -17
  437. package/lib/esm/a11y/focus.mjs +4 -4
  438. package/lib/esm/a11y/hints.mjs +2 -2
  439. package/lib/esm/a11y/insights.mjs +76 -76
  440. package/lib/esm/a11y/locale.mjs +2 -2
  441. package/lib/esm/a11y/serialize.mjs +12 -12
  442. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
  443. package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
  444. package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
  445. package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
  446. package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
  447. package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
  448. package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
  449. package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
  450. package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
  451. package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
  452. package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
  453. package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
  454. package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
  455. package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
  456. package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
  457. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
  458. package/lib/esm/component/Chart/AbstractChart.mjs +141 -65
  459. package/lib/esm/component/Chart/AreaChart.mjs +27 -51
  460. package/lib/esm/component/Chart/BarChart.mjs +64 -51
  461. package/lib/esm/component/Chart/BubbleChart.mjs +30 -25
  462. package/lib/esm/component/Chart/CigaretteChart.mjs +298 -119
  463. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +13 -15
  464. package/lib/esm/component/Chart/DonutChart.mjs +16 -19
  465. package/lib/esm/component/Chart/HistogramChart.mjs +22 -46
  466. package/lib/esm/component/Chart/LineChart.mjs +23 -46
  467. package/lib/esm/component/Chart/RadarChart.mjs +16 -18
  468. package/lib/esm/component/Chart/ScatterPlotChart.mjs +18 -21
  469. package/lib/esm/component/Chart/VennChart.mjs +16 -19
  470. package/lib/esm/component/Chart/index.mjs +6 -6
  471. package/lib/esm/component/ChartLegend/BaseLegend.mjs +45 -22
  472. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +19 -22
  473. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +88 -75
  474. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +22 -25
  475. package/lib/esm/component/ChartLegend/index.mjs +2 -0
  476. package/lib/esm/component/Cigarette/Cigarette.mjs +16 -19
  477. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +18 -22
  478. package/lib/esm/component/SvgElement.mjs +14 -0
  479. package/lib/esm/createElement.mjs +8 -10
  480. package/lib/esm/index.mjs +3 -0
  481. package/lib/esm/style/abstract-chart.shadow.css +12 -0
  482. package/lib/esm/style/area.shadow.css +2 -2
  483. package/lib/esm/style/axis.shadow.css +39 -1
  484. package/lib/esm/style/bar.shadow.css +1 -1
  485. package/lib/esm/style/bubble.shadow.css +11 -3
  486. package/lib/esm/style/donut.shadow.css +1 -1
  487. package/lib/esm/style/dot.shadow.css +1 -1
  488. package/lib/esm/style/hover.shadow.css +2 -2
  489. package/lib/esm/style/line.shadow.css +2 -2
  490. package/lib/esm/style/plot.shadow.css +8 -6
  491. package/lib/esm/style/plotA11yModule.shadow.css +10 -11
  492. package/lib/esm/style/plotA11yView.shadow.css +13 -26
  493. package/lib/esm/style/radar.shadow.css +3 -3
  494. package/lib/esm/style/radial-tree.shadow.css +2 -2
  495. package/lib/esm/style/scatterplot.shadow.css +2 -2
  496. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  497. package/lib/esm/translations/es.json.mjs +1 -0
  498. package/lib/esm/translations/fr.json.mjs +1 -0
  499. package/lib/esm/translations/it.json.mjs +1 -0
  500. package/lib/esm/translations/ja.json.mjs +1 -0
  501. package/lib/esm/translations/ko.json.mjs +1 -0
  502. package/lib/esm/translations/nl.json.mjs +1 -0
  503. package/lib/esm/translations/pl.json.mjs +1 -0
  504. package/lib/esm/translations/pt.json.mjs +1 -0
  505. package/lib/esm/translations/sv.json.mjs +1 -0
  506. package/lib/esm/translations/tr.json.mjs +2 -1
  507. package/lib/esm/translations/vi.json.mjs +1 -0
  508. package/lib/esm/translations/zh.json.mjs +1 -0
  509. package/lib/esm/utils.mjs +11 -11
  510. package/lib/types/Area.d.ts +9 -6
  511. package/lib/types/Axis.d.ts +10 -3
  512. package/lib/types/Bar.d.ts +7 -6
  513. package/lib/types/Bubble.d.ts +21 -5
  514. package/lib/types/ClipPath.d.ts +4 -3
  515. package/lib/types/CompactHorizontalBar.d.ts +7 -8
  516. package/lib/types/Donut.d.ts +8 -5
  517. package/lib/types/GroupBar.d.ts +6 -6
  518. package/lib/types/HorizontalBar.d.ts +7 -6
  519. package/lib/types/Hover.d.ts +8 -8
  520. package/lib/types/Line.d.ts +9 -6
  521. package/lib/types/Pattern.d.ts +51 -51
  522. package/lib/types/Plot.d.ts +11 -9
  523. package/lib/types/Radar.d.ts +10 -7
  524. package/lib/types/RadialTree.d.ts +10 -54
  525. package/lib/types/Reference.d.ts +6 -5
  526. package/lib/types/ResponsiveContainer.d.ts +5 -4
  527. package/lib/types/ScatterPlot.d.ts +8 -5
  528. package/lib/types/StackBar.d.ts +7 -6
  529. package/lib/types/StackedArea.d.ts +6 -5
  530. package/lib/types/Tooltip.d.ts +12 -12
  531. package/lib/types/Venn.d.ts +7 -6
  532. package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
  533. package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
  534. package/lib/types/a11y/PlotA11yView.d.ts +13 -2
  535. package/lib/types/a11y/hints.d.ts +5 -5
  536. package/lib/types/a11y/insights.d.ts +1 -1
  537. package/lib/types/a11y/intl.d.ts +1 -1
  538. package/lib/types/a11y/serialize.d.ts +7 -7
  539. package/lib/types/a11y/summarize.d.ts +2 -2
  540. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
  541. package/lib/types/component/Chart/AbstractChart.d.ts +20 -13
  542. package/lib/types/component/Chart/AbstractChart.type.d.ts +39 -25
  543. package/lib/types/component/Chart/AreaChart.d.ts +1 -1
  544. package/lib/types/component/Chart/AreaChart.type.d.ts +17 -7
  545. package/lib/types/component/Chart/BarChart.d.ts +1 -1
  546. package/lib/types/component/Chart/BarChart.type.d.ts +14 -9
  547. package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
  548. package/lib/types/component/Chart/BubbleChart.type.d.ts +10 -5
  549. package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
  550. package/lib/types/component/Chart/CigaretteChart.type.d.ts +18 -8
  551. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
  552. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +10 -6
  553. package/lib/types/component/Chart/DonutChart.d.ts +1 -1
  554. package/lib/types/component/Chart/DonutChart.type.d.ts +16 -7
  555. package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
  556. package/lib/types/component/Chart/HistogramChart.type.d.ts +7 -4
  557. package/lib/types/component/Chart/LineChart.d.ts +1 -1
  558. package/lib/types/component/Chart/LineChart.type.d.ts +16 -7
  559. package/lib/types/component/Chart/RadarChart.d.ts +1 -1
  560. package/lib/types/component/Chart/RadarChart.type.d.ts +7 -5
  561. package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
  562. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +12 -6
  563. package/lib/types/component/Chart/VennChart.d.ts +1 -1
  564. package/lib/types/component/Chart/VennChart.type.d.ts +12 -6
  565. package/lib/types/component/ChartLegend/BaseLegend.d.ts +8 -6
  566. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
  567. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
  568. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
  569. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
  570. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
  571. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
  572. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
  573. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
  574. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
  575. package/lib/types/component/SvgElement.d.ts +10 -0
  576. package/lib/types/index.d.ts +3 -1
  577. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +12 -0
  578. package/lib/types/utils.d.ts +17 -17
  579. package/package.json +13 -13
package/lib/esm/Donut.mjs CHANGED
@@ -2,46 +2,45 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
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
8
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
10
- import { sstyled } from "@semcore/utils/lib/core/index";
11
- import { Component, sstyled as sstyled$1, assignProps } from "@semcore/core";
12
- import React from "react";
13
- import { arc, pie } from "d3-shape";
9
+ import { sstyled, Component, assignProps } from "@semcore/core";
10
+ import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
11
+ import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
12
+ import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
13
+ import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
14
14
  import { interpolate } from "d3-interpolate";
15
+ import { arc, pie } from "d3-shape";
15
16
  import { transition } from "d3-transition";
16
- import canUseDOM from "@semcore/utils/lib/canUseDOM";
17
- import getOriginChildren from "@semcore/utils/lib/getOriginChildren";
18
- import uniqueIDEnhancement from "@semcore/utils/lib/uniqueID";
17
+ import React from "react";
19
18
  import createElement from "./createElement.mjs";
20
- import { getChartDefaultColorName } from "./utils.mjs";
21
- import Tooltip from "./Tooltip.mjs";
22
19
  import { PatternFill } from "./Pattern.mjs";
23
- var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler", "transparent", "innerRadius", "outerRadius", "resolveColor", "halfsize", "uid", "patterns"];
20
+ import Tooltip from "./Tooltip.mjs";
21
+ import { getChartDefaultColorName } from "./utils.mjs";
22
+ var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler", "transparent", "innerRadius", "outerRadius", "resolveColor", "halfsize", "uid", "patterns", "onClick", "onClickPieRoot"];
24
23
  /*!__reshadow-styles__:"./style/donut.shadow.css"*/
25
24
  var style = (
26
25
  /*__reshadow_css_start__*/
27
26
  (sstyled.insert(
28
27
  /*__inner_css_start__*/
29
- ".___SPie_9fyho_gg_{stroke:var(--intergalactic-chart-grid-border, #fff);fill:var(--intergalactic-chart-palette-order-1, rgb(104, 109, 210))}.___SPie_9fyho_gg_.__color_9fyho_gg_{fill:var(--color_9fyho)}.___SPie_9fyho_gg_.__pattern_9fyho_gg_.__color_9fyho_gg_{fill:var(--pattern_9fyho);stroke:var(--color_9fyho);stroke-width:1px}.___SPie_9fyho_gg_.__transparent_9fyho_gg_{opacity:.3}.___SEmptyData_9fyho_gg_{fill:var(--intergalactic-chart-palette-order-null, rgb(221, 222, 222))}.___SEmptyData_9fyho_gg_.__color_9fyho_gg_{fill:var(--color_9fyho)}.___SLabel_9fyho_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}",
28
+ ".___SPie_tg3q1_gg_{stroke:var(--intergalactic-chart-grid-border, #fff);fill:var(--intergalactic-chart-palette-order-1, rgb(102, 107, 219))}.___SPie_tg3q1_gg_.__color_tg3q1_gg_{fill:var(--color_tg3q1)}.___SPie_tg3q1_gg_.__pattern_tg3q1_gg_.__color_tg3q1_gg_{fill:var(--pattern_tg3q1);stroke:var(--color_tg3q1);stroke-width:1px}.___SPie_tg3q1_gg_.__transparent_tg3q1_gg_{opacity:.3}.___SEmptyData_tg3q1_gg_{fill:var(--intergalactic-chart-palette-order-null, rgb(221, 222, 222))}.___SEmptyData_tg3q1_gg_.__color_tg3q1_gg_{fill:var(--color_tg3q1)}.___SLabel_tg3q1_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}",
30
29
  /*__inner_css_end__*/
31
- "9fyho_gg_"
30
+ "tg3q1_gg_"
32
31
  ), /*__reshadow_css_end__*/
33
32
  {
34
- "__SPie": "___SPie_9fyho_gg_",
35
- "_color": "__color_9fyho_gg_",
36
- "--color": "--color_9fyho",
37
- "_pattern": "__pattern_9fyho_gg_",
38
- "--pattern": "--pattern_9fyho",
39
- "_transparent": "__transparent_9fyho_gg_",
40
- "__SEmptyData": "___SEmptyData_9fyho_gg_",
41
- "__SLabel": "___SLabel_9fyho_gg_"
33
+ "__SPie": "___SPie_tg3q1_gg_",
34
+ "_color": "__color_tg3q1_gg_",
35
+ "--color": "--color_tg3q1",
36
+ "_pattern": "__pattern_tg3q1_gg_",
37
+ "--pattern": "--pattern_tg3q1",
38
+ "_transparent": "__transparent_tg3q1_gg_",
39
+ "__SEmptyData": "___SEmptyData_tg3q1_gg_",
40
+ "__SLabel": "___SLabel_tg3q1_gg_"
42
41
  })
43
42
  );
44
- var DEFAULT_INSTANCE = Symbol("DEFAULT_INSTANCE");
43
+ var DEFAULT_INSTANCE = /* @__PURE__ */ Symbol("DEFAULT_INSTANCE");
45
44
  function transitionAnglePie(_ref6) {
46
45
  var selector = _ref6.selector, duration = _ref6.duration, halfsize = _ref6.halfsize, d3Arc = _ref6.d3Arc, d3ArcOut = _ref6.d3ArcOut, arcs = _ref6.arcs, activeIndexPie = _ref6.activeIndexPie;
47
46
  return transition().selection().selectAll(selector).interrupt().transition().duration(duration).attrTween("d", function(_, ind) {
@@ -87,31 +86,29 @@ function getOuterRadius(_ref8) {
87
86
  var minORmax = halfsize ? Math.max : Math.min;
88
87
  return minORmax(width - increaseFactor * 2, height - increaseFactor * 2) / 2;
89
88
  }
90
- var DonutRoot = /* @__PURE__ */ function(_Component) {
91
- _inherits(DonutRoot2, _Component);
92
- var _super = _createSuper(DonutRoot2);
89
+ var DonutRoot = /* @__PURE__ */ (function(_Component) {
93
90
  function DonutRoot2() {
94
91
  var _this;
95
92
  _classCallCheck(this, DonutRoot2);
96
93
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
97
94
  args[_key] = arguments[_key];
98
95
  }
99
- _this = _super.call.apply(_super, [this].concat(args));
100
- _defineProperty(_assertThisInitialized(_this), "virtualElement", canUseDOM() ? document.createElement("div") : {});
101
- _defineProperty(_assertThisInitialized(_this), "activeIndexPie", void 0);
102
- _defineProperty(_assertThisInitialized(_this), "canAnimatedHover", false);
103
- _defineProperty(_assertThisInitialized(_this), "bindHandlerTooltip", function(visible, props, tooltipProps) {
96
+ _this = _callSuper(this, DonutRoot2, [].concat(args));
97
+ _defineProperty(_this, "virtualElement", canUseDOM() ? document.createElement("div") : {});
98
+ _defineProperty(_this, "activeIndexPie", void 0);
99
+ _defineProperty(_this, "canAnimatedHover", false);
100
+ _defineProperty(_this, "bindHandlerTooltip", function(visible, props, tooltipProps) {
104
101
  return function(_ref9) {
105
102
  var clientX = _ref9.clientX, clientY = _ref9.clientY;
106
- var eventEmitter = _this.asProps.eventEmitter;
107
- eventEmitter.emit("setTooltipPosition", clientX, clientY);
108
- eventEmitter.emit("setTooltipRenderingProps", props, tooltipProps);
109
- eventEmitter.emit("setTooltipVisible", visible);
103
+ var _this$asProps = _this.asProps, eventEmitter = _this$asProps.eventEmitter, plotId = _this$asProps.plotId;
104
+ eventEmitter.emit("setTooltipPosition_".concat(plotId), clientX, clientY);
105
+ eventEmitter.emit("setTooltipRenderingProps_".concat(plotId), props, tooltipProps);
106
+ eventEmitter.emit("setTooltipVisible_".concat(plotId), visible);
110
107
  };
111
108
  });
112
- _defineProperty(_assertThisInitialized(_this), "animationActivePie", function(_ref10) {
113
- var data = _ref10.data, active = _ref10.active, selector = _ref10.selector, element = _ref10.element;
114
- var _this$asProps = _this.asProps, duration = _this$asProps.duration, innerRadius = _this$asProps.innerRadius, d3Arc = _this$asProps.d3Arc, paddingAngle = _this$asProps.paddingAngle;
109
+ _defineProperty(_this, "animationActivePie", function(_ref0) {
110
+ var data = _ref0.data, active = _ref0.active, selector = _ref0.selector, element = _ref0.element;
111
+ var _this$asProps2 = _this.asProps, duration = _this$asProps2.duration, innerRadius = _this$asProps2.innerRadius, d3Arc = _this$asProps2.d3Arc, paddingAngle = _this$asProps2.paddingAngle;
115
112
  var outerRadius = d3Arc.outerRadius()();
116
113
  var outerRadiusStartEnd = active ? [+element.dataset["currentRadius"] || outerRadius, outerRadius + increaseFactor] : [+element.dataset["currentRadius"] || outerRadius, outerRadius];
117
114
  if (_this.canAnimatedHover && duration > 0) {
@@ -126,11 +123,11 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
126
123
  });
127
124
  }
128
125
  });
129
- _defineProperty(_assertThisInitialized(_this), "animationTimeout", null);
130
- _defineProperty(_assertThisInitialized(_this), "animationUpdatePie", function() {
126
+ _defineProperty(_this, "animationTimeout", null);
127
+ _defineProperty(_this, "animationUpdatePie", function() {
131
128
  clearTimeout(_this.animationTimeout);
132
129
  _this.animationTimeout = setTimeout(function() {
133
- var _this$asProps2 = _this.asProps, duration = _this$asProps2.duration, d3Arc = _this$asProps2.d3Arc, halfsize = _this$asProps2.halfsize, d3ArcOut = _this$asProps2.d3ArcOut;
130
+ var _this$asProps3 = _this.asProps, duration = _this$asProps3.duration, d3Arc = _this$asProps3.d3Arc, halfsize = _this$asProps3.halfsize, d3ArcOut = _this$asProps3.d3ArcOut;
134
131
  _this.canAnimatedHover = false;
135
132
  if (duration > 0) {
136
133
  transitionAnglePie({
@@ -151,10 +148,11 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
151
148
  });
152
149
  return _this;
153
150
  }
154
- _createClass(DonutRoot2, [{
151
+ _inherits(DonutRoot2, _Component);
152
+ return _createClass(DonutRoot2, [{
155
153
  key: "id",
156
154
  get: function get() {
157
- var _this$asProps3 = this.asProps, uid = _this$asProps3.uid, id = _this$asProps3.id;
155
+ var _this$asProps4 = this.asProps, uid = _this$asProps4.uid, id = _this$asProps4.id;
158
156
  return id || uid;
159
157
  }
160
158
  }, {
@@ -176,7 +174,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
176
174
  }, {
177
175
  key: "getArcs",
178
176
  value: function getArcs() {
179
- var _this$asProps4 = this.asProps, Children = _this$asProps4.Children, data = _this$asProps4.data, d3Pie = _this$asProps4.d3Pie;
177
+ var _this$asProps5 = this.asProps, Children = _this$asProps5.Children, data = _this$asProps5.data, d3Pie = _this$asProps5.d3Pie;
180
178
  var pieData = Object.entries(data);
181
179
  if (d3Pie[DEFAULT_INSTANCE]) {
182
180
  var keys = React.Children.toArray(getOriginChildren(Children)).reduce(function(acc, child) {
@@ -185,12 +183,12 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
185
183
  }
186
184
  return acc;
187
185
  }, []);
188
- pieData = Object.entries(data).filter(function(_ref11) {
189
- var _ref12 = _slicedToArray(_ref11, 2), key = _ref12[0], value = _ref12[1];
186
+ pieData = Object.entries(data).filter(function(_ref1) {
187
+ var _ref10 = _slicedToArray(_ref1, 2), key = _ref10[0], value = _ref10[1];
190
188
  return keys.includes(key) && value > 0;
191
- }).sort(function(_ref13, _ref14) {
192
- var _ref15 = _slicedToArray(_ref13, 1), a = _ref15[0];
193
- var _ref16 = _slicedToArray(_ref14, 1), b = _ref16[0];
189
+ }).sort(function(_ref11, _ref12) {
190
+ var _ref13 = _slicedToArray(_ref11, 1), a = _ref13[0];
191
+ var _ref14 = _slicedToArray(_ref12, 1), b = _ref14[0];
194
192
  return keys.indexOf(a) > keys.indexOf(b) ? 1 : -1;
195
193
  });
196
194
  }
@@ -204,11 +202,22 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
204
202
  });
205
203
  return d3Pie(pieData);
206
204
  }
205
+ }, {
206
+ key: "handlerOnClick",
207
+ value: function handlerOnClick(key) {
208
+ var _this2 = this;
209
+ return function(e) {
210
+ e.stopPropagation();
211
+ var onClick = _this2.asProps.onClick;
212
+ if (!onClick) return;
213
+ onClick(key, e);
214
+ };
215
+ }
207
216
  }, {
208
217
  key: "getPieProps",
209
218
  value: function getPieProps(props, index) {
210
- var _this2 = this;
211
- var _this$asProps5 = this.asProps, d3Arc = _this$asProps5.d3Arc, d3ArcOut = _this$asProps5.d3ArcOut, innerRadius = _this$asProps5.innerRadius, outerRadius = _this$asProps5.outerRadius, halfsize = _this$asProps5.halfsize, resolveColor = _this$asProps5.resolveColor, uid = _this$asProps5.uid, patterns = _this$asProps5.patterns;
219
+ var _this3 = this;
220
+ var _this$asProps6 = this.asProps, d3Arc = _this$asProps6.d3Arc, d3ArcOut = _this$asProps6.d3ArcOut, innerRadius = _this$asProps6.innerRadius, outerRadius = _this$asProps6.outerRadius, halfsize = _this$asProps6.halfsize, resolveColor = _this$asProps6.resolveColor, uid = _this$asProps6.uid, patterns = _this$asProps6.patterns;
212
221
  var active = props.active;
213
222
  var data = this.arcs.find(function(arc2) {
214
223
  return arc2.data[0] === props.dataKey;
@@ -241,7 +250,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
241
250
  onMouseLeave: this.bindHandlerTooltip(false, props, tooltipProps),
242
251
  onMouseOver: function onMouseOver(e) {
243
252
  if (!active) {
244
- _this2.animationActivePie({
253
+ _this3.animationActivePie({
245
254
  active: true,
246
255
  data,
247
256
  selector: '[d="'.concat(e.target.getAttribute("d"), '"]'),
@@ -251,14 +260,15 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
251
260
  },
252
261
  onMouseOut: function onMouseOut(e) {
253
262
  if (!active) {
254
- _this2.animationActivePie({
263
+ _this3.animationActivePie({
255
264
  active: false,
256
265
  data,
257
266
  selector: '[d="'.concat(e.target.getAttribute("d"), '"]'),
258
267
  element: e.target
259
268
  });
260
269
  }
261
- }
270
+ },
271
+ onClickPieRoot: this.handlerOnClick(props.dataKey)
262
272
  };
263
273
  }
264
274
  }, {
@@ -285,7 +295,7 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
285
295
  }, {
286
296
  key: "render",
287
297
  value: function render() {
288
- var _this$asProps6 = this.asProps, halfsize = _this$asProps6.halfsize, size = _this$asProps6.size;
298
+ var _this$asProps7 = this.asProps, halfsize = _this$asProps7.halfsize, size = _this$asProps7.size;
289
299
  this.asProps.dataHintsHandler.establishDataType("values-set");
290
300
  var _size2 = _slicedToArray(size, 2), width = _size2[0], height = _size2[1];
291
301
  var Element = this.Element;
@@ -300,13 +310,12 @@ var DonutRoot = /* @__PURE__ */ function(_Component) {
300
310
  });
301
311
  }
302
312
  }]);
303
- return DonutRoot2;
304
- }(Component);
313
+ })(Component);
305
314
  _defineProperty(DonutRoot, "displayName", "Donut");
306
315
  _defineProperty(DonutRoot, "style", style);
307
316
  _defineProperty(DonutRoot, "enhance", [uniqueIDEnhancement()]);
308
- _defineProperty(DonutRoot, "defaultProps", function(_ref20) {
309
- var _ref20$innerRadius = _ref20.innerRadius, innerRadius = _ref20$innerRadius === void 0 ? 0 : _ref20$innerRadius, _ref20$paddingAngle = _ref20.paddingAngle, paddingAngle = _ref20$paddingAngle === void 0 ? 0 : _ref20$paddingAngle, outerRadius = _ref20.outerRadius, _ref20$halfsize = _ref20.halfsize, halfsize = _ref20$halfsize === void 0 ? false : _ref20$halfsize, size = _ref20.$rootProps.size;
317
+ _defineProperty(DonutRoot, "defaultProps", function(_ref18) {
318
+ var _ref18$innerRadius = _ref18.innerRadius, innerRadius = _ref18$innerRadius === void 0 ? 0 : _ref18$innerRadius, _ref18$paddingAngle = _ref18.paddingAngle, paddingAngle = _ref18$paddingAngle === void 0 ? 0 : _ref18$paddingAngle, outerRadius = _ref18.outerRadius, _ref18$halfsize = _ref18.halfsize, halfsize = _ref18$halfsize === void 0 ? false : _ref18$halfsize, size = _ref18.$rootProps.size;
310
319
  var d3Arc = arc().outerRadius(outerRadius || getOuterRadius({
311
320
  size,
312
321
  halfsize,
@@ -316,8 +325,8 @@ _defineProperty(DonutRoot, "defaultProps", function(_ref20) {
316
325
  size,
317
326
  halfsize
318
327
  })) + increaseFactor).innerRadius(innerRadius).padAngle(paddingAngle);
319
- var d3Pie = pie().sort(null).value(function(_ref21) {
320
- var _ref22 = _slicedToArray(_ref21, 2), value = _ref22[1];
328
+ var d3Pie = pie().sort(null).value(function(_ref19) {
329
+ var _ref20 = _slicedToArray(_ref19, 2), value = _ref20[1];
321
330
  return value;
322
331
  });
323
332
  d3Pie[DEFAULT_INSTANCE] = true;
@@ -329,12 +338,13 @@ _defineProperty(DonutRoot, "defaultProps", function(_ref20) {
329
338
  d3Arc,
330
339
  d3ArcOut,
331
340
  duration: 500,
332
- paddingAngle
341
+ paddingAngle,
342
+ innerRadius
333
343
  };
334
344
  });
335
- function Pie(_ref17) {
345
+ function Pie(_ref15) {
336
346
  var _ref2;
337
- var SPie = _ref17.Element, styles = _ref17.styles, d3Arc = _ref17.d3Arc, data = _ref17.data, color = _ref17.color, $animationActivePie = _ref17.$animationActivePie, active = _ref17.active, d3ArcOut = _ref17.d3ArcOut, name = _ref17.name, dataKey = _ref17.dataKey, dataHintsHandler = _ref17.dataHintsHandler, transparent = _ref17.transparent, innerRadius = _ref17.innerRadius, outerRadius = _ref17.outerRadius, resolveColor = _ref17.resolveColor, halfsize = _ref17.halfsize, uid = _ref17.uid, patterns = _ref17.patterns, other = _objectWithoutProperties(_ref17, _excluded);
347
+ var SPie = _ref15.Element, styles = _ref15.styles, d3Arc = _ref15.d3Arc, data = _ref15.data, color = _ref15.color, $animationActivePie = _ref15.$animationActivePie, active = _ref15.active, d3ArcOut = _ref15.d3ArcOut, name = _ref15.name, dataKey = _ref15.dataKey, dataHintsHandler = _ref15.dataHintsHandler, transparent = _ref15.transparent, innerRadius = _ref15.innerRadius, outerRadius = _ref15.outerRadius, resolveColor = _ref15.resolveColor, halfsize = _ref15.halfsize, uid = _ref15.uid, patterns = _ref15.patterns, onClick = _ref15.onClick, onClickPieRoot = _ref15.onClickPieRoot, other = _objectWithoutProperties(_ref15, _excluded);
338
348
  var _React$useState = React.useState(false), _React$useState2 = _slicedToArray(_React$useState, 2), isMount = _React$useState2[0], setIsMount = _React$useState2[1];
339
349
  var pieRef = React.useRef(null);
340
350
  React.useEffect(function() {
@@ -360,13 +370,14 @@ function Pie(_ref17) {
360
370
  if (!data) return null;
361
371
  dataHintsHandler.establishDataType("values-set");
362
372
  dataHintsHandler.describeValueEntity(dataKey, name);
363
- return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref2 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SPie, _ref2.cn("SPie", {
373
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SPie, _ref2.cn("SPie", {
364
374
  "render": "path",
365
375
  "ref": pieRef,
366
376
  "color": resolveColor(color),
367
377
  "pattern": patterns ? "url(#".concat(uid, "-pattern)") : void 0,
368
378
  "d": active ? d3ArcOut(data) : d3Arc(data),
369
- "transparent": transparent
379
+ "transparent": transparent,
380
+ "use:onClick": callAllEventHandlers(onClickPieRoot, onClick)
370
381
  }))), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref2.cn("PatternFill", {
371
382
  "id": "".concat(uid, "-pattern"),
372
383
  "patternKey": color,
@@ -374,10 +385,10 @@ function Pie(_ref17) {
374
385
  "patterns": patterns
375
386
  })));
376
387
  }
377
- function EmptyData(_ref18) {
388
+ function EmptyData(_ref16) {
378
389
  var _ref3;
379
- var SEmptyData = _ref18.Element, styles = _ref18.styles, d3Arc = _ref18.d3Arc, color = _ref18.color, resolveColor = _ref18.resolveColor;
380
- return _ref3 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SEmptyData, _ref3.cn("SEmptyData", {
390
+ var SEmptyData = _ref16.Element, styles = _ref16.styles, d3Arc = _ref16.d3Arc, color = _ref16.color, resolveColor = _ref16.resolveColor;
391
+ return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SEmptyData, _ref3.cn("SEmptyData", {
381
392
  "render": "path",
382
393
  "color": resolveColor(color),
383
394
  "d": d3Arc({
@@ -386,24 +397,25 @@ function EmptyData(_ref18) {
386
397
  })
387
398
  }));
388
399
  }
389
- function Label(_ref19) {
400
+ function Label(_ref17) {
390
401
  var _ref4;
391
- var SLabel = _ref19.Element, styles = _ref19.styles, Children = _ref19.Children, children = _ref19.children, label = _ref19.label, dataHintsHandler = _ref19.dataHintsHandler, _ref19$x = _ref19.x, x = _ref19$x === void 0 ? 0 : _ref19$x, _ref19$y = _ref19.y, y = _ref19$y === void 0 ? 0 : _ref19$y;
402
+ var SLabel = _ref17.Element, styles = _ref17.styles, Children = _ref17.Children, children = _ref17.children, label = _ref17.label, dataHintsHandler = _ref17.dataHintsHandler, _ref17$x = _ref17.x, x = _ref17$x === void 0 ? 0 : _ref17$x, _ref17$y = _ref17.y, y = _ref17$y === void 0 ? 0 : _ref17$y;
392
403
  dataHintsHandler.setTitle("vertical", label || children);
393
- return _ref4 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SLabel, _ref4.cn("SLabel", {
404
+ return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SLabel, _ref4.cn("SLabel", {
394
405
  "render": "text",
395
406
  "x": x,
396
407
  "y": y,
397
408
  "aria-hidden": true
398
409
  }), /* @__PURE__ */ React.createElement(Children, _ref4.cn("Children", {})));
399
410
  }
400
- var DonutTooltip = function DonutTooltip2(props) {
411
+ function DonutTooltip(props) {
401
412
  var _ref = arguments[0], _ref5;
402
413
  var SDonutTooltip = Tooltip;
403
- return _ref5 = sstyled$1(props.styles), /* @__PURE__ */ React.createElement(SDonutTooltip, _ref5.cn("SDonutTooltip", _objectSpread({}, assignProps({
414
+ return _ref5 = sstyled(props.styles), /* @__PURE__ */ React.createElement(SDonutTooltip, _ref5.cn("SDonutTooltip", _objectSpread({}, assignProps({
404
415
  "excludeAnchorProps": true
405
416
  }, _ref))));
406
- };
417
+ }
418
+ ;
407
419
  var Donut = createElement(DonutRoot, {
408
420
  Pie,
409
421
  Label,
package/lib/esm/Dots.mjs CHANGED
@@ -1,38 +1,39 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import { sstyled } from "@semcore/utils/lib/core/index";
2
+ import { sstyled } from "@semcore/core";
3
+ import trottle from "@semcore/core/lib/utils/rafTrottle";
3
4
  import { bisector } from "d3-array";
4
5
  import React from "react";
5
- import { sstyled as sstyled$1 } from "@semcore/core";
6
- import trottle from "@semcore/utils/lib/rafTrottle";
7
6
  import createElement from "./createElement.mjs";
8
- import { interpolateValue, eventToPoint, invert, getChartDefaultColorName } from "./utils.mjs";
9
7
  import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
8
+ import { getChartDefaultColorName, interpolateValue, eventToPoint, invert } from "./utils.mjs";
10
9
  /*!__reshadow-styles__:"./style/dot.shadow.css"*/
11
10
  var style = (
12
11
  /*__reshadow_css_start__*/
13
12
  (sstyled.insert(
14
13
  /*__inner_css_start__*/
15
- ".___SDots_p1vep_gg_ .___SDot_p1vep_gg_{transition-duration:var(--duration_p1vep)}.___SDot_p1vep_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #fff);fill:var(--intergalactic-chart-palette-order-1, rgb(104, 109, 210));transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_p1vep_gg_.__hide_p1vep_gg_{display:none}.___SDot_p1vep_gg_.__color_p1vep_gg_{fill:var(--color_p1vep)}.___SDot_p1vep_gg_.__transparent_p1vep_gg_{opacity:.3}",
14
+ ".___SDots_1s5uq_gg_ .___SDot_1s5uq_gg_{transition-duration:var(--duration_1s5uq)}.___SDot_1s5uq_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #fff);fill:var(--intergalactic-chart-palette-order-1, rgb(102, 107, 219));transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_1s5uq_gg_.__hide_1s5uq_gg_{display:none}.___SDot_1s5uq_gg_.__color_1s5uq_gg_{fill:var(--color_1s5uq)}.___SDot_1s5uq_gg_.__transparent_1s5uq_gg_{opacity:.3}",
16
15
  /*__inner_css_end__*/
17
- "p1vep_gg_"
16
+ "1s5uq_gg_"
18
17
  ), /*__reshadow_css_end__*/
19
18
  {
20
- "__SDot": "___SDot_p1vep_gg_",
21
- "_hide": "__hide_p1vep_gg_",
22
- "_color": "__color_p1vep_gg_",
23
- "--color": "--color_p1vep",
24
- "_transparent": "__transparent_p1vep_gg_",
25
- "__SDots": "___SDots_p1vep_gg_",
26
- "--duration": "--duration_p1vep"
19
+ "__SDot": "___SDot_1s5uq_gg_",
20
+ "_hide": "__hide_1s5uq_gg_",
21
+ "_color": "__color_1s5uq_gg_",
22
+ "--color": "--color_1s5uq",
23
+ "_transparent": "__transparent_1s5uq_gg_",
24
+ "__SDots": "___SDots_1s5uq_gg_",
25
+ "--duration": "--duration_1s5uq"
27
26
  })
28
27
  );
29
28
  function Dots(props) {
30
29
  var _ref3;
31
- var SDot = props.Element, styles = props.styles, color = props.color, d3 = props.d3, x = props.x, y = props.y, eventEmitter = props.eventEmitter, display = props.display, hide = props.hide, rootRef = props.rootRef, scale = props.scale, _props$duration = props.duration, duration = _props$duration === void 0 ? 500 : _props$duration, transparent = props.transparent, _props$radius = props.radius, radiusBase = _props$radius === void 0 ? 4 : _props$radius, resolveColor = props.resolveColor, patterns = props.patterns;
30
+ var SDot = props.Element, styles = props.styles, color = props.color, d3 = props.d3, x = props.x, y = props.y, eventEmitter = props.eventEmitter, display = props.display, hide = props.hide, rootRef = props.rootRef, scale = props.scale, _props$duration = props.duration, duration = _props$duration === void 0 ? 500 : _props$duration, transparent = props.transparent, _props$radius = props.radius, radiusBase = _props$radius === void 0 ? 4 : _props$radius, resolveColor = props.resolveColor, patterns = props.patterns, onClick = props.onClick;
32
31
  var bisect = bisector(function(d) {
33
32
  return d[x];
34
33
  }).center;
35
34
  var _React$useState = React.useState(null), _React$useState2 = _slicedToArray(_React$useState, 2), activeIndex = _React$useState2[0], setActiveIndex = _React$useState2[1];
35
+ var patternKey = color || getChartDefaultColorName(0);
36
+ var svgPatternId = "template_".concat(patternKey);
36
37
  var data = React.useMemo(function() {
37
38
  return props.data.filter(function(item) {
38
39
  return item[y] !== interpolateValue;
@@ -47,6 +48,15 @@ function Dots(props) {
47
48
  var handlerMouseLeaveRoot = React.useCallback(trottle(function() {
48
49
  setActiveIndex(null);
49
50
  }), []);
51
+ var handlerOnClick = React.useCallback(function(e) {
52
+ e.stopPropagation();
53
+ if (!onClick) return;
54
+ var _scale2 = _slicedToArray(scale, 1), xScale = _scale2[0];
55
+ var _eventToPoint3 = eventToPoint(e, rootRef.current), _eventToPoint4 = _slicedToArray(_eventToPoint3, 1), pX = _eventToPoint4[0];
56
+ var vX = invert(xScale, pX);
57
+ var index = bisect(data, vX);
58
+ onClick(index, e);
59
+ }, [scale, data, onClick]);
50
60
  React.useEffect(function() {
51
61
  var unsubscribeMouseMoveRoot = eventEmitter.subscribe("onMouseMoveChart", function(e) {
52
62
  e.persist();
@@ -58,6 +68,10 @@ function Dots(props) {
58
68
  unsubscribeMouseLeaveRoot();
59
69
  };
60
70
  }, [eventEmitter, scale, data, x, y]);
71
+ var _getPatternSymbolSize = getPatternSymbolSize({
72
+ patternKey,
73
+ patterns
74
+ }), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
61
75
  var dots = data.reduce(function(acc, d, i) {
62
76
  var isPrev = d3.defined()(data[i - 1] || {});
63
77
  var isNext = d3.defined()(data[i + 1] || {});
@@ -66,14 +80,9 @@ function Dots(props) {
66
80
  var radius = radiusBase * (active ? 5 / 4 : 1);
67
81
  if (!d3.defined()(d)) return acc;
68
82
  if (!visible) return acc;
69
- var patternKey = color || getChartDefaultColorName(0);
70
- var _getPatternSymbolSize = getPatternSymbolSize({
71
- patternKey,
72
- patterns
73
- }), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
74
83
  if (!patterns) {
75
84
  var _ref;
76
- acc.push((_ref = sstyled$1(styles), /* @__PURE__ */ React.createElement(SDot, _ref.cn("SDot", {
85
+ acc.push((_ref = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref.cn("SDot", {
77
86
  "render": "circle",
78
87
  "color": resolveColor(color),
79
88
  "patternKey": patternKey,
@@ -86,32 +95,39 @@ function Dots(props) {
86
95
  "transparent": transparent,
87
96
  "cx": d3.x()(d),
88
97
  "cy": d3.y()(d),
89
- "r": radius
98
+ "r": radius,
99
+ "__excludeProps": ["display", "data", "scale"]
90
100
  }))));
91
101
  } else {
92
102
  var _ref2;
93
- acc.push((_ref2 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SDot, _ref2.cn("SDot", {
94
- "render": PatternSymbol,
95
- "color": resolveColor(color),
96
- "patternKey": patternKey,
97
- "patterns": patterns,
98
- "key": "".concat(i),
103
+ acc.push((_ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SDot, _ref2.cn("SDot", {
104
+ "key": i,
105
+ "render": "use",
106
+ "href": "#".concat(svgPatternId),
107
+ "x": width + (d3.x()(d) - width / 2),
108
+ "y": d3.y()(d) - height / 2,
99
109
  "value": d,
110
+ "transparent": transparent,
111
+ "radius": radius,
100
112
  "visible": visible,
101
113
  "active": active,
102
114
  "hide": hide,
103
- "transparent": transparent,
104
- "x": d3.x()(d) - width / 2,
105
- "y": d3.y()(d) - height / 2,
106
- "radius": radius
115
+ "__excludeProps": ["display", "data", "scale"]
107
116
  }))));
108
117
  }
109
118
  return acc;
110
119
  }, []);
111
120
  var SDots = "g";
112
- return _ref3 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SDots, _ref3.cn("SDots", {
113
- "duration": "".concat(duration, "ms")
114
- }), dots);
121
+ return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SDots, _ref3.cn("SDots", {
122
+ "duration": "".concat(duration, "ms"),
123
+ "onClickCapture": handlerOnClick
124
+ }), /* @__PURE__ */ React.createElement(PatternSymbol, _ref3.cn("PatternSymbol", {
125
+ "color": resolveColor(color),
126
+ "patternKey": color,
127
+ "id": svgPatternId,
128
+ "patterns": patterns,
129
+ "x": -1 * width
130
+ })), dots);
115
131
  }
116
132
  Dots.style = style;
117
133
  const Dots$1 = createElement(Dots);
@@ -1,24 +1,23 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
3
4
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
- import React from "react";
7
6
  import { Component } from "@semcore/core";
8
- import getOriginChildren from "@semcore/utils/lib/getOriginChildren";
9
- import createElement from "./createElement.mjs";
7
+ import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
8
+ import { scaleBand } from "d3-scale";
9
+ import React from "react";
10
10
  import Bar from "./Bar.mjs";
11
+ import createElement from "./createElement.mjs";
11
12
  import HorizontalBar from "./HorizontalBar.mjs";
12
- import { scaleBand } from "d3-scale";
13
13
  import { scaleToBand, getChartDefaultColorName } from "./utils.mjs";
14
- var GroupBarRoot = /* @__PURE__ */ function(_Component) {
15
- _inherits(GroupBarRoot2, _Component);
16
- var _super = _createSuper(GroupBarRoot2);
14
+ var GroupBarRoot = /* @__PURE__ */ (function(_Component) {
17
15
  function GroupBarRoot2() {
18
16
  _classCallCheck(this, GroupBarRoot2);
19
- return _super.apply(this, arguments);
17
+ return _callSuper(this, GroupBarRoot2, arguments);
20
18
  }
21
- _createClass(GroupBarRoot2, [{
19
+ _inherits(GroupBarRoot2, _Component);
20
+ return _createClass(GroupBarRoot2, [{
22
21
  key: "getScaleGroup",
23
22
  value: function getScaleGroup() {
24
23
  var _this$asProps = this.asProps, Children = _this$asProps.Children, scale = _this$asProps.scale, scaleGroup = _this$asProps.scaleGroup, x = _this$asProps.x;
@@ -39,7 +38,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
39
38
  key: "getBarProps",
40
39
  value: function getBarProps(_ref, index) {
41
40
  var y = _ref.y;
42
- var _this$asProps2 = this.asProps, x = _this$asProps2.x, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ? Infinity : _this$asProps2$maxBar, patterns = _this$asProps2.patterns;
41
+ var _this$asProps2 = this.asProps, x = _this$asProps2.x, _this$asProps2$maxBar = _this$asProps2.maxBarSize, maxBarSize = _this$asProps2$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps2$maxBar, patterns = _this$asProps2.patterns;
43
42
  var bandWidth = this.scaleGroup.bandwidth();
44
43
  var width = Math.min(bandWidth, maxBarSize);
45
44
  var offsetX = this.scaleGroup(y) + bandWidth / 2 - width / 2;
@@ -56,7 +55,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
56
55
  key: "getHorizontalBarProps",
57
56
  value: function getHorizontalBarProps(_ref2, index) {
58
57
  var x = _ref2.x;
59
- var _this$asProps3 = this.asProps, y = _this$asProps3.y, _this$asProps3$maxBar = _this$asProps3.maxBarSize, maxBarSize = _this$asProps3$maxBar === void 0 ? Infinity : _this$asProps3$maxBar;
58
+ var _this$asProps3 = this.asProps, y = _this$asProps3.y, _this$asProps3$maxBar = _this$asProps3.maxBarSize, maxBarSize = _this$asProps3$maxBar === void 0 ? Number.POSITIVE_INFINITY : _this$asProps3$maxBar;
60
59
  var bandWidth = this.scaleGroup.bandwidth();
61
60
  var height = Math.min(bandWidth, maxBarSize);
62
61
  var offsetY = this.scaleGroup(x) + bandWidth / 2 - height / 2;
@@ -82,8 +81,7 @@ var GroupBarRoot = /* @__PURE__ */ function(_Component) {
82
81
  });
83
82
  }
84
83
  }]);
85
- return GroupBarRoot2;
86
- }(Component);
84
+ })(Component);
87
85
  _defineProperty(GroupBarRoot, "displayName", "GroupBar");
88
86
  var GroupBar = createElement(GroupBarRoot, {
89
87
  Bar,