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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (439) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/cjs/AnimatedClipPath.js +28 -41
  3. package/lib/cjs/AnimatedClipPath.js.map +1 -1
  4. package/lib/cjs/Area.js +187 -223
  5. package/lib/cjs/Area.js.map +1 -1
  6. package/lib/cjs/Axis.js +248 -327
  7. package/lib/cjs/Axis.js.map +1 -1
  8. package/lib/cjs/Bar.js +162 -185
  9. package/lib/cjs/Bar.js.map +1 -1
  10. package/lib/cjs/Bubble.js +219 -248
  11. package/lib/cjs/Bubble.js.map +1 -1
  12. package/lib/cjs/CompactHorizontalBar.js +448 -482
  13. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  14. package/lib/cjs/Donut.js +349 -396
  15. package/lib/cjs/Donut.js.map +1 -1
  16. package/lib/cjs/Dots.js +67 -86
  17. package/lib/cjs/Dots.js.map +1 -1
  18. package/lib/cjs/GroupBar.js +78 -93
  19. package/lib/cjs/GroupBar.js.map +1 -1
  20. package/lib/cjs/HorizontalBar.js +149 -167
  21. package/lib/cjs/HorizontalBar.js.map +1 -1
  22. package/lib/cjs/Hover.js +178 -207
  23. package/lib/cjs/Hover.js.map +1 -1
  24. package/lib/cjs/Line.js +182 -222
  25. package/lib/cjs/Line.js.map +1 -1
  26. package/lib/cjs/Pattern.js +124 -126
  27. package/lib/cjs/Pattern.js.map +1 -1
  28. package/lib/cjs/Plot.js +100 -126
  29. package/lib/cjs/Plot.js.map +1 -1
  30. package/lib/cjs/Radar.js +576 -681
  31. package/lib/cjs/Radar.js.map +1 -1
  32. package/lib/cjs/RadialTree.js +518 -571
  33. package/lib/cjs/RadialTree.js.map +1 -1
  34. package/lib/cjs/Reference.js +147 -178
  35. package/lib/cjs/Reference.js.map +1 -1
  36. package/lib/cjs/ResponsiveContainer.js +64 -82
  37. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  38. package/lib/cjs/ScatterPlot.js +169 -199
  39. package/lib/cjs/ScatterPlot.js.map +1 -1
  40. package/lib/cjs/StackBar.js +135 -177
  41. package/lib/cjs/StackBar.js.map +1 -1
  42. package/lib/cjs/StackedArea.js +60 -73
  43. package/lib/cjs/StackedArea.js.map +1 -1
  44. package/lib/cjs/Tooltip.js +193 -208
  45. package/lib/cjs/Tooltip.js.map +1 -1
  46. package/lib/cjs/Venn.js +182 -217
  47. package/lib/cjs/Venn.js.map +1 -1
  48. package/lib/cjs/a11y/DataAccessibilityTable.js +45 -83
  49. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  50. package/lib/cjs/a11y/PlotA11yModule.js +37 -97
  51. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  52. package/lib/cjs/a11y/PlotA11yView.js +97 -91
  53. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  54. package/lib/cjs/a11y/bezier.js +17 -23
  55. package/lib/cjs/a11y/bezier.js.map +1 -1
  56. package/lib/cjs/a11y/focus.js +16 -16
  57. package/lib/cjs/a11y/focus.js.map +1 -1
  58. package/lib/cjs/a11y/hints.js +72 -75
  59. package/lib/cjs/a11y/hints.js.map +1 -1
  60. package/lib/cjs/a11y/insights.js +354 -525
  61. package/lib/cjs/a11y/insights.js.map +1 -1
  62. package/lib/cjs/a11y/intl.js +5 -5
  63. package/lib/cjs/a11y/intl.js.map +1 -1
  64. package/lib/cjs/a11y/locale.js +12 -19
  65. package/lib/cjs/a11y/locale.js.map +1 -1
  66. package/lib/cjs/a11y/serialize.js +164 -203
  67. package/lib/cjs/a11y/serialize.js.map +1 -1
  68. package/lib/cjs/a11y/summarize.js +7 -6
  69. package/lib/cjs/a11y/summarize.js.map +1 -1
  70. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +16 -16
  71. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  72. package/lib/cjs/a11y/translations/module/de.json +2 -2
  73. package/lib/cjs/a11y/translations/module/en.json +2 -2
  74. package/lib/cjs/a11y/translations/module/es.json +2 -2
  75. package/lib/cjs/a11y/translations/module/fr.json +2 -2
  76. package/lib/cjs/a11y/translations/module/it.json +2 -2
  77. package/lib/cjs/a11y/translations/module/ja.json +2 -2
  78. package/lib/cjs/a11y/translations/module/ko.json +2 -2
  79. package/lib/cjs/a11y/translations/module/nl.json +2 -2
  80. package/lib/cjs/a11y/translations/module/pl.json +2 -2
  81. package/lib/cjs/a11y/translations/module/pt.json +2 -2
  82. package/lib/cjs/a11y/translations/module/sv.json +2 -2
  83. package/lib/cjs/a11y/translations/module/tr.json +2 -2
  84. package/lib/cjs/a11y/translations/module/vi.json +2 -2
  85. package/lib/cjs/a11y/translations/module/zh.json +2 -2
  86. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +16 -16
  87. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  88. package/lib/cjs/color.js +1 -1
  89. package/lib/cjs/color.js.map +1 -1
  90. package/lib/cjs/component/Chart/AbstractChart.js +421 -466
  91. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  92. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  93. package/lib/cjs/component/Chart/AreaChart.js +97 -115
  94. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  95. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  96. package/lib/cjs/component/Chart/BarChart.js +229 -216
  97. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  98. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  99. package/lib/cjs/component/Chart/BubbleChart.js +114 -136
  100. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  101. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  102. package/lib/cjs/component/Chart/CigaretteChart.js +280 -305
  103. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  104. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +76 -108
  105. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  106. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  107. package/lib/cjs/component/Chart/DonutChart.js +80 -95
  108. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  109. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  110. package/lib/cjs/component/Chart/HistogramChart.js +126 -148
  111. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  112. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  113. package/lib/cjs/component/Chart/LineChart.js +95 -113
  114. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  115. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  116. package/lib/cjs/component/Chart/RadarChart.js +84 -110
  117. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  118. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  119. package/lib/cjs/component/Chart/ScatterPlotChart.js +119 -143
  120. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  121. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  122. package/lib/cjs/component/Chart/VennChart.js +103 -122
  123. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  124. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  125. package/lib/cjs/component/Chart/index.js +2 -2
  126. package/lib/cjs/component/Chart/index.js.map +1 -1
  127. package/lib/cjs/component/ChartLegend/BaseLegend.js +72 -105
  128. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  129. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  130. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +58 -70
  131. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  132. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  133. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +208 -221
  134. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  135. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  136. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  137. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +63 -73
  138. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  139. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  140. package/lib/cjs/component/ChartLegend/index.js +4 -4
  141. package/lib/cjs/component/ChartLegend/index.js.map +1 -1
  142. package/lib/cjs/component/Cigarette/Cigarette.js +115 -129
  143. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  144. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +107 -137
  145. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
  146. package/lib/cjs/component/SvgElement.js +7 -7
  147. package/lib/cjs/component/SvgElement.js.map +1 -1
  148. package/lib/cjs/createElement.js +66 -65
  149. package/lib/cjs/createElement.js.map +1 -1
  150. package/lib/cjs/index.js +62 -62
  151. package/lib/cjs/style/axis.shadow.css +3 -0
  152. package/lib/cjs/style/plot.shadow.css +1 -3
  153. package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
  154. package/lib/cjs/style/plotA11yView.shadow.css +13 -26
  155. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +15 -15
  156. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  157. package/lib/cjs/types/Axis.d.js.map +1 -1
  158. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  159. package/lib/cjs/types/Hover.d.js.map +1 -1
  160. package/lib/cjs/types/Line.d.js.map +1 -1
  161. package/lib/cjs/types/Plot.d.js.map +1 -1
  162. package/lib/cjs/types/Radar.d.js.map +1 -1
  163. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  164. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  165. package/lib/cjs/types/Venn.d.js.map +1 -1
  166. package/lib/cjs/types/index.d.js +80 -80
  167. package/lib/cjs/types/index.d.js.map +1 -1
  168. package/lib/cjs/utils.js +122 -145
  169. package/lib/cjs/utils.js.map +1 -1
  170. package/lib/es6/AnimatedClipPath.js +24 -37
  171. package/lib/es6/AnimatedClipPath.js.map +1 -1
  172. package/lib/es6/Area.js +179 -215
  173. package/lib/es6/Area.js.map +1 -1
  174. package/lib/es6/Axis.js +242 -321
  175. package/lib/es6/Axis.js.map +1 -1
  176. package/lib/es6/Bar.js +154 -177
  177. package/lib/es6/Bar.js.map +1 -1
  178. package/lib/es6/Bubble.js +206 -235
  179. package/lib/es6/Bubble.js.map +1 -1
  180. package/lib/es6/CompactHorizontalBar.js +433 -467
  181. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  182. package/lib/es6/Donut.js +337 -384
  183. package/lib/es6/Donut.js.map +1 -1
  184. package/lib/es6/Dots.js +60 -79
  185. package/lib/es6/Dots.js.map +1 -1
  186. package/lib/es6/GroupBar.js +74 -89
  187. package/lib/es6/GroupBar.js.map +1 -1
  188. package/lib/es6/HorizontalBar.js +141 -159
  189. package/lib/es6/HorizontalBar.js.map +1 -1
  190. package/lib/es6/Hover.js +174 -203
  191. package/lib/es6/Hover.js.map +1 -1
  192. package/lib/es6/Line.js +173 -213
  193. package/lib/es6/Line.js.map +1 -1
  194. package/lib/es6/Pattern.js +68 -74
  195. package/lib/es6/Pattern.js.map +1 -1
  196. package/lib/es6/Plot.js +95 -121
  197. package/lib/es6/Plot.js.map +1 -1
  198. package/lib/es6/Radar.js +554 -659
  199. package/lib/es6/Radar.js.map +1 -1
  200. package/lib/es6/RadialTree.js +500 -553
  201. package/lib/es6/RadialTree.js.map +1 -1
  202. package/lib/es6/Reference.js +140 -171
  203. package/lib/es6/Reference.js.map +1 -1
  204. package/lib/es6/ResponsiveContainer.js +58 -76
  205. package/lib/es6/ResponsiveContainer.js.map +1 -1
  206. package/lib/es6/ScatterPlot.js +161 -191
  207. package/lib/es6/ScatterPlot.js.map +1 -1
  208. package/lib/es6/StackBar.js +130 -172
  209. package/lib/es6/StackBar.js.map +1 -1
  210. package/lib/es6/StackedArea.js +56 -69
  211. package/lib/es6/StackedArea.js.map +1 -1
  212. package/lib/es6/Tooltip.js +183 -198
  213. package/lib/es6/Tooltip.js.map +1 -1
  214. package/lib/es6/Venn.js +169 -204
  215. package/lib/es6/Venn.js.map +1 -1
  216. package/lib/es6/a11y/DataAccessibilityTable.js +41 -80
  217. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  218. package/lib/es6/a11y/PlotA11yModule.js +35 -95
  219. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  220. package/lib/es6/a11y/PlotA11yView.js +89 -84
  221. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  222. package/lib/es6/a11y/bezier.js +16 -23
  223. package/lib/es6/a11y/bezier.js.map +1 -1
  224. package/lib/es6/a11y/focus.js +15 -16
  225. package/lib/es6/a11y/focus.js.map +1 -1
  226. package/lib/es6/a11y/hints.js +67 -73
  227. package/lib/es6/a11y/hints.js.map +1 -1
  228. package/lib/es6/a11y/insights.js +353 -524
  229. package/lib/es6/a11y/insights.js.map +1 -1
  230. package/lib/es6/a11y/intl.js +4 -5
  231. package/lib/es6/a11y/intl.js.map +1 -1
  232. package/lib/es6/a11y/locale.js +11 -18
  233. package/lib/es6/a11y/locale.js.map +1 -1
  234. package/lib/es6/a11y/serialize.js +162 -203
  235. package/lib/es6/a11y/serialize.js.map +1 -1
  236. package/lib/es6/a11y/summarize.js +6 -6
  237. package/lib/es6/a11y/summarize.js.map +1 -1
  238. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +15 -15
  239. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  240. package/lib/es6/a11y/translations/module/de.json +2 -2
  241. package/lib/es6/a11y/translations/module/en.json +2 -2
  242. package/lib/es6/a11y/translations/module/es.json +2 -2
  243. package/lib/es6/a11y/translations/module/fr.json +2 -2
  244. package/lib/es6/a11y/translations/module/it.json +2 -2
  245. package/lib/es6/a11y/translations/module/ja.json +2 -2
  246. package/lib/es6/a11y/translations/module/ko.json +2 -2
  247. package/lib/es6/a11y/translations/module/nl.json +2 -2
  248. package/lib/es6/a11y/translations/module/pl.json +2 -2
  249. package/lib/es6/a11y/translations/module/pt.json +2 -2
  250. package/lib/es6/a11y/translations/module/sv.json +2 -2
  251. package/lib/es6/a11y/translations/module/tr.json +2 -2
  252. package/lib/es6/a11y/translations/module/vi.json +2 -2
  253. package/lib/es6/a11y/translations/module/zh.json +2 -2
  254. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +15 -15
  255. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  256. package/lib/es6/color.js +1 -1
  257. package/lib/es6/color.js.map +1 -1
  258. package/lib/es6/component/Chart/AbstractChart.js +416 -462
  259. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  260. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  261. package/lib/es6/component/Chart/AreaChart.js +92 -111
  262. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  263. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  264. package/lib/es6/component/Chart/BarChart.js +225 -213
  265. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  266. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  267. package/lib/es6/component/Chart/BubbleChart.js +109 -132
  268. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  269. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  270. package/lib/es6/component/Chart/CigaretteChart.js +276 -301
  271. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  272. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +70 -103
  273. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  274. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  275. package/lib/es6/component/Chart/DonutChart.js +74 -90
  276. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  277. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  278. package/lib/es6/component/Chart/HistogramChart.js +121 -144
  279. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  280. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  281. package/lib/es6/component/Chart/LineChart.js +90 -109
  282. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  283. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  284. package/lib/es6/component/Chart/RadarChart.js +80 -107
  285. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  286. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  287. package/lib/es6/component/Chart/ScatterPlotChart.js +113 -138
  288. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  289. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  290. package/lib/es6/component/Chart/VennChart.js +97 -117
  291. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  292. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  293. package/lib/es6/component/ChartLegend/BaseLegend.js +70 -104
  294. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  295. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  296. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +53 -65
  297. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  298. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  299. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +198 -211
  300. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  301. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js +1 -1
  302. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  303. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +58 -68
  304. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  305. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  306. package/lib/es6/component/Cigarette/Cigarette.js +108 -122
  307. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  308. package/lib/es6/component/StackGroupBar/StackGroupBar.js +100 -130
  309. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  310. package/lib/es6/component/SvgElement.js +4 -5
  311. package/lib/es6/component/SvgElement.js.map +1 -1
  312. package/lib/es6/createElement.js +55 -54
  313. package/lib/es6/createElement.js.map +1 -1
  314. package/lib/es6/style/axis.shadow.css +3 -0
  315. package/lib/es6/style/plot.shadow.css +1 -3
  316. package/lib/es6/style/plotA11yModule.shadow.css +10 -11
  317. package/lib/es6/style/plotA11yView.shadow.css +13 -26
  318. package/lib/es6/translations/__intergalactic-dynamic-locales.js +14 -14
  319. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  320. package/lib/es6/types/Axis.d.js.map +1 -1
  321. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  322. package/lib/es6/types/Hover.d.js.map +1 -1
  323. package/lib/es6/types/Line.d.js.map +1 -1
  324. package/lib/es6/types/Plot.d.js.map +1 -1
  325. package/lib/es6/types/Radar.d.js.map +1 -1
  326. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  327. package/lib/es6/types/Tooltip.d.js.map +1 -1
  328. package/lib/es6/types/Venn.d.js.map +1 -1
  329. package/lib/es6/utils.js +105 -144
  330. package/lib/es6/utils.js.map +1 -1
  331. package/lib/esm/AnimatedClipPath.mjs +24 -36
  332. package/lib/esm/Area.mjs +178 -149
  333. package/lib/esm/Axis.mjs +241 -242
  334. package/lib/esm/Bar.mjs +155 -137
  335. package/lib/esm/Bubble.mjs +205 -171
  336. package/lib/esm/CompactHorizontalBar.mjs +428 -383
  337. package/lib/esm/Donut.mjs +315 -266
  338. package/lib/esm/Dots.mjs +60 -49
  339. package/lib/esm/GroupBar.mjs +71 -75
  340. package/lib/esm/HorizontalBar.mjs +142 -120
  341. package/lib/esm/Hover.mjs +173 -163
  342. package/lib/esm/Line.mjs +174 -145
  343. package/lib/esm/Pattern.mjs +67 -63
  344. package/lib/esm/Plot.mjs +98 -95
  345. package/lib/esm/Radar.mjs +550 -498
  346. package/lib/esm/RadialTree.mjs +512 -416
  347. package/lib/esm/Reference.mjs +137 -122
  348. package/lib/esm/ResponsiveContainer.mjs +58 -69
  349. package/lib/esm/ScatterPlot.mjs +163 -162
  350. package/lib/esm/StackBar.mjs +126 -147
  351. package/lib/esm/StackedArea.mjs +53 -61
  352. package/lib/esm/Tooltip.mjs +185 -175
  353. package/lib/esm/Venn.mjs +170 -170
  354. package/lib/esm/a11y/DataAccessibilityTable.mjs +46 -73
  355. package/lib/esm/a11y/PlotA11yModule.mjs +37 -80
  356. package/lib/esm/a11y/PlotA11yView.mjs +99 -74
  357. package/lib/esm/a11y/bezier.mjs +16 -23
  358. package/lib/esm/a11y/focus.mjs +15 -16
  359. package/lib/esm/a11y/hints.mjs +65 -71
  360. package/lib/esm/a11y/insights.mjs +347 -495
  361. package/lib/esm/a11y/intl.mjs +4 -5
  362. package/lib/esm/a11y/locale.mjs +12 -14
  363. package/lib/esm/a11y/serialize.mjs +139 -152
  364. package/lib/esm/a11y/summarize.mjs +3 -3
  365. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +1 -1
  366. package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
  367. package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
  368. package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
  369. package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
  370. package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
  371. package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
  372. package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
  373. package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
  374. package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
  375. package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
  376. package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
  377. package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
  378. package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
  379. package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
  380. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +1 -1
  381. package/lib/esm/color.mjs +1 -1
  382. package/lib/esm/component/Chart/AbstractChart.mjs +422 -415
  383. package/lib/esm/component/Chart/AreaChart.mjs +92 -91
  384. package/lib/esm/component/Chart/BarChart.mjs +225 -177
  385. package/lib/esm/component/Chart/BubbleChart.mjs +110 -118
  386. package/lib/esm/component/Chart/CigaretteChart.mjs +277 -268
  387. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +70 -87
  388. package/lib/esm/component/Chart/DonutChart.mjs +74 -84
  389. package/lib/esm/component/Chart/HistogramChart.mjs +121 -117
  390. package/lib/esm/component/Chart/LineChart.mjs +90 -89
  391. package/lib/esm/component/Chart/RadarChart.mjs +81 -97
  392. package/lib/esm/component/Chart/ScatterPlotChart.mjs +113 -111
  393. package/lib/esm/component/Chart/VennChart.mjs +98 -111
  394. package/lib/esm/component/ChartLegend/BaseLegend.mjs +75 -97
  395. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +54 -55
  396. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +194 -165
  397. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +1 -1
  398. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +60 -58
  399. package/lib/esm/component/Cigarette/Cigarette.mjs +109 -99
  400. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +97 -111
  401. package/lib/esm/component/SvgElement.mjs +4 -4
  402. package/lib/esm/createElement.mjs +54 -37
  403. package/lib/esm/style/axis.shadow.css +3 -0
  404. package/lib/esm/style/plot.shadow.css +1 -3
  405. package/lib/esm/style/plotA11yModule.shadow.css +10 -11
  406. package/lib/esm/style/plotA11yView.shadow.css +13 -26
  407. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
  408. package/lib/esm/utils.mjs +103 -138
  409. package/lib/types/Axis.d.ts +4 -0
  410. package/lib/types/CompactHorizontalBar.d.ts +1 -1
  411. package/lib/types/Hover.d.ts +1 -1
  412. package/lib/types/Line.d.ts +1 -1
  413. package/lib/types/Plot.d.ts +1 -1
  414. package/lib/types/Radar.d.ts +1 -1
  415. package/lib/types/ResponsiveContainer.d.ts +1 -1
  416. package/lib/types/Tooltip.d.ts +1 -3
  417. package/lib/types/Venn.d.ts +1 -1
  418. package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
  419. package/lib/types/a11y/PlotA11yView.d.ts +12 -1
  420. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
  421. package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
  422. package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
  423. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
  424. package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
  425. package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
  426. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
  427. package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
  428. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
  429. package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
  430. package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
  431. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
  432. package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
  433. package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
  434. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
  435. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
  436. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
  437. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
  438. package/lib/types/utils.d.ts +10 -10
  439. package/package.json +9 -12
