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