@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/es6/Radar.js CHANGED
@@ -1,49 +1,48 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
+ import _callSuper from "@babel/runtime/helpers/callSuper";
5
5
  import _inherits from "@babel/runtime/helpers/inherits";
6
- import _createSuper from "@babel/runtime/helpers/createSuper";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
7
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
9
8
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
10
- import { sstyled as _sstyled } from "@semcore/utils/lib/core/index";
9
+ import { sstyled as _sstyled } from "@semcore/core";
11
10
  import { assignProps as _assignProps } from "@semcore/core";
12
- import React, { cloneElement } from 'react';
13
11
  import { Component, sstyled, Root } from '@semcore/core';
14
- import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
15
- import getOriginChildren from '@semcore/utils/lib/getOriginChildren';
16
- import trottle from '@semcore/utils/lib/rafTrottle';
17
- import canUseDOM from '@semcore/utils/lib/canUseDOM';
12
+ import canUseDOM from '@semcore/core/lib/utils/canUseDOM';
13
+ import getOriginChildren from '@semcore/core/lib/utils/getOriginChildren';
14
+ import trottle from '@semcore/core/lib/utils/rafTrottle';
15
+ import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
18
16
  import { polygonContains } from 'd3-polygon';
19
17
  import { line, lineRadial, curveLinearClosed, arc } from 'd3-shape';
18
+ import React, { cloneElement } from 'react';
20
19
  import createElement from './createElement';
21
- import { eventToPoint, getChartDefaultColorName, measureText } from './utils';
22
- import Tooltip from './Tooltip';
23
20
  import { PatternFill, PatternSymbol, getPatternSymbolSize } from './Pattern';
24
21
  /*!__reshadow-styles__:"./style/radar.shadow.css"*/
25
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SAxisLine_2663h_gg_,.___SAxisTick_2663h_gg_,.___SAxis_2663h_gg_{stroke:var(--intergalactic-chart-grid-line, rgb(237, 239, 238));stroke-width:1;fill:transparent}.___SAxisLine_2663h_gg_,.___SAxisTick_2663h_gg_{stroke-dasharray:2}.___SAxisLine_2663h_gg_.__active_2663h_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, rgb(214, 216, 215))}.___SAxisLabel_2663h_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_2663h_gg_.__xDirection_2663h_gg_{text-anchor:var(--xDirection_2663h)}.___SAxisLabel_2663h_gg_.__yDirection_2663h_gg_{dominant-baseline:var(--yDirection_2663h)}.___SPolygonDot_2663h_gg_,.___SPolygon_2663h_gg_{fill:var(--intergalactic-chart-palette-order-1, rgb(104, 109, 210))}.___SPolygon_2663h_gg_{opacity:.2}.___SPolygon_2663h_gg_.__color_2663h_gg_{fill:var(--color_2663h)}.___SPolygon_2663h_gg_.__pattern_2663h_gg_.__color_2663h_gg_{fill:var(--pattern_2663h);stroke:var(--color_2663h);stroke-width:1px}.___SPolygonDot_2663h_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #fff);r:6px}.___SPolygonDot_2663h_gg_.__transparent_2663h_gg_{opacity:.3}.___SPolygonDot_2663h_gg_.__color_2663h_gg_{fill:var(--color_2663h)}.___SPolygonLine_2663h_gg_{stroke:var(--intergalactic-chart-palette-order-1, rgb(104, 109, 210));stroke-width:3;fill:transparent}.___SPolygonLine_2663h_gg_.__transparent_2663h_gg_{opacity:.3}.___SPolygonLine_2663h_gg_.__color_2663h_gg_{stroke:var(--color_2663h)}.___SPieRect_2663h_gg_{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(0, 22, 16, 0.028))}", /*__inner_css_end__*/"2663h_gg_"),
22
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SAxisLine_se4af_gg_,.___SAxisTick_se4af_gg_,.___SAxis_se4af_gg_{stroke:var(--intergalactic-chart-grid-line, rgb(237, 239, 238));stroke-width:1;fill:transparent}.___SAxisLine_se4af_gg_,.___SAxisTick_se4af_gg_{stroke-dasharray:2}.___SAxisLine_se4af_gg_.__active_se4af_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, rgb(214, 216, 215))}.___SAxisLabel_se4af_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_se4af_gg_.__xDirection_se4af_gg_{text-anchor:var(--xDirection_se4af)}.___SAxisLabel_se4af_gg_.__yDirection_se4af_gg_{dominant-baseline:var(--yDirection_se4af)}.___SPolygonDot_se4af_gg_,.___SPolygon_se4af_gg_{fill:var(--intergalactic-chart-palette-order-1, rgb(102, 107, 219))}.___SPolygon_se4af_gg_{opacity:.2}.___SPolygon_se4af_gg_.__color_se4af_gg_{fill:var(--color_se4af)}.___SPolygon_se4af_gg_.__pattern_se4af_gg_.__color_se4af_gg_{fill:var(--pattern_se4af);stroke:var(--color_se4af);stroke-width:1px}.___SPolygonDot_se4af_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #fff);r:6px}.___SPolygonDot_se4af_gg_.__transparent_se4af_gg_{opacity:.3}.___SPolygonDot_se4af_gg_.__color_se4af_gg_{fill:var(--color_se4af)}.___SPolygonLine_se4af_gg_{stroke:var(--intergalactic-chart-palette-order-1, rgb(102, 107, 219));stroke-width:3;fill:transparent}.___SPolygonLine_se4af_gg_.__transparent_se4af_gg_{opacity:.3}.___SPolygonLine_se4af_gg_.__color_se4af_gg_{stroke:var(--color_se4af)}.___SPieRect_se4af_gg_{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(0, 22, 16, 0.028))}", /*__inner_css_end__*/"se4af_gg_"),
26
23
  /*__reshadow_css_end__*/