@@ -1,9 +1,3 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
5
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
2
  import { createComponent } from "@semcore/core";
9
3
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
@@ -14,94 +8,101 @@ import { HoverLine } from "../../Hover.mjs";
14
8
  import { minMax } from "../../utils.mjs";
15
9
  import { AbstractChart } from "./AbstractChart.mjs";
16
10
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
17
- var LineChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
18
- function LineChartComponent2() {
19
- _classCallCheck(this, LineChartComponent2);
20
- return _callSuper(this, LineChartComponent2, arguments);
21
- }
22
- _inherits(LineChartComponent2, _AbstractChart);
23
- return _createClass(LineChartComponent2, [{
24
- key: "xScale",
25
- get: function get() {
26
- var _this$asProps = this.asProps, xScale = _this$asProps.xScale, _this$asProps$marginY = _this$asProps.marginY, marginY = _this$asProps$marginY === void 0 ? 30 : _this$asProps$marginY, plotWidth = _this$asProps.plotWidth, data = _this$asProps.data, groupKey = _this$asProps.groupKey;
27
- if (xScale) {
28
- return xScale;
29
- }
30
- var testItem = data[0][groupKey];
31
- var range = [marginY, plotWidth - this.plotPadding];
32
- var domain = minMax(data, groupKey);
33
- if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
34
- return scaleTime(domain, range);
35
- }
36
- return scaleLinear(domain, range);
37
- }
38
- }, {
39
- key: "yScale",
40
- get: function get() {
41
- var _this$asProps2 = this.asProps, yScale = _this$asProps2.yScale, _this$asProps2$margin = _this$asProps2.marginX, marginX = _this$asProps2$margin === void 0 ? 30 : _this$asProps2$margin, plotHeight = _this$asProps2.plotHeight;
42
- if (yScale) {
43
- return yScale;
44
- }
45
- var flatValues = _superPropGet(LineChartComponent2, "flatValues", this, 1);
46
- var max = Math.max.apply(Math, _toConsumableArray(flatValues));
47
- var min = Math.min.apply(Math, _toConsumableArray(flatValues));
48
- return scaleLinear().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
11
+ class LineChartComponent extends AbstractChart {
12
+ get xScale() {
13
+ const {
14
+ xScale,
15
+ marginY = 30,
16
+ plotWidth,
17
+ data,
18
+ groupKey
19
+ } = this.asProps;
20
+ if (xScale) {
21
+ return xScale;
49
22
  }
50
- }, {
51
- key: "renderChart",
52
- value: function renderChart() {
53
- var _this$asProps3 = this.asProps, groupKey = _this$asProps3.groupKey, curve = _this$asProps3.curve, showDots = _this$asProps3.showDots, area = _this$asProps3.area, areaCurve = _this$asProps3.areaCurve, onClickLine = _this$asProps3.onClickLine;
54
- var _this$state = this.state, dataDefinitions = _this$state.dataDefinitions, highlightedLine = _this$state.highlightedLine;
55
- return dataDefinitions.map(function(item, index) {
56
- return item.checked && /* @__PURE__ */ React.createElement(Line, {
57
- x: groupKey.toString(),
58
- y: item.id,
59
- key: item.id,
60
- color: item.color,
61
- transparent: highlightedLine !== -1 && highlightedLine !== index,
62
- curve,
63
- onClick: onClickLine
64
- }, showDots && /* @__PURE__ */ React.createElement(Line.Dots, {
65
- display: true
66
- }), (area === null || area === void 0 ? void 0 : area[item.id]) && /* @__PURE__ */ React.createElement(Line.Area, {
67
- area: area[item.id],
68
- y0: "y0",
69
- y1: "y1",
70
- curve: areaCurve
71
- }));
72
- });
23
+ const testItem = data[0][groupKey];
24
+ const range = [marginY, plotWidth - this.plotPadding];
25
+ const domain = minMax(data, groupKey);
26
+ if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
27
+ return scaleTime(domain, range);
73
28
  }
74
- }, {
75
- key: "renderTooltip",
76
- value: function renderTooltip() {
77
- var _this = this;
78
- var _this$asProps4 = this.asProps, data = _this$asProps4.data, groupKey = _this$asProps4.groupKey;
79
- return /* @__PURE__ */ React.createElement(HoverLine.Tooltip, {
80
- x: groupKey,
81
- wMin: 100
82
- }, function(_ref) {
83
- var xIndex = _ref.xIndex;
84
- var dataItem = data[xIndex];
85
- return {
86
- children: _this.getTooltipChildren({
87
- Tooltip: HoverLine.Tooltip,
88
- dataItem
89
- })
90
- };
91
- });
92
- }
93
- }, {
94
- key: "getLegendAriaLabel",
95
- value: function getLegendAriaLabel() {
96
- return this.asProps.getI18nText("legendForChart", {
97
- chartType: "Line"
98
- });
29
+ return scaleLinear(domain, range);
30
+ }
31
+ get yScale() {
32
+ const {
33
+ yScale,
34
+ marginX = 30,
35
+ plotHeight
36
+ } = this.asProps;
37
+ if (yScale) {
38
+ return yScale;
99
39
  }
100
- }]);
101
- })(AbstractChart);
40
+ const flatValues = super.flatValues;
41
+ const max = Math.max(...flatValues);
42
+ const min = Math.min(...flatValues);
43
+ return scaleLinear().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
44
+ }
45
+ renderChart() {
46
+ const {
47
+ groupKey,
48
+ curve,
49
+ showDots,
50
+ area,
51
+ areaCurve,
52
+ onClickLine
53
+ } = this.asProps;
54
+ const {
55
+ dataDefinitions,
56
+ highlightedLine
57
+ } = this.state;
58
+ return dataDefinitions.map((item, index) => {
59
+ return item.checked && /* @__PURE__ */ React.createElement(Line, {
60
+ x: groupKey.toString(),
61
+ y: item.id,
62
+ key: item.id,
63
+ color: item.color,
64
+ transparent: highlightedLine !== -1 && highlightedLine !== index,
65
+ curve,
66
+ onClick: onClickLine
67
+ }, showDots && /* @__PURE__ */ React.createElement(Line.Dots, {
68
+ display: true
69
+ }), (area == null ? void 0 : area[item.id]) && /* @__PURE__ */ React.createElement(Line.Area, {
70
+ area: area[item.id],
71
+ y0: "y0",
72
+ y1: "y1",
73
+ curve: areaCurve
74
+ }));
75
+ });
76
+ }
77
+ renderTooltip() {
78
+ const {
79
+ data,
80
+ groupKey
81
+ } = this.asProps;
82
+ return /* @__PURE__ */ React.createElement(HoverLine.Tooltip, {
83
+ x: groupKey,
84
+ wMin: 100
85
+ }, ({
86
+ xIndex
87
+ }) => {
88
+ const dataItem = data[xIndex];
89
+ return {
90
+ children: this.getTooltipChildren({
91
+ Tooltip: HoverLine.Tooltip,
92
+ dataItem
93
+ })
94
+ };
95
+ });
96
+ }
97
+ getLegendAriaLabel() {
98
+ return this.asProps.getI18nText("legendForChart", {
99
+ chartType: "Line"
100
+ });
101
+ }
102
+ }
102
103
  _defineProperty(LineChartComponent, "displayName", "Chart.Line");
