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

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 +11 -14
package/lib/esm/Axis.mjs CHANGED
@@ -1,58 +1,52 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
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
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
3
  import { sstyled, Component } from "@semcore/core";
10
4
  import React, { useState, useEffect } from "react";
11
5
  import createElement from "./createElement.mjs";
12
6
  import { scaleOfBandwidth } from "./utils.mjs";
13
7
  /*!__reshadow-styles__:"./style/axis.shadow.css"*/
14
- var style = (
8
+ const style = (
15
9
  /*__reshadow_css_start__*/
16
10
  (sstyled.insert(
17
11
  /*__inner_css_start__*/
18
- ".___SAxis_1e44w_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_1e44w_gg_.__hide_1e44w_gg_,.___STick_1e44w_gg_.__hide_1e44w_gg_{display:none}.___STick_1e44w_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___SGrid_1e44w_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_1e44w_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_1e44w)}.___STitle_1e44w_gg_._position_top_1e44w_gg_{text-anchor:middle}.___STitle_1e44w_gg_._position_bottom_1e44w_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_1e44w_gg_._position_left_1e44w_gg_,.___STitle_1e44w_gg_._position_right_1e44w_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___STitle_1e44w_gg_._position_left_1e44w_gg_.__verticalWritingMode_1e44w_gg_,.___STitle_1e44w_gg_._position_right_1e44w_gg_.__verticalWritingMode_1e44w_gg_{writing-mode:vertical-rl;transform:none}.___STick_1e44w_gg_._position_top_1e44w_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_1e44w_gg_._position_bottom_1e44w_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_1e44w_gg_._position_bottom_1e44w_gg_ tspan{dominant-baseline:hanging}.___STick_1e44w_gg_._position_right_1e44w_gg_{transform:translateX(16px);text-anchor:start;dominant-baseline:middle}.___STick_1e44w_gg_._position_left_1e44w_gg_ tspan,.___STick_1e44w_gg_._position_right_1e44w_gg_ tspan{dominant-baseline:middle}.___STick_1e44w_gg_._position_left_1e44w_gg_.__multiline_1e44w_gg_,.___STick_1e44w_gg_._position_left_1e44w_gg_.__multiline_1e44w_gg_ tspan,.___STick_1e44w_gg_._position_right_1e44w_gg_.__multiline_1e44w_gg_,.___STick_1e44w_gg_._position_right_1e44w_gg_.__multiline_1e44w_gg_ tspan{dominant-baseline:auto}.___STick_1e44w_gg_._position_left_1e44w_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_1e44w_gg_._position_custom_0_1e44w_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_1e44w_gg_._position_custom_0_1e44w_gg_ tspan{dominant-baseline:hanging}.___STick_1e44w_gg_._position_custom_1_1e44w_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_1e44w_gg_._position_custom_1_1e44w_gg_ tspan{dominant-baseline:middle}",
12
+ ".___SAxis_yb2p1_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_yb2p1_gg_.__hide_yb2p1_gg_{display:none}.___STick_yb2p1_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___STick_yb2p1_gg_.__primaryText_yb2p1_gg_{fill:var(--intergalactic-text-primary, #191b23)}.___STick_yb2p1_gg_.__hide_yb2p1_gg_{display:none}.___SGrid_yb2p1_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_yb2p1_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_yb2p1)}.___STitle_yb2p1_gg_._position_top_yb2p1_gg_{text-anchor:middle}.___STitle_yb2p1_gg_._position_bottom_yb2p1_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_yb2p1_gg_._position_left_yb2p1_gg_,.___STitle_yb2p1_gg_._position_right_yb2p1_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___STitle_yb2p1_gg_._position_left_yb2p1_gg_.__verticalWritingMode_yb2p1_gg_,.___STitle_yb2p1_gg_._position_right_yb2p1_gg_.__verticalWritingMode_yb2p1_gg_{writing-mode:vertical-rl;transform:none}.___STick_yb2p1_gg_._position_top_yb2p1_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_yb2p1_gg_._position_bottom_yb2p1_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_yb2p1_gg_._position_bottom_yb2p1_gg_ tspan{dominant-baseline:hanging}.___STick_yb2p1_gg_._position_right_yb2p1_gg_{transform:translateX(16px);text-anchor:start;dominant-baseline:middle}.___STick_yb2p1_gg_._position_left_yb2p1_gg_ tspan,.___STick_yb2p1_gg_._position_right_yb2p1_gg_ tspan{dominant-baseline:middle}.___STick_yb2p1_gg_._position_left_yb2p1_gg_.__multiline_yb2p1_gg_,.___STick_yb2p1_gg_._position_left_yb2p1_gg_.__multiline_yb2p1_gg_ tspan,.___STick_yb2p1_gg_._position_right_yb2p1_gg_.__multiline_yb2p1_gg_,.___STick_yb2p1_gg_._position_right_yb2p1_gg_.__multiline_yb2p1_gg_ tspan{dominant-baseline:auto}.___STick_yb2p1_gg_._position_left_yb2p1_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_yb2p1_gg_._position_custom_0_yb2p1_gg_{transform:translateY(12px);text-anchor:middle;dominant-baseline:hanging}.___STick_yb2p1_gg_._position_custom_0_yb2p1_gg_ tspan{dominant-baseline:hanging}.___STick_yb2p1_gg_._position_custom_1_yb2p1_gg_{transform:translateX(-16px);text-anchor:end;dominant-baseline:middle}.___STick_yb2p1_gg_._position_custom_1_yb2p1_gg_ tspan{dominant-baseline:middle}",
19
13
  /*__inner_css_end__*/
20
- "1e44w_gg_"
14
+ "yb2p1_gg_"
21
15
  ), /*__reshadow_css_end__*/
22
16
  {
23
- "__SAxis": "___SAxis_1e44w_gg_",
24
- "_hide": "__hide_1e44w_gg_",
25
- "__STick": "___STick_1e44w_gg_",
26
- "__SGrid": "___SGrid_1e44w_gg_",
27
- "__STitle": "___STitle_1e44w_gg_",
28
- "--transform-origin": "--transform-origin_1e44w",
29
- "_position_top": "_position_top_1e44w_gg_",
30
- "_position_bottom": "_position_bottom_1e44w_gg_",
31
- "_position_right": "_position_right_1e44w_gg_",
32
- "_position_left": "_position_left_1e44w_gg_",
33
- "_verticalWritingMode": "__verticalWritingMode_1e44w_gg_",
34
- "_multiline": "__multiline_1e44w_gg_",
35
- "_position_custom_0": "_position_custom_0_1e44w_gg_",
36
- "_position_custom_1": "_position_custom_1_1e44w_gg_"
17
+ "__SAxis": "___SAxis_yb2p1_gg_",
18
+ "_hide": "__hide_yb2p1_gg_",
19
+ "__STick": "___STick_yb2p1_gg_",
20
+ "_primaryText": "__primaryText_yb2p1_gg_",
21
+ "__SGrid": "___SGrid_yb2p1_gg_",
22
+ "__STitle": "___STitle_yb2p1_gg_",
23
+ "--transform-origin": "--transform-origin_yb2p1",
24
+ "_position_top": "_position_top_yb2p1_gg_",
25
+ "_position_bottom": "_position_bottom_yb2p1_gg_",
26
+ "_position_right": "_position_right_yb2p1_gg_",
27
+ "_position_left": "_position_left_yb2p1_gg_",
28
+ "_verticalWritingMode": "__verticalWritingMode_yb2p1_gg_",
29
+ "_multiline": "__multiline_yb2p1_gg_",
30
+ "_position_custom_0": "_position_custom_0_yb2p1_gg_",
31
+ "_position_custom_1": "_position_custom_1_yb2p1_gg_"
37
32
  })
38
33
  );
39
- var CUSTOM_0 = Symbol("custom_0");
40
- var CUSTOM_1 = Symbol("custom_1");
41
- var MAP_INDEX_SCALE_SYMBOL = {
34
+ const CUSTOM_0 = Symbol("custom_0");
35
+ const CUSTOM_1 = Symbol("custom_1");
36
+ const MAP_INDEX_SCALE_SYMBOL = {
42
37
  0: CUSTOM_0,
43
38
  1: CUSTOM_1
44
39
  };
45
- var MAP_POSITION_REVERT = {
40
+ const MAP_POSITION_REVERT = {
46
41
  top: "bottom",
47
42
  right: "left",
48
43
  bottom: "top",
49
44
  left: "right"
50
45
  };
51
- var MAP_POSITION_AXIS = _defineProperty(_defineProperty({
52
- top: function top(_ref5) {
53
- var _ref6 = _slicedToArray(_ref5, 2), xScale = _ref6[0], yScale = _ref6[1];
54
- var xRange = xScale.range();
55
- var yRange = yScale.range();
46
+ const MAP_POSITION_AXIS = {
47
+ top: ([xScale, yScale]) => {
48
+ const xRange = xScale.range();
49
+ const yRange = yScale.range();
56
50
  return {
57
51
  x1: xRange[0],
58
52
  y1: yRange[1],
@@ -60,10 +54,9 @@ var MAP_POSITION_AXIS = _defineProperty(_defineProperty({
60
54
  y2: yRange[1]
61
55
  };
62
56
  },
63
- bottom: function bottom(_ref7) {
64
- var _ref8 = _slicedToArray(_ref7, 2), xScale = _ref8[0], yScale = _ref8[1];
65
- var xRange = xScale.range();
66
- var yRange = yScale.range();
57
+ bottom: ([xScale, yScale]) => {
58
+ const xRange = xScale.range();
59
+ const yRange = yScale.range();
67
60
  return {
68
61
  x1: xRange[0],
69
62
  y1: yRange[0],
@@ -71,10 +64,9 @@ var MAP_POSITION_AXIS = _defineProperty(_defineProperty({
71
64
  y2: yRange[0]
72
65
  };
73
66
  },
74
- right: function right(_ref9) {
75
- var _ref0 = _slicedToArray(_ref9, 2), xScale = _ref0[0], yScale = _ref0[1];
76
- var xRange = xScale.range();
77
- var yRange = yScale.range();
67
+ right: ([xScale, yScale]) => {
68
+ const xRange = xScale.range();
69
+ const yRange = yScale.range();
78
70
  return {
79
71
  x1: xRange[1],
80
72
  y1: yRange[0],
@@ -82,87 +74,81 @@ var MAP_POSITION_AXIS = _defineProperty(_defineProperty({
82
74
  y2: yRange[1]
83
75
  };
84
76
  },
85
- left: function left(_ref1) {
86
- var _ref10 = _slicedToArray(_ref1, 2), xScale = _ref10[0], yScale = _ref10[1];
87
- var xRange = xScale.range();
88
- var yRange = yScale.range();
77
+ left: ([xScale, yScale]) => {
78
+ const xRange = xScale.range();
79
+ const yRange = yScale.range();
89
80
  return {
90
81
  x1: xRange[0],
91
82
  y1: yRange[0],
92
83
  x2: xRange[0],
93
84
  y2: yRange[1]
94
85
  };
86
+ },
87
+ [CUSTOM_0]: ([xScale, yScale], pos) => {
88
+ const xRange = xScale.range();
89
+ return {
90
+ x1: xRange[0],
91
+ y1: scaleOfBandwidth(yScale, pos),
92
+ x2: xRange[1],
93
+ y2: scaleOfBandwidth(yScale, pos)
94
+ };
95
+ },
96
+ [CUSTOM_1]: ([xScale, yScale], pos) => {
97
+ const yRange = yScale.range();
98
+ return {
99
+ x1: scaleOfBandwidth(xScale, pos),
100
+ y1: yRange[0],
101
+ x2: scaleOfBandwidth(xScale, pos),
102
+ y2: yRange[1]
103
+ };
95
104
  }
96
- }, CUSTOM_0, function(_ref11, pos) {
97
- var _ref12 = _slicedToArray(_ref11, 2), xScale = _ref12[0], yScale = _ref12[1];
98
- var xRange = xScale.range();
99
- return {
100
- x1: xRange[0],
101
- y1: scaleOfBandwidth(yScale, pos),
102
- x2: xRange[1],
103
- y2: scaleOfBandwidth(yScale, pos)
104
- };
105
- }), CUSTOM_1, function(_ref13, pos) {
106
- var _ref14 = _slicedToArray(_ref13, 2), xScale = _ref14[0], yScale = _ref14[1];
107
- var yRange = yScale.range();
108
- return {
109
- x1: scaleOfBandwidth(xScale, pos),
110
- y1: yRange[0],
111
- x2: scaleOfBandwidth(xScale, pos),
112
- y2: yRange[1]
113
- };
114
- });
115
- var MAP_POSITION_TICK = _defineProperty(_defineProperty({
116
- top: function top2(_ref15, value) {
117
- var _ref16 = _slicedToArray(_ref15, 2), xScale = _ref16[0], yScale = _ref16[1];
118
- var yRange = yScale.range();
105
+ };
106
+ const MAP_POSITION_TICK = {
107
+ top: ([xScale, yScale], value) => {
108
+ const yRange = yScale.range();
119
109
  return {
120
110
  x: scaleOfBandwidth(xScale, value),
121
111
  y: yRange[1]
122
112
  };
123
113
  },
124
- bottom: function bottom2(_ref17, value) {
125
- var _ref18 = _slicedToArray(_ref17, 2), xScale = _ref18[0], yScale = _ref18[1];
126
- var yRange = yScale.range();
114
+ bottom: ([xScale, yScale], value) => {
115
+ const yRange = yScale.range();
127
116
  return {
128
117
  x: scaleOfBandwidth(xScale, value),
129
118
  y: yRange[0]
130
119
  };
131
120
  },
132
- right: function right2(_ref19, value) {
133
- var _ref20 = _slicedToArray(_ref19, 2), xScale = _ref20[0], yScale = _ref20[1];
134
- var xRange = xScale.range();
121
+ right: ([xScale, yScale], value) => {
122
+ const xRange = xScale.range();
135
123
  return {
136
124
  x: xRange[1],
137
125
  y: scaleOfBandwidth(yScale, value)
138
126
  };
139
127
  },
140
- left: function left2(_ref21, value) {
141
- var _ref22 = _slicedToArray(_ref21, 2), xScale = _ref22[0], yScale = _ref22[1];
142
- var xRange = xScale.range();
128
+ left: ([xScale, yScale], value) => {
129
+ const xRange = xScale.range();
143
130
  return {
144
131
  x: xRange[0],
145
132
  y: scaleOfBandwidth(yScale, value)
146
133
  };
134
+ },
135
+ [CUSTOM_0]: ([xScale, yScale], value, pos) => {
136
+ return {
137
+ x: scaleOfBandwidth(xScale, value),
138
+ y: scaleOfBandwidth(yScale, pos)
139
+ };
140
+ },
141
+ [CUSTOM_1]: ([xScale, yScale], value, pos) => {
142
+ return {
143
+ x: scaleOfBandwidth(xScale, pos),
144
+ y: scaleOfBandwidth(yScale, value)
145
+ };
147
146
  }
148
- }, CUSTOM_0, function(_ref23, value, pos) {
149
- var _ref24 = _slicedToArray(_ref23, 2), xScale = _ref24[0], yScale = _ref24[1];
150
- return {
151
- x: scaleOfBandwidth(xScale, value),
152
- y: scaleOfBandwidth(yScale, pos)
153
- };
154
- }), CUSTOM_1, function(_ref25, value, pos) {
155
- var _ref26 = _slicedToArray(_ref25, 2), xScale = _ref26[0], yScale = _ref26[1];
156
- return {
157
- x: scaleOfBandwidth(xScale, pos),
158
- y: scaleOfBandwidth(yScale, value)
159
- };
160
- });
161
- var MAP_POSITION_GRID = {
162
- 0: function _(_ref27, value) {
163
- var _ref28 = _slicedToArray(_ref27, 2), xScale = _ref28[0], yScale = _ref28[1];
164
- var yRange = yScale.range();
165
- var x = scaleOfBandwidth(xScale, value);
147
+ };
148
+ const MAP_POSITION_GRID = {
149
+ 0: ([xScale, yScale], value) => {
150
+ const yRange = yScale.range();
151
+ const x = scaleOfBandwidth(xScale, value);
166
152
  return {
167
153
  x1: x,
168
154
  y1: yRange[0],
@@ -170,10 +156,9 @@ var MAP_POSITION_GRID = {
170
156
  y2: yRange[1]
171
157
  };
172
158
  },
173
- 1: function _2(_ref29, value) {
174
- var _ref30 = _slicedToArray(_ref29, 2), xScale = _ref30[0], yScale = _ref30[1];
175
- var xRange = xScale.range();
176
- var y = scaleOfBandwidth(yScale, value);
159
+ 1: ([xScale, yScale], value) => {
160
+ const xRange = xScale.range();
161
+ const y = scaleOfBandwidth(yScale, value);
177
162
  return {
178
163
  x1: xRange[0],
179
164
  y1: y,
@@ -182,37 +167,31 @@ var MAP_POSITION_GRID = {
182
167
  };
183
168
  }
184
169
  };
185
- var OFFSET_TITLE = 10;
186
- var MAP_POSITION_TITlE = {
187
- top: function top3(_ref31) {
188
- var _ref32 = _slicedToArray(_ref31, 1), xScale = _ref32[0];
189
- var xRange = xScale.range();
170
+ const OFFSET_TITLE = 10;
171
+ const MAP_POSITION_TITlE = {
172
+ top: ([xScale]) => {
173
+ const xRange = xScale.range();
190
174
  return {
191
175
  x: (xRange[1] + xRange[0]) / 2,
192
176
  y: OFFSET_TITLE
193
177
  };
194
178
  },
195
- bottom: function bottom3(_ref33, _ref34) {
196
- var _ref35 = _slicedToArray(_ref33, 1), xScale = _ref35[0];
197
- var _ref36 = _slicedToArray(_ref34, 2), height = _ref36[1];
198
- var xRange = xScale.range();
179
+ bottom: ([xScale], [, height]) => {
180
+ const xRange = xScale.range();
199
181
  return {
200
182
  x: (xRange[1] + xRange[0]) / 2,
201
183
  y: height - OFFSET_TITLE
202
184
  };
203
185
  },
204
- right: function right3(_ref37, _ref38) {
205
- var _ref39 = _slicedToArray(_ref37, 2), yScale = _ref39[1];
206
- var _ref40 = _slicedToArray(_ref38, 1), width = _ref40[0];
207
- var yRange = yScale.range();
186
+ right: ([, yScale], [width]) => {
187
+ const yRange = yScale.range();
208
188
  return {
209
189
  x: width - OFFSET_TITLE,
210
190
  y: (yRange[0] + yRange[1]) / 2
211
191
  };
212
192
  },
213
- left: function left3(_ref41) {
214
- var _ref42 = _slicedToArray(_ref41, 2), yScale = _ref42[1];
215
- var yRange = yScale.range();
193
+ left: ([, yScale]) => {
194
+ const yRange = yScale.range();
216
195
  return {
217
196
  x: OFFSET_TITLE,
218
197
  y: (yRange[0] + yRange[1]) / 2
@@ -227,15 +206,13 @@ function renderValue(value) {
227
206
  }
228
207
  function splitTextByWidth(root, text, maxWidth) {
229
208
  if (!text || !maxWidth || maxWidth <= 0) return [];
230
- var words = text.split(/\s+/).filter(function(word) {
231
- return word.length > 0;
232
- });
209
+ const words = text.split(/\s+/).filter((word) => word.length > 0);
233
210
  if (words.length === 0) return [];
234
- var lines = [];
235
- var currentLine = words[0];
236
- for (var i = 1; i < words.length; i++) {
237
- var testLine = "".concat(currentLine, " ").concat(words[i]).trim();
238
- var testWidth = measureTextWidth(root, testLine);
211
+ const lines = [];
212
+ let currentLine = words[0];
213
+ for (let i = 1; i < words.length; i++) {
214
+ const testLine = `${currentLine} ${words[i]}`.trim();
215
+ const testWidth = measureTextWidth(root, testLine);
239
216
  if (testWidth <= maxWidth) {
240
217
  currentLine = testLine;
241
218
  } else {
@@ -254,99 +231,111 @@ function splitTextByWidth(root, text, maxWidth) {
254
231
  }
255
232
  return lines;
256
233
  }
257
- function measureTextWidth(rootRef, text) {
258
- var fontSize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 12;
259
- var textEl = document.createElementNS("http://www.w3.org/2000/svg", "text");
234
+ function measureTextWidth(rootRef, text, fontSize = 12) {
235
+ const textEl = document.createElementNS("http://www.w3.org/2000/svg", "text");
260
236
  textEl.setAttribute("font-size", fontSize);
261
237
  textEl.setAttribute("visibility", "hidden");
262
238
  textEl.textContent = text;
263
239
  rootRef.appendChild(textEl);
264
- var width = textEl.getComputedTextLength();
240
+ const width = textEl.getComputedTextLength();
265
241
  rootRef.removeChild(textEl);
266
242
  return width;
267
243
  }
268
- var AxisRoot = /* @__PURE__ */ (function(_Component) {
269
- function AxisRoot2() {
270
- _classCallCheck(this, AxisRoot2);
271
- return _callSuper(this, AxisRoot2, arguments);
244
+ class AxisRoot extends Component {
245
+ get ticks() {
246
+ var _a, _b;
247
+ const {
248
+ ticks,
249
+ indexScale,
250
+ scale
251
+ } = this.asProps;
252
+ const scl = scale[indexScale];
253
+ return ticks || ((_a = scl.ticks) == null ? void 0 : _a.call(scl)) || ((_b = scl.domain) == null ? void 0 : _b.call(scl)) || [];
272
254
  }
273
- _inherits(AxisRoot2, _Component);
274
- return _createClass(AxisRoot2, [{
275
- key: "ticks",
276
- get: function get() {
277
- var _scl$ticks, _scl$domain;
278
- var _this$asProps = this.asProps, ticks = _this$asProps.ticks, indexScale = _this$asProps.indexScale, scale = _this$asProps.scale;
279
- var scl = scale[indexScale];
280
- return ticks || ((_scl$ticks = scl.ticks) === null || _scl$ticks === void 0 ? void 0 : _scl$ticks.call(scl)) || ((_scl$domain = scl.domain) === null || _scl$domain === void 0 ? void 0 : _scl$domain.call(scl)) || [];
281
- }
282
- }, {
283
- key: "getTitleProps",
284
- value: function getTitleProps() {
285
- var _this$asProps2 = this.asProps, position = _this$asProps2.position, locale = _this$asProps2.locale;
286
- return {
287
- position: MAP_POSITION_REVERT[position],
288
- verticalWritingMode: ["zh", "ja"].includes(locale)
289
- };
290
- }
291
- }, {
292
- key: "getTicksProps",
293
- value: function getTicksProps() {
294
- var _this$asProps3 = this.asProps, position = _this$asProps3.position, indexScale = _this$asProps3.indexScale;
295
- return {
296
- ticks: this.ticks,
297
- indexScale,
298
- position
299
- };
300
- }
301
- }, {
302
- key: "getGridProps",
303
- value: function getGridProps() {
304
- var indexScale = this.asProps.indexScale;
305
- return {
306
- ticks: this.ticks,
307
- indexScale
308
- };
309
- }
310
- }, {
311
- key: "render",
312
- value: function render() {
313
- var _ref, _MAP_POSITION_AXIS$po;
314
- var SAxis = this.Element;
315
- var _this$asProps4 = this.asProps, styles = _this$asProps4.styles, position = _this$asProps4.position, scale = _this$asProps4.scale, hide = _this$asProps4.hide, indexScale = _this$asProps4.indexScale;
316
- var pos = (_MAP_POSITION_AXIS$po = MAP_POSITION_AXIS[position]) !== null && _MAP_POSITION_AXIS$po !== void 0 ? _MAP_POSITION_AXIS$po : MAP_POSITION_AXIS[MAP_INDEX_SCALE_SYMBOL[indexScale]];
317
- return _ref = sstyled(styles), /* @__PURE__ */ React.createElement(SAxis, _ref.cn("SAxis", _objectSpread({
318
- "render": "line",
319
- "hide": hide
320
- }, pos(scale, position))));
321
- }
322
- }]);
323
- })(Component);
255
+ getTitleProps() {
256
+ const {
257
+ position,
258
+ locale
259
+ } = this.asProps;
260
+ return {
261
+ position: MAP_POSITION_REVERT[position],
262
+ verticalWritingMode: ["zh", "ja"].includes(locale)
263
+ };
264
+ }
265
+ getTicksProps() {
266
+ const {
267
+ position,
268
+ indexScale
269
+ } = this.asProps;
270
+ return {
271
+ ticks: this.ticks,
272
+ indexScale,
273
+ position
274
+ };
275
+ }
276
+ getGridProps() {
277
+ const {
278
+ indexScale
279
+ } = this.asProps;
280
+ return {
281
+ ticks: this.ticks,
282
+ indexScale
283
+ };
284
+ }
285
+ render() {
286
+ var _ref;
287
+ const SAxis = this.Element;
288
+ const {
289
+ styles,
290
+ position,
291
+ scale,
292
+ hide,
293
+ indexScale
294
+ } = this.asProps;
295
+ const pos = MAP_POSITION_AXIS[position] ?? MAP_POSITION_AXIS[MAP_INDEX_SCALE_SYMBOL[indexScale]];
296
+ return _ref = sstyled(styles), /* @__PURE__ */ React.createElement(SAxis, _ref.cn("SAxis", {
297
+ "render": "line",
298
+ "hide": hide,
299
+ ...pos(scale, position)
300
+ }));
301
+ }
302
+ }
324
303
  _defineProperty(AxisRoot, "displayName", "Axis");
325
304
  _defineProperty(AxisRoot, "style", style);
326
305
  _defineProperty(AxisRoot, "defaultProps", {});
327
306
  function Ticks(props) {
328
- var _scale$indexScale, _scale$indexScale$ban, _MAP_POSITION_TICK$po;
329
- var STick = props.Element, styles = props.styles, scale = props.scale, ticks = props.ticks, position = props.position, hide = props.hide, indexScale = props.indexScale, dataHintsHandler = props.dataHintsHandler, children = props.children, _props$childrenPositi = props.childrenPosition, childrenPosition = _props$childrenPositi === void 0 ? "inside" : _props$childrenPositi, rootRef = props.rootRef, multiline = props.multiline;
330
- var _useState = useState(null), _useState2 = _slicedToArray(_useState, 2), rootRefElement = _useState2[0], setRootRefElement = _useState2[1];
331
- useEffect(function() {
307
+ var _a, _b;
308
+ const {
309
+ Element: STick,
310
+ styles,
311
+ scale,
312
+ ticks,
313
+ position,
314
+ hide,
315
+ indexScale,
316
+ dataHintsHandler,
317
+ children,
318
+ childrenPosition = "inside",
319
+ rootRef,
320
+ multiline
321
+ } = props;
322
+ const [rootRefElement, setRootRefElement] = useState(null);
323
+ useEffect(() => {
332
324
  if (rootRef.current) setRootRefElement(rootRef.current);
333
325
  }, []);
334
- var tickBandwidth = (_scale$indexScale = scale[indexScale]) === null || _scale$indexScale === void 0 || (_scale$indexScale$ban = _scale$indexScale.bandwidth) === null || _scale$indexScale$ban === void 0 ? void 0 : _scale$indexScale$ban.call(_scale$indexScale);
335
- var ticksWithLines = ticks.map(function(tick) {
336
- return {
337
- tick,
338
- lines: typeof tick === "string" && multiline && rootRefElement ? splitTextByWidth(rootRefElement, tick, tickBandwidth) : []
339
- };
340
- });
341
- var pos = (_MAP_POSITION_TICK$po = MAP_POSITION_TICK[position]) !== null && _MAP_POSITION_TICK$po !== void 0 ? _MAP_POSITION_TICK$po : MAP_POSITION_TICK[MAP_INDEX_SCALE_SYMBOL[indexScale]];
342
- var positionClass = MAP_POSITION_TICK[position] ? position : "custom_".concat(indexScale);
326
+ const tickBandwidth = (_b = (_a = scale[indexScale]) == null ? void 0 : _a.bandwidth) == null ? void 0 : _b.call(_a);
327
+ const ticksWithLines = ticks.map((tick) => ({
328
+ tick,
329
+ lines: typeof tick === "string" && multiline && rootRefElement ? splitTextByWidth(rootRefElement, tick, tickBandwidth) : []
330
+ }));
331
+ const pos = MAP_POSITION_TICK[position] ?? MAP_POSITION_TICK[MAP_INDEX_SCALE_SYMBOL[indexScale]];
332
+ const positionClass = MAP_POSITION_TICK[position] ? position : `custom_${indexScale}`;
343
333
  if (typeof children === "function") {
344
- var labelGetter = function labelGetter2(value) {
345
- var _result$value;
346
- var result = children({
334
+ const labelGetter = (value) => {
335
+ const result = children({
347
336
  value
348
337
  });
349
- return (_result$value = result.value) !== null && _result$value !== void 0 ? _result$value : result.children;
338
+ return result.value ?? result.children;
350
339
  };
351
340
  if (position === "left" || position === "right") {
352
341
  dataHintsHandler.addKeyLabelGetter("vertical", labelGetter);
@@ -354,11 +343,13 @@ function Ticks(props) {
354
343
  dataHintsHandler.addKeyLabelGetter("horizontal", labelGetter);
355
344
  }
356
345
  }
357
- return ticksWithLines.map(function(_ref43, i) {
346
+ return ticksWithLines.map(({
347
+ tick: value,
348
+ lines
349
+ }, i) => {
358
350
  var _ref2;
359
- var value = _ref43.tick, lines = _ref43.lines;
360
- var displayValue = typeof children === "function" ? void 0 : renderValue(value);
361
- return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(STick, _ref2.cn("STick", _objectSpread({
351
+ const displayValue = typeof children === "function" ? void 0 : renderValue(value);
352
+ return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(STick, _ref2.cn("STick", {
362
353
  "aria-hidden": true,
363
354
  "key": i,
364
355
  "render": "text",
@@ -368,18 +359,24 @@ function Ticks(props) {
368
359
  "index": i,
369
360
  "position": positionClass,
370
361
  "hide": hide,
371
- "multiline": multiline
372
- }, pos(scale, value, position))), lines.length > 1 ? lines.map(function(line, lineIndex) {
373
- return /* @__PURE__ */ React.createElement("tspan", _extends({
374
- key: line
375
- }, pos(scale, value, position), {
376
- dy: lineIndex * 15
377
- }), line);
378
- }) : displayValue);
362
+ "multiline": multiline,
363
+ "primaryText": props.primaryText,
364
+ ...pos(scale, value, position)
365
+ }), lines.length > 1 ? lines.map((line, lineIndex) => /* @__PURE__ */ React.createElement("tspan", _extends({
366
+ key: line
367
+ }, pos(scale, value, position), {
368
+ dy: lineIndex * 15
369
+ }), line)) : displayValue);
379
370
  });
380
371
  }
381
372
  function Grid(props) {
382
- var SGrid = props.Element, styles = props.styles, scale = props.scale, ticks = props.ticks, indexScale = props.indexScale;
373
+ const {
374
+ Element: SGrid,
375
+ styles,
376
+ scale,
377
+ ticks,
378
+ indexScale
379
+ } = props;
383
380
  if (ticks.length >= 2) {
384
381
  if (indexScale === 1) {
385
382
  props.dataHintsHandler.setupGrid("vertical", Math.abs(ticks[1] - ticks[0]));
@@ -387,26 +384,38 @@ function Grid(props) {
387
384
  props.dataHintsHandler.setupGrid("horizontal", Math.abs(ticks[1] - ticks[0]));
388
385
  }
389
386
  }
390
- return ticks.map(function(value, i) {
387
+ return ticks.map((value, i) => {
391
388
  var _ref3;
392
- return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SGrid, _ref3.cn("SGrid", _objectSpread({
389
+ return _ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SGrid, _ref3.cn("SGrid", {
393
390
  "key": i,
394
- "render": "line"
395
- }, MAP_POSITION_GRID[indexScale](scale, value))));
391
+ "render": "line",
392
+ ...MAP_POSITION_GRID[indexScale](scale, value)
393
+ }));
396
394
  });
397
395
  }
398
396
  function Title(props) {
399
397
  var _ref4;
400
- var STitle = props.Element, styles = props.styles, scale = props.scale, position = props.position, size = props.size, children = props.children, verticalWritingMode = props.verticalWritingMode;
401
- var _MAP_POSITION_TITlE$p = MAP_POSITION_TITlE[position](scale, size), x = _MAP_POSITION_TITlE$p.x, y = _MAP_POSITION_TITlE$p.y;
398
+ const {
399
+ Element: STitle,
400
+ styles,
401
+ scale,
402
+ position,
403
+ size,
404
+ children,
405
+ verticalWritingMode
406
+ } = props;
407
+ const {
408
+ x,
409
+ y
410
+ } = MAP_POSITION_TITlE[position](scale, size);
402
411
  if (position === "left" || position === "right") {
403
412
  props.dataHintsHandler.setTitle("vertical", children);
404
413
  } else if (position === "top" || position === "bottom") {
405
414
  props.dataHintsHandler.setTitle("horizontal", children);
406
415
  }
407
- var sstyles = sstyled(styles);
408
- var sTitleStyles = sstyles.cn("STitle", {
409
- "transform-origin": "".concat(x.toFixed(2), "px ").concat(y.toFixed(2), "px")
416
+ const sstyles = sstyled(styles);
417
+ const sTitleStyles = sstyles.cn("STitle", {
418
+ "transform-origin": `${x.toFixed(2)}px ${y.toFixed(2)}px`
410
419
  });
411
420
  return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref4.cn("STitle", {
412
421
  "aria-hidden": true,
@@ -420,37 +429,27 @@ function Title(props) {
420
429
  "y": y
421
430
  }));
422
431
  }
423
- var XAxisRoot = /* @__PURE__ */ (function(_AxisRoot2) {
424
- function XAxisRoot2() {
425
- _classCallCheck(this, XAxisRoot2);
426
- return _callSuper(this, XAxisRoot2, arguments);
427
- }
428
- _inherits(XAxisRoot2, _AxisRoot2);
429
- return _createClass(XAxisRoot2);
430
- })(AxisRoot);
431
- _defineProperty(XAxisRoot, "defaultProps", _objectSpread(_objectSpread({}, AxisRoot.defaultProps), {}, {
432
+ class XAxisRoot extends AxisRoot {
433
+ }
434
+ _defineProperty(XAxisRoot, "defaultProps", {
435
+ ...AxisRoot.defaultProps,
432
436
  indexScale: 0,
433
437
  position: "bottom"
434
- }));
435
- var XAxis = createElement(XAxisRoot, {
438
+ });
439
+ const XAxis = createElement(XAxisRoot, {
436
440
  Ticks,
437
441
  Grid,
438
442
  Title
439
443
  });
440
- var YAxisRoot = /* @__PURE__ */ (function(_AxisRoot3) {
441
- function YAxisRoot2() {
442
- _classCallCheck(this, YAxisRoot2);
443
- return _callSuper(this, YAxisRoot2, arguments);
444
- }
445
- _inherits(YAxisRoot2, _AxisRoot3);
446
- return _createClass(YAxisRoot2);
447
- })(AxisRoot);
448
- _defineProperty(YAxisRoot, "defaultProps", _objectSpread(_objectSpread({}, AxisRoot.defaultProps), {}, {
444
+ class YAxisRoot extends AxisRoot {
445
+ }
446
+ _defineProperty(YAxisRoot, "defaultProps", {
447
+ ...AxisRoot.defaultProps,
449
448
  indexScale: 1,
450
449
  position: "left",
451
450
  hide: true
452
- }));
453
- var YAxis = createElement(YAxisRoot, {
451
+ });
452
+ const YAxis = createElement(YAxisRoot, {
454
453
  Ticks,
455
454
  Grid,
456
455
  Title