27
24
  {
28
- "__SAxis": "___SAxis_2663h_gg_",
29
- "__SAxisLine": "___SAxisLine_2663h_gg_",
30
- "__SAxisTick": "___SAxisTick_2663h_gg_",
31
- "_active": "__active_2663h_gg_",
32
- "__SAxisLabel": "___SAxisLabel_2663h_gg_",
33
- "_xDirection": "__xDirection_2663h_gg_",
34
- "--xDirection": "--xDirection_2663h",
35
- "_yDirection": "__yDirection_2663h_gg_",
36
- "--yDirection": "--yDirection_2663h",
37
- "__SPolygon": "___SPolygon_2663h_gg_",
38
- "_color": "__color_2663h_gg_",
39
- "--color": "--color_2663h",
40
- "_pattern": "__pattern_2663h_gg_",
41
- "--pattern": "--pattern_2663h",
42
- "__SPolygonDot": "___SPolygonDot_2663h_gg_",
43
- "_transparent": "__transparent_2663h_gg_",
44
- "__SPolygonLine": "___SPolygonLine_2663h_gg_",
45
- "__SPieRect": "___SPieRect_2663h_gg_"
25
+ "__SAxis": "___SAxis_se4af_gg_",
26
+ "__SAxisLine": "___SAxisLine_se4af_gg_",
27
+ "__SAxisTick": "___SAxisTick_se4af_gg_",
28
+ "_active": "__active_se4af_gg_",
29
+ "__SAxisLabel": "___SAxisLabel_se4af_gg_",
30
+ "_xDirection": "__xDirection_se4af_gg_",
31
+ "--xDirection": "--xDirection_se4af",
32
+ "_yDirection": "__yDirection_se4af_gg_",
33
+ "--yDirection": "--yDirection_se4af",
34
+ "__SPolygon": "___SPolygon_se4af_gg_",
35
+ "_color": "__color_se4af_gg_",
36
+ "--color": "--color_se4af",
37
+ "_pattern": "__pattern_se4af_gg_",
38
+ "--pattern": "--pattern_se4af",
39
+ "__SPolygonDot": "___SPolygonDot_se4af_gg_",
40
+ "_transparent": "__transparent_se4af_gg_",
41
+ "__SPolygonLine": "___SPolygonLine_se4af_gg_",
42
+ "__SPieRect": "___SPieRect_se4af_gg_"
46
43
  });