103
104
  _defineProperty(LineChartComponent, "enhance", [i18nEnhance(localizedMessages)]);
104
- var LineChart = createComponent(LineChartComponent);
105
+ const LineChart = createComponent(LineChartComponent);
105
106
  export {
106
107
  LineChart
107
108
  };
@@ -1,9 +1,3 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
5
- import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
2
  import { createComponent } from "@semcore/core";
9
3
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
@@ -12,101 +6,91 @@ import React from "react";
12
6
  import { AbstractChart } from "./AbstractChart.mjs";
13
7
  import Radar from "../../Radar.mjs";
14
8
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
15
- var RadarChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
16
- function RadarChartComponent2() {
17
- _classCallCheck(this, RadarChartComponent2);
18
- return _callSuper(this, RadarChartComponent2, arguments);
9
+ class RadarChartComponent extends AbstractChart {
10
+ renderChart() {
11
+ const {
12
+ groupKey,
13
+ showDots,
14
+ circle,
15
+ onClickRadar
16
+ } = this.asProps;
17
+ const {
18
+ dataDefinitions
19
+ } = this.state;
20
+ return /* @__PURE__ */ React.createElement(Radar, {
21
+ onClick: onClickRadar,
22
+ scale: this.xScale,
23
+ type: circle ? "circle" : void 0
24
+ }, /* @__PURE__ */ React.createElement(Radar.Axis, {
25
+ dataKey: groupKey
26
+ }, /* @__PURE__ */ React.createElement(Radar.Axis.Ticks, null), /* @__PURE__ */ React.createElement(Radar.Axis.Labels, null)), this.renderRadarTooltip(), dataDefinitions.map((item) => {
27
+ return item.checked && /* @__PURE__ */ React.createElement(Radar.Polygon, {
28
+ dataKey: item.id,
29
+ key: item.id,
30
+ color: item.color
31
+ }, /* @__PURE__ */ React.createElement(Radar.Polygon.Line, null), showDots && /* @__PURE__ */ React.createElement(Radar.Polygon.Dots, null));
32
+ }));
19
33
  }
20
- _inherits(RadarChartComponent2, _AbstractChart);
21
- return _createClass(RadarChartComponent2, [{
22
- key: "renderChart",
23
- value: function renderChart() {
24
- var _this$asProps = this.asProps, groupKey = _this$asProps.groupKey, showDots = _this$asProps.showDots, circle = _this$asProps.circle, onClickRadar = _this$asProps.onClickRadar;
25
- var dataDefinitions = this.state.dataDefinitions;
26
- return /* @__PURE__ */ React.createElement(Radar, {
27
- onClick: onClickRadar,
28
- scale: this.xScale,
29
- type: circle ? "circle" : void 0
30
- }, /* @__PURE__ */ React.createElement(Radar.Axis, {
31
- dataKey: groupKey
32
- }, /* @__PURE__ */ React.createElement(Radar.Axis.Ticks, null), /* @__PURE__ */ React.createElement(Radar.Axis.Labels, null)), this.renderRadarTooltip(), dataDefinitions.map(function(item) {
33
- return item.checked && /* @__PURE__ */ React.createElement(Radar.Polygon, {
34
- dataKey: item.id,
35
- key: item.id,
36
- color: item.color
37
- }, /* @__PURE__ */ React.createElement(Radar.Polygon.Line, null), showDots && /* @__PURE__ */ React.createElement(Radar.Polygon.Dots, null));
38
- }));
39
- }
40
- }, {
41
- key: "renderRadarTooltip",
42
- value: function renderRadarTooltip() {
43
- var _this = this;
44
- var _this$asProps2 = this.asProps, data = _this$asProps2.data, groupKey = _this$asProps2.groupKey, showTooltip = _this$asProps2.showTooltip;
45
- var dataDefinitions = this.state.dataDefinitions;
46
- if (!showTooltip) {
47
- return null;
48
- }
49
- return /* @__PURE__ */ React.createElement(Radar.Tooltip, {
50
- wMin: 100
51
- }, function(_ref) {
52
- var _data$groupKey;
53
- var index = _ref.index;
54
- return {
55
- children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Radar.Tooltip.Title, null, (_data$groupKey = data[groupKey]) === null || _data$groupKey === void 0 ? void 0 : _data$groupKey[index]), dataDefinitions.map(function(item) {
56
- var _data$item$id;
57
- var value = (_data$item$id = data[item.id]) === null || _data$item$id === void 0 ? void 0 : _data$item$id[index];
58
- return item.checked && /* @__PURE__ */ React.createElement(Radar.Tooltip.Dot, {
59
- color: item.color,
60
- key: item.id
61
- }, _this.tooltipValueFormatter(value));
62
- }))
63
- };
64
- });
65
- }
66
- // By default, tooltip will render in Plot component.
67
- // In RadarChart, we need to render it in Radar component, so we use renderRadarTooltip method
68
- }, {
69
- key: "renderTooltip",
70
- value: function renderTooltip() {
34
+ renderRadarTooltip() {
35
+ const {
36
+ data,
37
+ groupKey,
38
+ showTooltip
39
+ } = this.asProps;
40
+ const {
41
+ dataDefinitions
42
+ } = this.state;
43
+ if (!showTooltip) {
71
44
  return null;
72
45
  }
73
- }, {
74
- key: "dataKeys",
75
- get: function get() {
76
- var _this$props = this.props, data = _this$props.data, groupKey = _this$props.groupKey;
77
- var legendKeys = Object.keys(data).filter(function(key) {
78
- return key !== groupKey;
79
- });
80
- return legendKeys;
81
- }
82
- }, {
83
- key: "xScale",
84
- get: function get() {
85
- var _this$asProps$scale;
86
- return (_this$asProps$scale = this.asProps.scale) !== null && _this$asProps$scale !== void 0 ? _this$asProps$scale : scaleLinear().domain(this.domain);
87
- }
88
- }, {
89
- key: "yScale",
90
- get: function get() {
91
- var _this$asProps$scale2;
92
- return (_this$asProps$scale2 = this.asProps.scale) !== null && _this$asProps$scale2 !== void 0 ? _this$asProps$scale2 : scaleLinear().domain(this.domain);
93
- }
94
- }, {
95
- key: "getLegendAriaLabel",
96
- value: function getLegendAriaLabel() {
97
- return this.asProps.getI18nText("legendForChart", {
98
- chartType: "Radar"
99
- });
100
- }
101
- }, {
102
- key: "domain",
103
- get: function get() {
104
- return [Math.min.apply(Math, _toConsumableArray(_superPropGet(RadarChartComponent2, "flatValues", this, 1))), Math.max.apply(Math, _toConsumableArray(_superPropGet(RadarChartComponent2, "flatValues", this, 1)))];
105
- }
106
- }]);
107
- })(AbstractChart);
46
+ return /* @__PURE__ */ React.createElement(Radar.Tooltip, {
47
+ wMin: 100
48
+ }, ({
49
+ index
50
+ }) => {
51
+ var _a;
52
+ return {
53
+ children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Radar.Tooltip.Title, null, (_a = data[groupKey]) == null ? void 0 : _a[index]), dataDefinitions.map((item) => {
54
+ var _a2;
55
+ const value = (_a2 = data[item.id]) == null ? void 0 : _a2[index];
56
+ return item.checked && /* @__PURE__ */ React.createElement(Radar.Tooltip.Dot, {
57
+ color: item.color,
58
+ key: item.id
59
+ }, this.tooltipValueFormatter(value));
60
+ }))
61
+ };
62
+ });
63
+ }
64
+ // By default, tooltip will render in Plot component.
65
+ // In RadarChart, we need to render it in Radar component, so we use renderRadarTooltip method
66
+ renderTooltip() {
67
+ return null;
68
+ }
69
+ get dataKeys() {
70
+ const {
71
+ data,
72
+ groupKey
73
+ } = this.props;
74
+ const legendKeys = Object.keys(data).filter((key) => key !== groupKey);
75
+ return legendKeys;
76
+ }
77
+ get xScale() {
78
+ return this.asProps.scale ?? scaleLinear().domain(this.domain);
79
+ }
80
+ get yScale() {
81
+ return this.asProps.scale ?? scaleLinear().domain(this.domain);
82
+ }
83
+ getLegendAriaLabel() {
84
+ return this.asProps.getI18nText("legendForChart", {
85
+ chartType: "Radar"
86
+ });
87
+ }
88
+ get domain() {
89
+ return [Math.min(...super.flatValues), Math.max(...super.flatValues)];
90
+ }
91
+ }
108
92
  _defineProperty(RadarChartComponent, "enhance", [i18nEnhance(localizedMessages)]);