44
+ import Tooltip from './Tooltip';
45
+ import { eventToPoint, getChartDefaultColorName, measureText } from './utils';
47
46
  var clampAngle = function clampAngle(angle) {
48
47
  angle = angle % (2 * Math.PI);
49
48
  if (angle < 0) angle += 2 * Math.PI;
@@ -79,7 +78,7 @@ function computeTextWidth(texts, textSize) {
79
78
  if (typeof text === 'string') {
80
79
  return measureText(text, textSize);
81
80
  }
82
- if ( /*#__PURE__*/React.isValidElement(text)) {
81
+ if (/*#__PURE__*/React.isValidElement(text)) {
83
82
  var _text$props, _text$props2;
84
83
  // @ts-ignore
85
84
  return Math.max(((_text$props = text.props) === null || _text$props === void 0 ? void 0 : _text$props.width) || defaultWidth, ((_text$props2 = text.props) === null || _text$props2 === void 0 ? void 0 : _text$props2.height) || defaultHeight);
@@ -93,19 +92,19 @@ function getTicks(tickSize, radius) {
93
92
  while (Math.trunc(radius / (tickSize / 2)) > ticks) {
94
93
  ticks += 1;
95
94
  }
96
- return _toConsumableArray(Array(ticks).keys()).reduce(function (ticks, t, i, total) {
95
+ return _toConsumableArray(Array(ticks).keys()).reduce(function (ticks, _t, i, total) {
97
96
  if (i) ticks.push(i / total.length);
98
97
  return ticks;
99
98
  }, []);
100
99
  }
101
- function pieContains(_ref13, _ref14) {
102
- var _ref15 = _slicedToArray(_ref13, 3),
103
- startAngle = _ref15[0],
104
- endAngle = _ref15[1],
105
- radius = _ref15[2];
106
- var _ref16 = _slicedToArray(_ref14, 2),
107
- x = _ref16[0],
108
- y = _ref16[1];
100
+ function pieContains(_ref11, _ref12) {
101
+ var _ref13 = _slicedToArray(_ref11, 3),
102
+ startAngle = _ref13[0],
103
+ endAngle = _ref13[1],
104
+ radius = _ref13[2];
105
+ var _ref14 = _slicedToArray(_ref12, 2),
106
+ x = _ref14[0],
107
+ y = _ref14[1];
109
108
  var distance = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));
110
109
  if (distance > radius) return false;
111
110
  startAngle = clampAngle(startAngle);
@@ -140,20 +139,19 @@ export function getLabelOffsetPosition(xDirection, yDirection, width, height) {
140
139
  }
141
140
  var MINIMUM_OFFSET = 5;
142
141
  var RadarRoot = /*#__PURE__*/function (_Component) {
143
- _inherits(RadarRoot, _Component);
144
- var _super = _createSuper(RadarRoot);
145
142
  function RadarRoot() {
146
143
  var _this;
147
144
  _classCallCheck(this, RadarRoot);
148
145
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
149
146
  args[_key] = arguments[_key];
150
147
  }
151
- _this = _super.call.apply(_super, [this].concat(args));
152
- _defineProperty(_assertThisInitialized(_this), "computeOffset", 0);
153
- _defineProperty(_assertThisInitialized(_this), "categoriesKey", null);
148
+ _this = _callSuper(this, RadarRoot, [].concat(args));
149
+ _defineProperty(_this, "computeOffset", 0);
150
+ _defineProperty(_this, "categoriesKey", null);
154
151
  return _this;
155
152
  }
156
- _createClass(RadarRoot, [{
153
+ _inherits(RadarRoot, _Component);
154
+ return _createClass(RadarRoot, [{
157
155
  key: "id",
158
156
  get: function get() {
159
157
  var _this$asProps = this.asProps,
@@ -185,8 +183,8 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
185
183
  }
186
184
  }, {
187
185
  key: "getPolygonProps",
188
- value: function getPolygonProps(_ref17, index) {
189
- var dataKey = _ref17.dataKey;
186
+ value: function getPolygonProps(_ref15, index) {
187
+ var dataKey = _ref15.dataKey;
190
188
  var _this$asProps2 = this.asProps,
191
189
  data = _this$asProps2.data,
192
190
  scale = _this$asProps2.scale,
@@ -210,27 +208,111 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
210
208
  type: this.asProps.type,
211
209
  offset: this.offset,
212
210
  categories: this.asProps.data[this.categoriesKey],
213
- angleOffset: this.asProps.angleOffset
211
+ angleOffset: this.asProps.angleOffset,
212
+ getIndex: this.getIndex.bind(this),
213
+ getPolygon: this.getPolygon.bind(this),
214
+ getPie: this.getPie.bind(this)
214
215
  };
215
216
  }
217
+ }, {
218
+ key: "getIndex",
219
+ value: function getIndex(point) {
220
+ var _this2 = this;
221
+ var _this$asProps3 = this.asProps,
222
+ data = _this$asProps3.data,
223
+ type = _this$asProps3.type;
224
+ var categories = data[this.categoriesKey];
225
+ var index;
226
+ if (type === 'circle') {
227
+ index = categories.findIndex(function (_c, i) {
228
+ return pieContains(_this2.getPie(i), point);
229
+ });
230
+ } else {
231
+ index = categories.findIndex(function (_c, i) {
232
+ return polygonContains(_this2.getPolygon(i), point);
233
+ });
234
+ }
235
+ return index === -1 ? null : index;
236
+ }
237
+ }, {
238
+ key: "getPolygon",
239
+ value: function getPolygon(index) {
240
+ var _this$asProps4 = this.asProps,
241
+ data = _this$asProps4.data,
242
+ size = _this$asProps4.size,
243
+ angleOffset = _this$asProps4.angleOffset;
244
+ var offset = this.offset;
245
+ var categories = data[this.categoriesKey];
246
+ var total = categories.length;
247
+ var diam = Math.min(size[0], size[1]);
248
+ var radius = diam / 2 - offset;
249
+ var prevIndex = (index - 1 + total) % total;
250
+ var nextIndex = (index + 1 + total) % total;
251
+ var _getRadianPosition = getRadianPosition(prevIndex, radius, total, angleOffset),
252
+ _getRadianPosition2 = _slicedToArray(_getRadianPosition, 2),
253
+ prevX1 = _getRadianPosition2[0],
254
+ prevY1 = _getRadianPosition2[1];
255
+ var _getRadianPosition3 = getRadianPosition(index, radius, total, angleOffset),
256
+ _getRadianPosition4 = _slicedToArray(_getRadianPosition3, 2),
257
+ x = _getRadianPosition4[0],
258
+ y = _getRadianPosition4[1];
259
+ var _getRadianPosition5 = getRadianPosition(nextIndex, radius, total, angleOffset),
260
+ _getRadianPosition6 = _slicedToArray(_getRadianPosition5, 2),
261
+ nextX1 = _getRadianPosition6[0],
262
+ nextY1 = _getRadianPosition6[1];
263
+ return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
264
+ }
265
+ }, {
266
+ key: "getPie",
267
+ value: function getPie(index) {
268
+ var _this$asProps5 = this.asProps,
269
+ data = _this$asProps5.data,
270
+ size = _this$asProps5.size,
271
+ angleOffset = _this$asProps5.angleOffset;
272
+ var categories = data[this.categoriesKey];
273
+ var offset = this.offset;
274
+ var angle = Math.PI * 2 / categories.length;
275
+ var radius = Math.min(size[0], size[1]) / 2 - offset;
276
+ return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
277
+ }
278
+ }, {
279
+ key: "handlerOnClick",
280
+ value: function handlerOnClick(e) {
281
+ e.stopPropagation();
282
+ var _this$asProps6 = this.asProps,
283
+ rootRef = _this$asProps6.rootRef,
284
+ size = _this$asProps6.size,
285
+ onClick = _this$asProps6.onClick;
286
+ if (!onClick) return;
287
+ var _eventToPoint = eventToPoint(e, rootRef.current),
288
+ _eventToPoint2 = _slicedToArray(_eventToPoint, 2),
289
+ pointX = _eventToPoint2[0],
290
+ pointY = _eventToPoint2[1];
291
+ var r = Math.min(size[0], size[1]) / 2;
292
+ var centerX = pointX - r;
293
+ var centerY = pointY - r;
294
+ var index = this.getIndex([centerX, centerY]);
295
+ if (index === null) return;
296
+ onClick(index, e);
297
+ }
216
298
  }, {
217
299
  key: "render",
218
300
  value: function render() {
219
301
  var _ref2;
220
302
  var SRadar = this.Element;
221
- var _this$asProps3 = this.asProps,
222
- Children = _this$asProps3.Children,
223
- styles = _this$asProps3.styles,
224
- size = _this$asProps3.size,
225
- data = _this$asProps3.data,
226
- offset = _this$asProps3.offset;
303
+ var _this$asProps7 = this.asProps,
304
+ Children = _this$asProps7.Children,
305
+ styles = _this$asProps7.styles,
306
+ size = _this$asProps7.size,
307
+ data = _this$asProps7.data,
308
+ offset = _this$asProps7.offset;
227
309
  var _size = _slicedToArray(size, 2),
228
310
  width = _size[0],
229
311
  height = _size[1];
230
312
  this.asProps.dataHintsHandler.establishDataType('indexed-groups');
231
313
  var dataKey;
232
314
  React.Children.toArray(getOriginChildren(Children)).forEach(function (child) {
233
- if ( /*#__PURE__*/React.isValidElement(child) && child.type === Radar.Axis) {
315
+ if (/*#__PURE__*/React.isValidElement(child) && child.type === Radar.Axis) {
234
316
  dataKey = child.props.dataKey;
235
317
  }
236
318
  });
@@ -246,11 +328,11 @@ var RadarRoot = /*#__PURE__*/function (_Component) {
246
328
  "id": this.id,
247
329
  "render": 'g',
248
330
  "childrenPosition": 'inside',
249
- "transform": "translate(".concat(width / 2, ",").concat(height / 2, ")")
331
+ "transform": "translate(".concat(width / 2, ",").concat(height / 2, ")"),
332
+ "onClickCapture": this.handlerOnClick.bind(this)
250
333
  }));
251
334
  }
252
335
  }]);
253
- return RadarRoot;
254
336
  }(Component);
255
337
  _defineProperty(RadarRoot, "displayName", 'Line');
256
338
  _defineProperty(RadarRoot, "style", style);
@@ -260,25 +342,24 @@ _defineProperty(RadarRoot, "defaultProps", {
260
342
  angleOffset: 0
261
343
  });
262
344
  var PolygonRoot = /*#__PURE__*/function (_Component2) {
263
- _inherits(PolygonRoot, _Component2);
264
- var _super2 = _createSuper(PolygonRoot);
265
345
  function PolygonRoot() {
266
346
  _classCallCheck(this, PolygonRoot);
267
- return _super2.apply(this, arguments);
347
+ return _callSuper(this, PolygonRoot, arguments);
268
348
  }
269
- _createClass(PolygonRoot, [{
349
+ _inherits(PolygonRoot, _Component2);
350
+ return _createClass(PolygonRoot, [{
270
351
  key: "getDotsProps",
271
352
  value: function getDotsProps() {
272
- var _this$asProps4 = this.asProps,
273
- data = _this$asProps4.data,
274
- scale = _this$asProps4.scale,
275
- color = _this$asProps4.color,
276
- resolveColor = _this$asProps4.resolveColor,
277
- transparent = _this$asProps4.transparent,
278
- dataKey = _this$asProps4.dataKey,
279
- dataHintsHandler = _this$asProps4.dataHintsHandler,
280
- angleOffset = _this$asProps4.angleOffset,
281
- patterns = _this$asProps4.patterns;
353
+ var _this$asProps8 = this.asProps,
354
+ data = _this$asProps8.data,
355
+ scale = _this$asProps8.scale,
356
+ color = _this$asProps8.color,
357
+ resolveColor = _this$asProps8.resolveColor,
358
+ transparent = _this$asProps8.transparent,
359
+ dataKey = _this$asProps8.dataKey,
360
+ dataHintsHandler = _this$asProps8.dataHintsHandler,
361
+ angleOffset = _this$asProps8.angleOffset,
362
+ patterns = _this$asProps8.patterns;
282
363
  return {
283
364
  data: data,
284
365
  scale: scale,
@@ -294,12 +375,12 @@ var PolygonRoot = /*#__PURE__*/function (_Component2) {
294
375
  }, {
295
376
  key: "getLineProps",
296
377
  value: function getLineProps() {
297
- var _this$asProps5 = this.asProps,
298
- d3 = _this$asProps5.d3,
299
- data = _this$asProps5.data,
300
- color = _this$asProps5.color,
301
- resolveColor = _this$asProps5.resolveColor,
302
- transparent = _this$asProps5.transparent;
378
+ var _this$asProps9 = this.asProps,
379
+ d3 = _this$asProps9.d3,
380
+ data = _this$asProps9.data,
381
+ color = _this$asProps9.color,
382
+ resolveColor = _this$asProps9.resolveColor,
383
+ transparent = _this$asProps9.transparent;
303
384
  return {
304
385
  data: data,
305
386
  color: color,
@@ -312,16 +393,16 @@ var PolygonRoot = /*#__PURE__*/function (_Component2) {
312
393
  key: "render",
313
394
  value: function render() {
314
395
  var _ref3;
315
- var _this$asProps6 = this.asProps,
316
- SPolygon = _this$asProps6.Element,
317
- styles = _this$asProps6.styles,
318
- d3 = _this$asProps6.d3,
319
- data = _this$asProps6.data,
320
- color = _this$asProps6.color,
321
- resolveColor = _this$asProps6.resolveColor,
322
- fill = _this$asProps6.fill,
323
- uid = _this$asProps6.uid,
324
- patterns = _this$asProps6.patterns;
396
+ var _this$asProps0 = this.asProps,
397
+ SPolygon = _this$asProps0.Element,
398
+ styles = _this$asProps0.styles,
399
+ d3 = _this$asProps0.d3,
400
+ data = _this$asProps0.data,
401
+ color = _this$asProps0.color,
402
+ resolveColor = _this$asProps0.resolveColor,
403
+ fill = _this$asProps0.fill,
404
+ uid = _this$asProps0.uid,
405
+ patterns = _this$asProps0.patterns;
325
406
  return /*#__PURE__*/React.createElement(React.Fragment, null, (_ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SPolygon, _ref3.cn("SPolygon", {
326
407
  "render": 'path',
327
408
  "d": d3(data),
@@ -335,22 +416,21 @@ var PolygonRoot = /*#__PURE__*/function (_Component2) {
335
416
  })));
336
417
  }
337
418
  }]);
338
- return PolygonRoot;
339
419
  }(Component);
340
420
  _defineProperty(PolygonRoot, "displayName", 'Polygon');
341
421
  _defineProperty(PolygonRoot, "style", style);
342
- _defineProperty(PolygonRoot, "defaultProps", function (_ref22) {
343
- var scale = _ref22.scale,
344
- _ref22$curve = _ref22.curve,
345
- curve = _ref22$curve === void 0 ? curveLinearClosed : _ref22$curve,
346
- size = _ref22.size,
347
- offset = _ref22.offset,
348
- angleOffset = _ref22.angleOffset;
422
+ _defineProperty(PolygonRoot, "defaultProps", function (_ref20) {
423
+ var scale = _ref20.scale,
424
+ _ref20$curve = _ref20.curve,
425
+ curve = _ref20$curve === void 0 ? curveLinearClosed : _ref20$curve,
426
+ size = _ref20.size,
427
+ offset = _ref20.offset,
428
+ angleOffset = _ref20.angleOffset;
349
429
  scale.range([0, Math.min(size[0], size[1]) / 2 - offset]);
350
430
  return {
351
431
  d3: lineRadial().curve(curve).radius(function (d) {
352
432
  return scale(d || 0);
353
- }).angle(function (d, i, data) {
433
+ }).angle(function (_d, i, data) {
354
434
  return i / data.length * 2 * Math.PI - angleOffset;
355
435
  })
356
436
  };
@@ -387,10 +467,10 @@ function PolygonDots(props) {
387
467
  if (value === null || value === undefined) return;
388
468
  var radius = scale(value);
389
469
  props.dataHintsHandler.describeGroupedValues(categoryKey, "".concat(categoryKey, ".").concat(i));
390
- var _getRadianPosition = getRadianPosition(i, radius, data.length, angleOffset),
391
- _getRadianPosition2 = _slicedToArray(_getRadianPosition, 2),
392
- cx = _getRadianPosition2[0],
393
- cy = _getRadianPosition2[1];
470
+ var _getRadianPosition7 = getRadianPosition(i, radius, data.length, angleOffset),
471
+ _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2),
472
+ cx = _getRadianPosition8[0],
473
+ cy = _getRadianPosition8[1];
394
474
  if (!patterns) {
395
475
  var _ref5;
396
476
  return _ref5 = sstyled(styles), /*#__PURE__*/React.createElement(SPolygonDot, _ref5.cn("SPolygonDot", {
@@ -423,47 +503,46 @@ function PolygonDots(props) {
423
503
  });
424
504
  }
425
505
  var AxisRoot = /*#__PURE__*/function (_Component3) {
426
- _inherits(AxisRoot, _Component3);
427
- var _super3 = _createSuper(AxisRoot);
428
506
  function AxisRoot() {
429
- var _this2;
507
+ var _this3;
430
508
  _classCallCheck(this, AxisRoot);
431
509
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
432
510
  args[_key2] = arguments[_key2];
433
511
  }
434
- _this2 = _super3.call.apply(_super3, [this].concat(args));
435
- _defineProperty(_assertThisInitialized(_this2), "unsubscribeTooltipVisible", null);
436
- _defineProperty(_assertThisInitialized(_this2), "state", {
512
+ _this3 = _callSuper(this, AxisRoot, [].concat(args));
513
+ _defineProperty(_this3, "unsubscribeTooltipVisible", null);
514
+ _defineProperty(_this3, "state", {
437
515
  activeLineIndex: null
438
516
  });
439
- _defineProperty(_assertThisInitialized(_this2), "handleTooltipRenderingProps", function (_anchorProps, _ref18) {
440
- var index = _ref18.index;
441
- _this2.setState({
517
+ _defineProperty(_this3, "handleTooltipRenderingProps", function (_anchorProps, _ref16) {
518
+ var index = _ref16.index;
519
+ _this3.setState({
442
520
  activeLineIndex: index
443
521
  });
444
522
  });
445
- return _this2;
523
+ return _this3;
446
524
  }
447
- _createClass(AxisRoot, [{
525
+ _inherits(AxisRoot, _Component3);
526
+ return _createClass(AxisRoot, [{
448
527
  key: "createLineRadial",
449
528
  value: function createLineRadial(radius, total) {
450
529
  return lineRadial().curve(curveLinearClosed).radius(function () {
451
530
  return radius;
452
- }).angle(function (d, i) {
531
+ }).angle(function (_d, i) {
453
532
  return i / total * 2 * Math.PI;
454
533
  });
455
534
  }
456
535
  }, {
457
536
  key: "getTicksProps",
458
- value: function getTicksProps(_ref19) {
459
- var _ref19$tickSize = _ref19.tickSize,
460
- tickSize = _ref19$tickSize === void 0 ? 100 : _ref19$tickSize;
461
- var _this$asProps7 = this.asProps,
462
- data = _this$asProps7.data,
463
- offset = _this$asProps7.offset,
464
- categories = _this$asProps7.categories,
465
- size = _this$asProps7.size,
466
- type = _this$asProps7.type;
537
+ value: function getTicksProps(_ref17) {
538
+ var _ref17$tickSize = _ref17.tickSize,
539
+ tickSize = _ref17$tickSize === void 0 ? 100 : _ref17$tickSize;
540
+ var _this$asProps1 = this.asProps,
541
+ data = _this$asProps1.data,
542
+ offset = _this$asProps1.offset,
543
+ categories = _this$asProps1.categories,
544
+ size = _this$asProps1.size,
545
+ type = _this$asProps1.type;
467
546
  var radius = Math.min(size[0], size[1]) / 2 - offset;
468
547
  return {
469
548
  type: type,
@@ -476,14 +555,14 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
476
555
  }
477
556
  }, {
478
557
  key: "getLabelsProps",
479
- value: function getLabelsProps(_ref20) {
480
- var _ref20$labelOffset = _ref20.labelOffset,
481
- labelOffset = _ref20$labelOffset === void 0 ? 10 : _ref20$labelOffset;
482
- var _this$asProps8 = this.asProps,
483
- offset = _this$asProps8.offset,
484
- categories = _this$asProps8.categories,
485
- textSize = _this$asProps8.textSize,
486
- angleOffset = _this$asProps8.angleOffset;
558
+ value: function getLabelsProps(_ref18) {
559
+ var _ref18$labelOffset = _ref18.labelOffset,
560
+ labelOffset = _ref18$labelOffset === void 0 ? 10 : _ref18$labelOffset;
561
+ var _this$asProps10 = this.asProps,
562
+ offset = _this$asProps10.offset,
563
+ categories = _this$asProps10.categories,
564
+ textSize = _this$asProps10.textSize,
565
+ angleOffset = _this$asProps10.angleOffset;
487
566
  return {
488
567
  categories: categories,
489
568
  textSize: textSize,
@@ -501,20 +580,20 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
501
580
  key: "componentWillUnmount",
502
581
  value: function componentWillUnmount() {
503
582
  var _this$unsubscribeTool;
504
- (_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0 ? void 0 : _this$unsubscribeTool.call(this);
583
+ (_this$unsubscribeTool = this.unsubscribeTooltipVisible) === null || _this$unsubscribeTool === void 0 || _this$unsubscribeTool.call(this);
505
584
  }
506
585
  }, {
507
586
  key: "render",
508
587
  value: function render() {
509
588
  var _ref7;
510
- var _this$asProps9 = this.asProps,
511
- SAxis = _this$asProps9.Element,
512
- styles = _this$asProps9.styles,
513
- categories = _this$asProps9.categories,
514
- size = _this$asProps9.size,
515
- offset = _this$asProps9.offset,
516
- type = _this$asProps9.type,
517
- angleOffset = _this$asProps9.angleOffset;
589
+ var _this$asProps11 = this.asProps,
590
+ SAxis = _this$asProps11.Element,
591
+ styles = _this$asProps11.styles,
592
+ categories = _this$asProps11.categories,
593
+ size = _this$asProps11.size,
594
+ offset = _this$asProps11.offset,
595
+ type = _this$asProps11.type,
596
+ angleOffset = _this$asProps11.angleOffset;
518
597
  var activeLineIndex = this.state.activeLineIndex;
519
598
  var radius = Math.min(size[0], size[1]) / 2 - offset;
520
599
  var total = categories.length;
@@ -526,11 +605,11 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
526
605
  })) : /*#__PURE__*/React.createElement(SAxis, _ref7.cn("SAxis", {
527
606
  "render": 'path',
528
607
  "d": this.createLineRadial(radius, total)(categories)
529
- })), categories.map(function (category, i) {
530
- var _getRadianPosition3 = getRadianPosition(i, radius, total, angleOffset),
531
- _getRadianPosition4 = _slicedToArray(_getRadianPosition3, 2),
532
- x = _getRadianPosition4[0],
533
- y = _getRadianPosition4[1];
608
+ })), categories.map(function (_category, i) {
609
+ var _getRadianPosition9 = getRadianPosition(i, radius, total, angleOffset),
610
+ _getRadianPosition0 = _slicedToArray(_getRadianPosition9, 2),
611
+ x = _getRadianPosition0[0],
612
+ y = _getRadianPosition0[1];
534
613
  var _sstyled$cn = sstyled(styles).cn('SAxisLine', {
535
614
  active: activeLineIndex === i
536
615
  }),
@@ -546,13 +625,12 @@ var AxisRoot = /*#__PURE__*/function (_Component3) {
546
625
  }));
547
626
  }
548
627
  }]);
549
- return AxisRoot;
550
628
  }(Component);
551
629
  _defineProperty(AxisRoot, "displayName", 'Polygon');
552
630
  _defineProperty(AxisRoot, "style", style);
553
- _defineProperty(AxisRoot, "defaultProps", function (_ref23) {
554
- var data = _ref23.data,
555
- dataKey = _ref23.dataKey;
631
+ _defineProperty(AxisRoot, "defaultProps", function (_ref21) {
632
+ var data = _ref21.data,
633
+ dataKey = _ref21.dataKey;
556
634
  var categories = data[dataKey];
557
635
  return {
558
636
  categories: categories
@@ -596,10 +674,10 @@ function AxisLabels(props) {
596
674
  angleOffset = props.angleOffset;
597
675
  var radius = Math.min(size[0], size[1]) / 2 - offset;
598
676
  return categories.map(function (category, i) {
599
- var _getRadianPosition5 = getRadianPosition(i, radius, categories.length, angleOffset),
600
- _getRadianPosition6 = _slicedToArray(_getRadianPosition5, 2),
601
- x = _getRadianPosition6[0],
602
- y = _getRadianPosition6[1];
677
+ var _getRadianPosition1 = getRadianPosition(i, radius, categories.length, angleOffset),
678
+ _getRadianPosition10 = _slicedToArray(_getRadianPosition1, 2),
679
+ x = _getRadianPosition10[0],
680
+ y = _getRadianPosition10[1];
603
681
  var _getLabelPlacement = getLabelPlacement(i, categories.length, angleOffset),
604
682
  _getLabelPlacement2 = _slicedToArray(_getLabelPlacement, 2),
605
683
  xDirection = _getLabelPlacement2[0],
@@ -624,13 +702,13 @@ function AxisLabels(props) {
624
702
  }, lineText);
625
703
  }));
626
704
  }
627
- if ( /*#__PURE__*/React.isValidElement(category)) {
705
+ if (/*#__PURE__*/React.isValidElement(category)) {
628
706
  var _category$props;
629
- var _ref21 = (_category$props = category === null || category === void 0 ? void 0 : category.props) !== null && _category$props !== void 0 ? _category$props : {},
630
- _ref21$width = _ref21.width,
631
- width = _ref21$width === void 0 ? 0 : _ref21$width,
632
- _ref21$height = _ref21.height,
633
- height = _ref21$height === void 0 ? 0 : _ref21$height;
707
+ var _ref19 = (_category$props = category === null || category === void 0 ? void 0 : category.props) !== null && _category$props !== void 0 ? _category$props : {},
708
+ _ref19$width = _ref19.width,
709
+ width = _ref19$width === void 0 ? 0 : _ref19$width,
710
+ _ref19$height = _ref19.height,
711
+ height = _ref19$height === void 0 ? 0 : _ref19$height;
634
712
  var _getLabelOffsetPositi = getLabelOffsetPosition(xDirection, yDirection, width, height),
635
713
  _getLabelOffsetPositi2 = _slicedToArray(_getLabelOffsetPositi, 2),
636
714
  xOffset = _getLabelOffsetPositi2[0],
@@ -644,55 +722,56 @@ function AxisLabels(props) {
644
722
  });
645
723
  }
646
724
  var Hover = /*#__PURE__*/function (_Component4) {
647
- _inherits(Hover, _Component4);
648
- var _super4 = _createSuper(Hover);
649
725
  function Hover() {
650
- var _this3;
726
+ var _this4;
651
727
  _classCallCheck(this, Hover);
652
728
  for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
653
729
  args[_key3] = arguments[_key3];
654
730
  }
655
- _this3 = _super4.call.apply(_super4, [this].concat(args));
656
- _defineProperty(_assertThisInitialized(_this3), "state", {
731
+ _this4 = _callSuper(this, Hover, [].concat(args));
732
+ _defineProperty(_this4, "state", {
657
733
  index: null
658
734
  });
659
- _defineProperty(_assertThisInitialized(_this3), "virtualElement", canUseDOM() ? document.createElement('div') : {});
660
- _defineProperty(_assertThisInitialized(_this3), "unsubscribeMouseMoveRoot", null);
661
- _defineProperty(_assertThisInitialized(_this3), "unsubscribeMouseLeaveRoot", null);
662
- _defineProperty(_assertThisInitialized(_this3), "handlerMouseMoveRoot", trottle(function (e) {
663
- var _this3$asProps = _this3.asProps,
664
- eventEmitter = _this3$asProps.eventEmitter,
665
- size = _this3$asProps.size,
666
- rootRef = _this3$asProps.rootRef,
667
- patterns = _this3$asProps.patterns;
735
+ _defineProperty(_this4, "virtualElement", canUseDOM() ? document.createElement('div') : {});
736
+ _defineProperty(_this4, "unsubscribeMouseMoveRoot", null);
737
+ _defineProperty(_this4, "unsubscribeMouseLeaveRoot", null);
738
+ _defineProperty(_this4, "handlerMouseMoveRoot", trottle(function (e) {
739
+ var _this4$asProps = _this4.asProps,
740
+ eventEmitter = _this4$asProps.eventEmitter,
741
+ size = _this4$asProps.size,
742
+ rootRef = _this4$asProps.rootRef,
743
+ patterns = _this4$asProps.patterns,
744
+ getIndex = _this4$asProps.getIndex,
745
+ plotId = _this4$asProps.plotId;
668
746
  var point = eventToPoint(e, rootRef.current);
669
747
  var diam = Math.min(size[0], size[1]);
670
748
  var centerX = point[0] - diam / 2;
671
749
  var centerY = point[1] - diam / 2;
672
750
  var clientX = e.clientX,
673
751
  clientY = e.clientY;
674
- var index = _this3.getIndex([centerX, centerY]);
675
- _this3.setState({
752
+ var index = getIndex([centerX, centerY]);
753
+ _this4.setState({
676
754
  index: index
677
755
  }, function () {
678
- eventEmitter.emit('setTooltipPosition', clientX, clientY);
679
- eventEmitter.emit('setTooltipRenderingProps', {}, {
756
+ eventEmitter.emit("setTooltipPosition_".concat(plotId), clientX, clientY);
757
+ eventEmitter.emit("setTooltipRenderingProps_".concat(plotId), {}, {
680
758
  index: index,
681
759
  patterns: patterns
682
760
  });
683
- eventEmitter.emit('setTooltipVisible', index !== null);
761
+ eventEmitter.emit("setTooltipVisible_".concat(plotId), index !== null);
684
762
  });
685
763
  }));
686
- _defineProperty(_assertThisInitialized(_this3), "handlerMouseLeaveRoot", trottle(function () {
687
- _this3.setState({
764
+ _defineProperty(_this4, "handlerMouseLeaveRoot", trottle(function () {
765
+ _this4.setState({
688
766
  index: null
689
767
  }, function () {
690
- _this3.asProps.eventEmitter.emit('setTooltipVisible', false);
768
+ _this4.asProps.eventEmitter.emit("setTooltipVisible_".concat(_this4.asProps.plotId), false);
691
769
  });
692
770
  }));
693
- return _this3;
771
+ return _this4;
694
772
  }
695
- _createClass(Hover, [{
773
+ _inherits(Hover, _Component4);
774
+ return _createClass(Hover, [{
696
775
  key: "generateGetBoundingClientRect",
697
776
  value: function generateGetBoundingClientRect() {
698
777
  var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
@@ -708,64 +787,6 @@ var Hover = /*#__PURE__*/function (_Component4) {
708
787
  };
709
788
  };
710
789
  }
711
- }, {
712
- key: "getPolygon",
713
- value: function getPolygon(index) {
714
- var _this$asProps10 = this.asProps,
715
- categories = _this$asProps10.categories,
716
- size = _this$asProps10.size,
717
- offset = _this$asProps10.offset,
718
- angleOffset = _this$asProps10.angleOffset;
719
- var total = categories.length;
720
- var diam = Math.min(size[0], size[1]);
721
- var radius = diam / 2 - offset;
722
- var prevIndex = (index - 1 + total) % total;
723
- var nextIndex = (index + 1 + total) % total;
724
- var _getRadianPosition7 = getRadianPosition(prevIndex, radius, total, angleOffset),
725
- _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2),
726
- prevX1 = _getRadianPosition8[0],
727
- prevY1 = _getRadianPosition8[1];
728
- var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset),
729
- _getRadianPosition10 = _slicedToArray(_getRadianPosition9, 2),
730
- x = _getRadianPosition10[0],
731
- y = _getRadianPosition10[1];
732
- var _getRadianPosition11 = getRadianPosition(nextIndex, radius, total, angleOffset),
733
- _getRadianPosition12 = _slicedToArray(_getRadianPosition11, 2),
734
- nextX1 = _getRadianPosition12[0],
735
- nextY1 = _getRadianPosition12[1];
736
- return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
737
- }
738
- }, {
739
- key: "getPie",
740
- value: function getPie(index) {
741
- var _this$asProps11 = this.asProps,
742
- categories = _this$asProps11.categories,
743
- size = _this$asProps11.size,
744
- offset = _this$asProps11.offset,
745
- angleOffset = _this$asProps11.angleOffset;
746
- var angle = Math.PI * 2 / categories.length;
747
- var radius = Math.min(size[0], size[1]) / 2 - offset;
748
- return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
749
- }
750
- }, {
751
- key: "getIndex",
752
- value: function getIndex(point) {
753
- var _this4 = this;
754
- var _this$asProps12 = this.asProps,
755
- categories = _this$asProps12.categories,
756
- type = _this$asProps12.type;
757
- var index;
758
- if (type === 'circle') {
759
- index = categories.findIndex(function (c, i) {
760
- return pieContains(_this4.getPie(i), point);
761
- });
762
- } else {
763
- index = categories.findIndex(function (c, i) {
764
- return polygonContains(_this4.getPolygon(i), point);
765
- });
766
- }
767
- return index === -1 ? null : index;
768
- }
769
790
  }, {
770
791
  key: "componentDidMount",
771
792
  value: function componentDidMount() {
@@ -790,36 +811,37 @@ var Hover = /*#__PURE__*/function (_Component4) {
790
811
  }, {
791
812
  key: "render",
792
813
  value: function render() {
793
- var _this$asProps13 = this.asProps,
794
- styles = _this$asProps13.styles,
795
- type = _this$asProps13.type;
814
+ var _this$asProps12 = this.asProps,
815
+ styles = _this$asProps12.styles,
816
+ type = _this$asProps12.type,
817
+ getPie = _this$asProps12.getPie,
818
+ getPolygon = _this$asProps12.getPolygon;
796
819
  var index = this.state.index;
797
820
  var SPieRect = this.Element;
798
821
  if (index !== null) {
799
822
  if (type === 'circle') {
800
- var _ref10;
801
- var _this$getPie = this.getPie(index),
802
- _this$getPie2 = _slicedToArray(_this$getPie, 3),
803
- startAngle = _this$getPie2[0],
804
- endAngle = _this$getPie2[1],
805
- radius = _this$getPie2[2];
823
+ var _ref0;
824
+ var _getPie = getPie(index),
825
+ _getPie2 = _slicedToArray(_getPie, 3),
826
+ startAngle = _getPie2[0],
827
+ endAngle = _getPie2[1],
828
+ radius = _getPie2[2];
806
829
  var circle = arc().innerRadius(0).outerRadius(radius).startAngle(startAngle).endAngle(endAngle);
807
- return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SPieRect, _ref10.cn("SPieRect", {
830
+ return _ref0 = sstyled(styles), /*#__PURE__*/React.createElement(SPieRect, _ref0.cn("SPieRect", {
808
831
  "render": 'path',
809
832
  "d": circle()
810
833
  }));
811
834
  } else {
812
- var _ref11;
813
- return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SPieRect, _ref11.cn("SPieRect", {
835
+ var _ref1;
836
+ return _ref1 = sstyled(styles), /*#__PURE__*/React.createElement(SPieRect, _ref1.cn("SPieRect", {
814
837
  "render": 'path',
815
- "d": line()(this.getPolygon(index))
838
+ "d": line()(getPolygon(index))
816
839
  }));
817
840
  }
818
841
  }
819
842
  return null;
820
843
  }
821
844
  }]);
822
- return Hover;
823
845
  }(Component);
824
846
  var Axis = createElement(AxisRoot, {
825
847
  Ticks: AxisTicks,
@@ -829,15 +851,15 @@ var Polygon = createElement(PolygonRoot, {
829
851
  Line: PolygonLine,
830
852
  Dots: PolygonDots
831
853
  });
832
- var RadarTooltip = function RadarTooltip(props) {
854
+ function RadarTooltip(props) {
833
855
  var _ref = arguments[0],
834
- _ref12;
856
+ _ref10;
835
857
  var SRadarTooltip = Tooltip;
836
- return _ref12 = sstyled(props.styles), /*#__PURE__*/React.createElement(SRadarTooltip, _ref12.cn("SRadarTooltip", _objectSpread({}, _assignProps({
858
+ return _ref10 = sstyled(props.styles), /*#__PURE__*/React.createElement(SRadarTooltip, _ref10.cn("SRadarTooltip", _objectSpread({}, _assignProps({
837
859
  "tag": Radar.Hover,
838
860
  "excludeAnchorProps": true
839
861
  }, _ref))));
840
- };
862
+ }
841
863
  var Radar = createElement(RadarRoot, {
842
864
  Axis: Axis,
843
865
  Polygon: Polygon,