109
- var RadarChart = createComponent(RadarChartComponent);
93
+ const RadarChart = createComponent(RadarChartComponent);
110
94
  export {
111
95
  RadarChart
112
96
  };
@@ -1,9 +1,3 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/esm/createClass";
5
- import _callSuper from "@babel/runtime/helpers/esm/callSuper";
6
- import _inherits from "@babel/runtime/helpers/esm/inherits";
7
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
2
  import { createComponent } from "@semcore/core";
9
3
  import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
@@ -14,117 +8,125 @@ import ScatterPlot from "../../ScatterPlot.mjs";
14
8
  import { getScatterPlotRadius, minMax } from "../../utils.mjs";
15
9
  import { AbstractChart } from "./AbstractChart.mjs";
16
10
  import { localizedMessages } from "../../translations/__intergalactic-dynamic-locales.mjs";
17
- var ScatterPlotChartComponent = /* @__PURE__ */ (function(_AbstractChart) {
18
- function ScatterPlotChartComponent2() {
19
- _classCallCheck(this, ScatterPlotChartComponent2);
20
- return _callSuper(this, ScatterPlotChartComponent2, arguments);
11
+ class ScatterPlotChartComponent extends AbstractChart {
12
+ get dataKeys() {
13
+ const {
14
+ data,
15
+ groupKey,
16
+ valueKey
17
+ } = this.props;
18
+ return Object.keys(data[0]).filter((key) => key !== groupKey && key !== valueKey);
21
19
  }
22
- _inherits(ScatterPlotChartComponent2, _AbstractChart);
23
- return _createClass(ScatterPlotChartComponent2, [{
24
- key: "dataKeys",
25
- get: function get() {
26
- var _this$props = this.props, data = _this$props.data, groupKey = _this$props.groupKey, valueKey = _this$props.valueKey;
27
- return Object.keys(data[0]).filter(function(key) {
28
- return key !== groupKey && key !== valueKey;
29
- });
30
- }
31
- }, {
32
- key: "xScale",
33
- get: function get() {
34
- var _this$asProps = this.asProps, xScale = _this$asProps.xScale, _this$asProps$marginY = _this$asProps.marginY, marginY = _this$asProps$marginY === void 0 ? 30 : _this$asProps$marginY, plotWidth = _this$asProps.plotWidth, data = _this$asProps.data, groupKey = _this$asProps.groupKey, valueKey = _this$asProps.valueKey;
35
- if (xScale) {
36
- return xScale;
37
- }
38
- var radius = getScatterPlotRadius(valueKey) / this.getValueScale(_toConsumableArray(this.flatValues));
39
- var testItem = data[0][groupKey];
40
- var range = [marginY, plotWidth - this.plotPadding];
41
- var domain = minMax(data, groupKey);
42
- if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
43
- return scaleTime([domain[0] - radius, domain[1] + radius], range);
44
- }
45
- return scaleLinear([domain[0] - radius, domain[1] + radius], range);
20
+ get xScale() {
21
+ const {
22
+ xScale,
23
+ marginY = 30,
24
+ plotWidth,
25
+ data,
26
+ groupKey,
27
+ valueKey
28
+ } = this.asProps;
29
+ if (xScale) {
30
+ return xScale;
46
31
  }
47
- }, {
48
- key: "yScale",
49
- get: function get() {
50
- var _this$asProps2 = this.asProps, yScale = _this$asProps2.yScale, _this$asProps2$margin = _this$asProps2.marginX, marginX = _this$asProps2$margin === void 0 ? 30 : _this$asProps2$margin, plotHeight = _this$asProps2.plotHeight, valueKey = _this$asProps2.valueKey;
51
- if (yScale) {
52
- return yScale;
53
- }
54
- var flatValues = this.flatValues;
55
- var radius = getScatterPlotRadius(valueKey) / this.getValueScale(_toConsumableArray(flatValues));
56
- var max = Math.max.apply(Math, _toConsumableArray(flatValues)) + radius;
57
- var min = Math.min.apply(Math, _toConsumableArray(flatValues)) - radius;
58
- return scaleLinear().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
32
+ const radius = getScatterPlotRadius(valueKey) / this.getValueScale([...this.flatValues]);
33
+ const testItem = data[0][groupKey];
34
+ const range = [marginY, plotWidth - this.plotPadding];
35
+ const domain = minMax(data, groupKey);
36
+ if (testItem instanceof Date && !Number.isNaN(testItem.getMilliseconds())) {
37
+ return scaleTime([domain[0] - radius, domain[1] + radius], range);
59
38
  }
60
- }, {
61
- key: "flatValues",
62
- get: function get() {
63
- var _this$asProps3 = this.asProps, data = _this$asProps3.data, groupKey = _this$asProps3.groupKey, valueKey = _this$asProps3.valueKey;
64
- var flatValues = data.reduce(function(result, item) {
65
- Object.entries(item).forEach(function(_ref) {
66
- var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1];
67
- if (key !== groupKey && key !== valueKey && typeof value === "number") {
68
- result.add(value);
69
- }
70
- });
71
- return result;
72
- }, /* @__PURE__ */ new Set());
73
- return flatValues;
39
+ return scaleLinear([domain[0] - radius, domain[1] + radius], range);
40
+ }
41
+ get yScale() {
42
+ const {
43
+ yScale,
44
+ marginX = 30,
45
+ plotHeight,
46
+ valueKey
47
+ } = this.asProps;
48
+ if (yScale) {
49
+ return yScale;
74
50
  }
75
- }, {
76
- key: "renderChart",
77
- value: function renderChart() {
78
- var _this$asProps4 = this.asProps, groupKey = _this$asProps4.groupKey, valueKey = _this$asProps4.valueKey, onClickScatterItem = _this$asProps4.onClickScatterItem;
79
- var dataDefinitions = this.state.dataDefinitions;
80
- return dataDefinitions.map(function(item) {
81
- return item.checked && /* @__PURE__ */ React.createElement(ScatterPlot, {
82
- onClick: onClickScatterItem,
83
- x: groupKey,
84
- y: item.id,
85
- key: item.id,
86
- color: item.color,
87
- value: valueKey
88
- });
51
+ const flatValues = this.flatValues;
52
+ const radius = getScatterPlotRadius(valueKey) / this.getValueScale([...flatValues]);
53
+ const max = Math.max(...flatValues) + radius;
54
+ const min = Math.min(...flatValues) - radius;
55
+ return scaleLinear().range([plotHeight - marginX, this.plotPadding]).domain([min, max]);
56
+ }
57
+ get flatValues() {
58
+ const {
59
+ data,
60
+ groupKey,
61
+ valueKey
62
+ } = this.asProps;
63
+ const flatValues = data.reduce((result, item) => {
64
+ Object.entries(item).forEach(([key, value]) => {
65
+ if (key !== groupKey && key !== valueKey && typeof value === "number") {
66
+ result.add(value);
67
+ }
89
68
  });
90
- }
91
- }, {
92
- key: "renderTooltip",
93
- value: function renderTooltip() {
94
- var _this = this;
95
- var _this$asProps5 = this.asProps, data = _this$asProps5.data, groupKey = _this$asProps5.groupKey;
96
- var dataDefinitions = this.state.dataDefinitions;
97
- return dataDefinitions.filter(function(item) {
98
- return item.checked;
99
- }).map(function(item) {
100
- return /* @__PURE__ */ React.createElement(ScatterPlot.Tooltip, {
101
- key: item.id,
102
- x: groupKey,
103
- y: item.id,
104
- wMin: 100
105
- }, function(_ref3) {
106
- var index = _ref3.index, x = _ref3.x, y = _ref3.y;
107
- return {
108
- children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ScatterPlot.Tooltip.Dot, {
109
- color: item.color
110
- }, "Data"), /* @__PURE__ */ React.createElement(Text, {
111
- tag: "div"
112
- }, "X axis", _this.tooltipValueFormatter(data[index][x])), /* @__PURE__ */ React.createElement(Text, {
113
- tag: "div"
114
- }, "Y axis", _this.tooltipValueFormatter(data[index][y])))
115
- };
116
- });
69
+ return result;
70
+ }, /* @__PURE__ */ new Set());
71
+ return flatValues;
72
+ }
73
+ renderChart() {
74
+ const {
75
+ groupKey,
76
+ valueKey,
77
+ onClickScatterItem
78
+ } = this.asProps;
79
+ const {
80
+ dataDefinitions
81
+ } = this.state;
82
+ return dataDefinitions.map((item) => {
83
+ return item.checked && /* @__PURE__ */ React.createElement(ScatterPlot, {
84
+ onClick: onClickScatterItem,
85
+ x: groupKey,
86
+ y: item.id,
87
+ key: item.id,
88
+ color: item.color,
89
+ value: valueKey
117
90
  });
118
- }
119
- }, {
120
- key: "getLegendAriaLabel",
121
- value: function getLegendAriaLabel() {
122
- return this.asProps.getI18nText("legendForChart", {
123
- chartType: "ScatterPlot"
91
+ });
92
+ }
93
+ renderTooltip() {
94
+ const {
95
+ data,
96
+ groupKey
97
+ } = this.asProps;
98
+ const {
99
+ dataDefinitions
100
+ } = this.state;
101
+ return dataDefinitions.filter((item) => item.checked).map((item) => {
102
+ return /* @__PURE__ */ React.createElement(ScatterPlot.Tooltip, {
103
+ key: item.id,
104
+ x: groupKey,
105
+ y: item.id,
106
+ wMin: 100
107
+ }, ({
108
+ index,
109
+ x,
110
+ y
111
+ }) => {
112
+ return {
113
+ children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ScatterPlot.Tooltip.Dot, {
114
+ color: item.color
115
+ }, "Data"), /* @__PURE__ */ React.createElement(Text, {
116
+ tag: "div"
117
+ }, "X axis", this.tooltipValueFormatter(data[index][x])), /* @__PURE__ */ React.createElement(Text, {
118
+ tag: "div"
119
+ }, "Y axis", this.tooltipValueFormatter(data[index][y])))
120
+ };
124
121
  });
125
- }
126
- }]);
127
- })(AbstractChart);
122
+ });
123
+ }
124
+ getLegendAriaLabel() {
125
+ return this.asProps.getI18nText("legendForChart", {
126
+ chartType: "ScatterPlot"
127
+ });
128
+ }
129
+ }
128
130
  _defineProperty(ScatterPlotChartComponent, "displayName", "Chart.ScatterPlot");
129
131
  _defineProperty(ScatterPlotChartComponent, "defaultProps", {
130
132
  direction: "column",
@@ -134,7 +136,7 @@ _defineProperty(ScatterPlotChartComponent, "defaultProps", {
134
136
  showLegend: false
135
137
  });
136
138
  _defineProperty(ScatterPlotChartComponent, "enhance", [i18nEnhance(localizedMessages)]);
137
- var ScatterPlotChart = createComponent(ScatterPlotChartComponent);
139
+ const ScatterPlotChart = createComponent(ScatterPlotChartComponent);
138
140
  export {
139
141
  ScatterPlotChart
140
142
  };