@semcore/d3-chart 16.0.0-prerelease.9 → 16.0.0

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 (214) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/lib/cjs/Area.js +4 -2
  3. package/lib/cjs/Area.js.map +1 -1
  4. package/lib/cjs/Axis.js +4 -2
  5. package/lib/cjs/Axis.js.map +1 -1
  6. package/lib/cjs/Bar.js +4 -2
  7. package/lib/cjs/Bar.js.map +1 -1
  8. package/lib/cjs/Bubble.js +4 -2
  9. package/lib/cjs/Bubble.js.map +1 -1
  10. package/lib/cjs/CompactHorizontalBar.js +4 -2
  11. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  12. package/lib/cjs/Donut.js +4 -2
  13. package/lib/cjs/Donut.js.map +1 -1
  14. package/lib/cjs/Dots.js +4 -2
  15. package/lib/cjs/Dots.js.map +1 -1
  16. package/lib/cjs/HorizontalBar.js +4 -2
  17. package/lib/cjs/HorizontalBar.js.map +1 -1
  18. package/lib/cjs/Hover.js +4 -2
  19. package/lib/cjs/Hover.js.map +1 -1
  20. package/lib/cjs/Line.js +4 -2
  21. package/lib/cjs/Line.js.map +1 -1
  22. package/lib/cjs/Plot.js +4 -2
  23. package/lib/cjs/Plot.js.map +1 -1
  24. package/lib/cjs/Radar.js +4 -2
  25. package/lib/cjs/Radar.js.map +1 -1
  26. package/lib/cjs/RadialTree.js +4 -2
  27. package/lib/cjs/RadialTree.js.map +1 -1
  28. package/lib/cjs/Reference.js +4 -2
  29. package/lib/cjs/Reference.js.map +1 -1
  30. package/lib/cjs/ScatterPlot.js +4 -2
  31. package/lib/cjs/ScatterPlot.js.map +1 -1
  32. package/lib/cjs/Tooltip.js +4 -2
  33. package/lib/cjs/Tooltip.js.map +1 -1
  34. package/lib/cjs/Venn.js +4 -2
  35. package/lib/cjs/Venn.js.map +1 -1
  36. package/lib/cjs/a11y/PlotA11yModule.js +4 -2
  37. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  38. package/lib/cjs/a11y/PlotA11yView.js +4 -2
  39. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  40. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -2
  41. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  42. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +4 -2
  43. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  44. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +4 -2
  45. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  46. package/lib/es6/Area.js +4 -2
  47. package/lib/es6/Area.js.map +1 -1
  48. package/lib/es6/Axis.js +4 -2
  49. package/lib/es6/Axis.js.map +1 -1
  50. package/lib/es6/Bar.js +4 -2
  51. package/lib/es6/Bar.js.map +1 -1
  52. package/lib/es6/Bubble.js +4 -2
  53. package/lib/es6/Bubble.js.map +1 -1
  54. package/lib/es6/CompactHorizontalBar.js +4 -2
  55. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  56. package/lib/es6/Donut.js +4 -2
  57. package/lib/es6/Donut.js.map +1 -1
  58. package/lib/es6/Dots.js +4 -2
  59. package/lib/es6/Dots.js.map +1 -1
  60. package/lib/es6/HorizontalBar.js +4 -2
  61. package/lib/es6/HorizontalBar.js.map +1 -1
  62. package/lib/es6/Hover.js +4 -2
  63. package/lib/es6/Hover.js.map +1 -1
  64. package/lib/es6/Line.js +4 -2
  65. package/lib/es6/Line.js.map +1 -1
  66. package/lib/es6/Plot.js +4 -2
  67. package/lib/es6/Plot.js.map +1 -1
  68. package/lib/es6/Radar.js +4 -2
  69. package/lib/es6/Radar.js.map +1 -1
  70. package/lib/es6/RadialTree.js +4 -2
  71. package/lib/es6/RadialTree.js.map +1 -1
  72. package/lib/es6/Reference.js +4 -2
  73. package/lib/es6/Reference.js.map +1 -1
  74. package/lib/es6/ScatterPlot.js +4 -2
  75. package/lib/es6/ScatterPlot.js.map +1 -1
  76. package/lib/es6/Tooltip.js +4 -2
  77. package/lib/es6/Tooltip.js.map +1 -1
  78. package/lib/es6/Venn.js +4 -2
  79. package/lib/es6/Venn.js.map +1 -1
  80. package/lib/es6/a11y/PlotA11yModule.js +4 -2
  81. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  82. package/lib/es6/a11y/PlotA11yView.js +4 -2
  83. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  84. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -2
  85. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  86. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +4 -2
  87. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  88. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +4 -2
  89. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  90. package/lib/esm/AnimatedClipPath.mjs +54 -0
  91. package/lib/esm/Area.mjs +188 -0
  92. package/lib/esm/Axis.mjs +405 -0
  93. package/lib/esm/Bar.mjs +200 -0
  94. package/lib/esm/Bubble.mjs +215 -0
  95. package/lib/esm/CompactHorizontalBar.mjs +517 -0
  96. package/lib/esm/Donut.mjs +414 -0
  97. package/lib/esm/Dots.mjs +119 -0
  98. package/lib/esm/GroupBar.mjs +94 -0
  99. package/lib/esm/HorizontalBar.mjs +180 -0
  100. package/lib/esm/Hover.mjs +216 -0
  101. package/lib/esm/Line.mjs +198 -0
  102. package/lib/esm/Pattern.mjs +520 -0
  103. package/lib/esm/Plot.mjs +136 -0
  104. package/lib/esm/Radar.mjs +705 -0
  105. package/lib/esm/RadialTree.mjs +564 -0
  106. package/lib/esm/Reference.mjs +242 -0
  107. package/lib/esm/ResponsiveContainer.mjs +99 -0
  108. package/lib/esm/ScatterPlot.mjs +193 -0
  109. package/lib/esm/StackBar.mjs +177 -0
  110. package/lib/esm/StackedArea.mjs +84 -0
  111. package/lib/esm/Tooltip.mjs +254 -0
  112. package/lib/esm/Venn.mjs +233 -0
  113. package/lib/esm/a11y/DataAccessibilityTable.mjs +100 -0
  114. package/lib/esm/a11y/PlotA11yModule.mjs +116 -0
  115. package/lib/esm/a11y/PlotA11yView.mjs +145 -0
  116. package/lib/esm/a11y/bezier.mjs +32 -0
  117. package/lib/esm/a11y/focus.mjs +44 -0
  118. package/lib/esm/a11y/hints.mjs +122 -0
  119. package/lib/esm/a11y/insights.mjs +700 -0
  120. package/lib/esm/a11y/intl.mjs +17 -0
  121. package/lib/esm/a11y/locale.mjs +39 -0
  122. package/lib/esm/a11y/serialize.mjs +363 -0
  123. package/lib/esm/a11y/summarize.mjs +14 -0
  124. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +33 -0
  125. package/lib/esm/a11y/translations/module/de.json.mjs +14 -0
  126. package/lib/esm/a11y/translations/module/en.json.mjs +14 -0
  127. package/lib/esm/a11y/translations/module/es.json.mjs +14 -0
  128. package/lib/esm/a11y/translations/module/fr.json.mjs +14 -0
  129. package/lib/esm/a11y/translations/module/it.json.mjs +14 -0
  130. package/lib/esm/a11y/translations/module/ja.json.mjs +14 -0
  131. package/lib/esm/a11y/translations/module/ko.json.mjs +14 -0
  132. package/lib/esm/a11y/translations/module/nl.json.mjs +14 -0
  133. package/lib/esm/a11y/translations/module/pl.json.mjs +14 -0
  134. package/lib/esm/a11y/translations/module/pt.json.mjs +14 -0
  135. package/lib/esm/a11y/translations/module/sv.json.mjs +14 -0
  136. package/lib/esm/a11y/translations/module/tr.json.mjs +14 -0
  137. package/lib/esm/a11y/translations/module/vi.json.mjs +14 -0
  138. package/lib/esm/a11y/translations/module/zh.json.mjs +14 -0
  139. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +33 -0
  140. package/lib/esm/a11y/translations/view/de.json.mjs +48 -0
  141. package/lib/esm/a11y/translations/view/en.json.mjs +48 -0
  142. package/lib/esm/a11y/translations/view/es.json.mjs +48 -0
  143. package/lib/esm/a11y/translations/view/fr.json.mjs +48 -0
  144. package/lib/esm/a11y/translations/view/it.json.mjs +48 -0
  145. package/lib/esm/a11y/translations/view/ja.json.mjs +48 -0
  146. package/lib/esm/a11y/translations/view/ko.json.mjs +48 -0
  147. package/lib/esm/a11y/translations/view/nl.json.mjs +48 -0
  148. package/lib/esm/a11y/translations/view/pl.json.mjs +48 -0
  149. package/lib/esm/a11y/translations/view/pt.json.mjs +48 -0
  150. package/lib/esm/a11y/translations/view/sv.json.mjs +48 -0
  151. package/lib/esm/a11y/translations/view/tr.json.mjs +48 -0
  152. package/lib/esm/a11y/translations/view/vi.json.mjs +48 -0
  153. package/lib/esm/a11y/translations/view/zh.json.mjs +48 -0
  154. package/lib/esm/color.mjs +127 -0
  155. package/lib/esm/component/Chart/AbstractChart.mjs +408 -0
  156. package/lib/esm/component/Chart/AreaChart.mjs +145 -0
  157. package/lib/esm/component/Chart/BarChart.mjs +240 -0
  158. package/lib/esm/component/Chart/BubbleChart.mjs +135 -0
  159. package/lib/esm/component/Chart/CigaretteChart.mjs +294 -0
  160. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +113 -0
  161. package/lib/esm/component/Chart/DonutChart.mjs +113 -0
  162. package/lib/esm/component/Chart/HistogramChart.mjs +166 -0
  163. package/lib/esm/component/Chart/LineChart.mjs +131 -0
  164. package/lib/esm/component/Chart/RadarChart.mjs +115 -0
  165. package/lib/esm/component/Chart/ScatterPlotChart.mjs +144 -0
  166. package/lib/esm/component/Chart/VennChart.mjs +141 -0
  167. package/lib/esm/component/Chart/index.mjs +27 -0
  168. package/lib/esm/component/ChartLegend/BaseLegend.mjs +91 -0
  169. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +85 -0
  170. package/lib/esm/component/ChartLegend/LegendFlex/legend-flex.shadow.css +12 -0
  171. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +239 -0
  172. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.type.mjs +4 -0
  173. package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +129 -0
  174. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +89 -0
  175. package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +19 -0
  176. package/lib/esm/component/ChartLegend/index.mjs +5 -0
  177. package/lib/esm/component/Cigarette/Cigarette.mjs +139 -0
  178. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +141 -0
  179. package/lib/esm/createElement.mjs +104 -0
  180. package/lib/esm/index.mjs +70 -0
  181. package/lib/esm/style/area.shadow.css +50 -0
  182. package/lib/esm/style/axis.shadow.css +88 -0
  183. package/lib/esm/style/bar.shadow.css +66 -0
  184. package/lib/esm/style/bubble.shadow.css +64 -0
  185. package/lib/esm/style/donut.shadow.css +36 -0
  186. package/lib/esm/style/dot.shadow.css +27 -0
  187. package/lib/esm/style/hover.shadow.css +9 -0
  188. package/lib/esm/style/line.shadow.css +43 -0
  189. package/lib/esm/style/plot.shadow.css +19 -0
  190. package/lib/esm/style/plotA11yModule.shadow.css +12 -0
  191. package/lib/esm/style/plotA11yView.shadow.css +39 -0
  192. package/lib/esm/style/radar.shadow.css +80 -0
  193. package/lib/esm/style/radial-tree.shadow.css +54 -0
  194. package/lib/esm/style/reference.shadow.css +43 -0
  195. package/lib/esm/style/scatterplot.shadow.css +41 -0
  196. package/lib/esm/style/tooltip.shadow.css +42 -0
  197. package/lib/esm/style/venn.shadow.css +48 -0
  198. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +31 -0
  199. package/lib/esm/translations/en.json.mjs +12 -0
  200. package/lib/esm/translations/es.json.mjs +11 -0
  201. package/lib/esm/translations/fr.json.mjs +11 -0
  202. package/lib/esm/translations/it.json.mjs +11 -0
  203. package/lib/esm/translations/ja.json.mjs +11 -0
  204. package/lib/esm/translations/ko.json.mjs +11 -0
  205. package/lib/esm/translations/nl.json.mjs +11 -0
  206. package/lib/esm/translations/pl.json.mjs +11 -0
  207. package/lib/esm/translations/pt.json.mjs +11 -0
  208. package/lib/esm/translations/sv.json.mjs +11 -0
  209. package/lib/esm/translations/tr.json.mjs +11 -0
  210. package/lib/esm/translations/vi.json.mjs +11 -0
  211. package/lib/esm/translations/zh.json.mjs +11 -0
  212. package/lib/esm/utils.mjs +266 -0
  213. package/package.json +9 -9
  214. package/vite.config.ts +2 -0
@@ -0,0 +1,564 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
6
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
7
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
8
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
9
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
10
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
11
+ import { sstyled, Component } from "@semcore/core";
12
+ import React from "react";
13
+ import { transition } from "d3-transition";
14
+ import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
15
+ import assignProps from "@semcore/core/lib/utils/assignProps";
16
+ import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
17
+ import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
18
+ import createElement from "./createElement.mjs";
19
+ import { measureText, getChartDefaultColorName } from "./utils.mjs";
20
+ import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
21
+ var _excluded = ["data"];
22
+ /*!__reshadow-styles__:"./style/radial-tree.shadow.css"*/
23
+ var style = (
24
+ /*__reshadow_css_start__*/
25
+ (sstyled.insert(
26
+ /*__inner_css_start__*/
27
+ ".___SRadian_j922l_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info, #008ff8)}.___SLine_j922l_gg_{stroke:var(--intergalactic-text-large-info, #008ff8)}.___SLine_j922l_gg_.__stroke_j922l_gg_{stroke:var(--stroke_j922l)}.___SLine_j922l_gg_.__transparent_j922l_gg_{opacity:.3}.___SCap_j922l_gg_{transition:r .1s}.___SCap_j922l_gg_.__pattern_j922l_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:1px}.___SCap_j922l_gg_.__transparent_j922l_gg_,.___SIcon_j922l_gg_.__transparent_j922l_gg_,.___SLabel_j922l_gg_.__transparent_j922l_gg_{opacity:.3}.___SLabel_j922l_gg_{fill:var(--color_j922l)}@media (hover:hover){.___SRadian_j922l_gg_:hover .___SLabel_j922l_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_j922l_gg_{transition:none}}",
28
+ /*__inner_css_end__*/
29
+ "j922l_gg_"
30
+ ), /*__reshadow_css_end__*/
31
+ {
32
+ "__SRadian": "___SRadian_j922l_gg_",
33
+ "__SLine": "___SLine_j922l_gg_",
34
+ "_stroke": "__stroke_j922l_gg_",
35
+ "--stroke": "--stroke_j922l",
36
+ "_transparent": "__transparent_j922l_gg_",
37
+ "__SCap": "___SCap_j922l_gg_",
38
+ "_pattern": "__pattern_j922l_gg_",
39
+ "__SIcon": "___SIcon_j922l_gg_",
40
+ "__SLabel": "___SLabel_j922l_gg_",
41
+ "--color": "--color_j922l",
42
+ "__SLineCap": "___SLineCap_j922l_gg_"
43
+ })
44
+ );
45
+ var baseAngle = -Math.PI / 2;
46
+ var RadialTreeBase = /* @__PURE__ */ function(_Component) {
47
+ _inherits(RadialTreeBase2, _Component);
48
+ var _super = _createSuper(RadialTreeBase2);
49
+ function RadialTreeBase2(props) {
50
+ var _this;
51
+ _classCallCheck(this, RadialTreeBase2);
52
+ _this = _super.call(this, props);
53
+ _defineProperty(_assertThisInitialized(_this), "Element", void 0);
54
+ _this.handleRadianClick = _this.handleRadianClick.bind(_assertThisInitialized(_this));
55
+ return _this;
56
+ }
57
+ _createClass(RadialTreeBase2, [{
58
+ key: "uncontrolledProps",
59
+ value: function uncontrolledProps() {
60
+ return {
61
+ activeKey: null
62
+ };
63
+ }
64
+ }, {
65
+ key: "runAppearAnimation",
66
+ value: function runAppearAnimation() {
67
+ var _window$matchMedia;
68
+ var _this$asProps = this.asProps, duration = _this$asProps.duration, uid = _this$asProps.uid;
69
+ if (!canUseDOM()) return;
70
+ var preferReduceMotion = (_window$matchMedia = window.matchMedia("(prefers-reduced-motion: reduce)")) === null || _window$matchMedia === void 0 ? void 0 : _window$matchMedia.matches;
71
+ if (!(duration > 0)) return;
72
+ if (preferReduceMotion) return;
73
+ var circlesAnimation = transition().selection().selectAll("[data-radial-animation=".concat(uid, "-cap-circle]")).interrupt();
74
+ var iconsAnimation = transition().selection().selectAll("[data-radial-animation=".concat(uid, "-cap-icon]")).interrupt();
75
+ var linesAnimation = transition().selection().selectAll("[data-radial-animation=".concat(uid, "-line]")).interrupt();
76
+ var labelsAnimation = transition().selection().selectAll("[data-radial-animation=".concat(uid, "-label]")).interrupt();
77
+ var circlesNodes = circlesAnimation.nodes();
78
+ var iconsNodes = iconsAnimation.nodes();
79
+ var linesNodes = linesAnimation.nodes();
80
+ var labelsNodes = linesAnimation.nodes();
81
+ if (circlesNodes.length > 0) {
82
+ var attrs = circlesNodes.map(function(node) {
83
+ var _lineNode$x, _lineNode$x$baseVal, _lineNode$y, _lineNode$y$baseVal;
84
+ var radianIndex = parseInt(node.dataset.radianIndex, 10);
85
+ var lineNode = linesNodes[radianIndex];
86
+ return {
87
+ from: {
88
+ cx: (_lineNode$x = lineNode.x1) === null || _lineNode$x === void 0 ? void 0 : (_lineNode$x$baseVal = _lineNode$x.baseVal) === null || _lineNode$x$baseVal === void 0 ? void 0 : _lineNode$x$baseVal.value,
89
+ cy: (_lineNode$y = lineNode.y1) === null || _lineNode$y === void 0 ? void 0 : (_lineNode$y$baseVal = _lineNode$y.baseVal) === null || _lineNode$y$baseVal === void 0 ? void 0 : _lineNode$y$baseVal.value
90
+ },
91
+ to: {
92
+ cx: node.dataset["cx"],
93
+ cy: node.dataset["cy"]
94
+ }
95
+ };
96
+ });
97
+ circlesAnimation.attr("opacity", 0).attr("cx", function(_, index) {
98
+ var _attrs$index$from;
99
+ return (_attrs$index$from = attrs[index].from) === null || _attrs$index$from === void 0 ? void 0 : _attrs$index$from.cx;
100
+ }).attr("cy", function(_, index) {
101
+ var _attrs$index$from2;
102
+ return (_attrs$index$from2 = attrs[index].from) === null || _attrs$index$from2 === void 0 ? void 0 : _attrs$index$from2.cy;
103
+ }).transition().duration(duration).attr("opacity", 1).attr("cx", function(_, index) {
104
+ var _attrs$index$to;
105
+ return (_attrs$index$to = attrs[index].to) === null || _attrs$index$to === void 0 ? void 0 : _attrs$index$to.cx;
106
+ }).attr("cy", function(_, index) {
107
+ var _attrs$index$to2;
108
+ return (_attrs$index$to2 = attrs[index].to) === null || _attrs$index$to2 === void 0 ? void 0 : _attrs$index$to2.cy;
109
+ });
110
+ }
111
+ if (iconsNodes.length > 0) {
112
+ var _attrs = iconsNodes.map(function(node) {
113
+ var _node$width, _node$width$baseVal, _node$height, _node$height$baseVal, _lineNode$x2, _lineNode$x2$baseVal, _lineNode$y2, _lineNode$y2$baseVal;
114
+ var width = (_node$width = node.width) === null || _node$width === void 0 ? void 0 : (_node$width$baseVal = _node$width.baseVal) === null || _node$width$baseVal === void 0 ? void 0 : _node$width$baseVal.value;
115
+ var height = (_node$height = node.height) === null || _node$height === void 0 ? void 0 : (_node$height$baseVal = _node$height.baseVal) === null || _node$height$baseVal === void 0 ? void 0 : _node$height$baseVal.value;
116
+ var radianIndex = parseInt(node.dataset.radianIndex, 10);
117
+ var lineNode = linesNodes[radianIndex];
118
+ return {
119
+ from: {
120
+ x: ((_lineNode$x2 = lineNode.x1) === null || _lineNode$x2 === void 0 ? void 0 : (_lineNode$x2$baseVal = _lineNode$x2.baseVal) === null || _lineNode$x2$baseVal === void 0 ? void 0 : _lineNode$x2$baseVal.value) - width / 2,
121
+ y: ((_lineNode$y2 = lineNode.y1) === null || _lineNode$y2 === void 0 ? void 0 : (_lineNode$y2$baseVal = _lineNode$y2.baseVal) === null || _lineNode$y2$baseVal === void 0 ? void 0 : _lineNode$y2$baseVal.value) - height / 2
122
+ },
123
+ to: {
124
+ x: node.dataset["x"],
125
+ y: node.dataset["y"]
126
+ }
127
+ };
128
+ });
129
+ iconsAnimation.attr("opacity", 0).attr("x", function(_, index) {
130
+ var _attrs$index$from3;
131
+ return (_attrs$index$from3 = _attrs[index].from) === null || _attrs$index$from3 === void 0 ? void 0 : _attrs$index$from3.x;
132
+ }).attr("y", function(_, index) {
133
+ var _attrs$index$from4;
134
+ return (_attrs$index$from4 = _attrs[index].from) === null || _attrs$index$from4 === void 0 ? void 0 : _attrs$index$from4.y;
135
+ }).transition().duration(duration).attr("opacity", 1).attr("x", function(_, index) {
136
+ var _attrs$index$to3;
137
+ return (_attrs$index$to3 = _attrs[index].to) === null || _attrs$index$to3 === void 0 ? void 0 : _attrs$index$to3.x;
138
+ }).attr("y", function(_, index) {
139
+ var _attrs$index$to4;
140
+ return (_attrs$index$to4 = _attrs[index].to) === null || _attrs$index$to4 === void 0 ? void 0 : _attrs$index$to4.y;
141
+ });
142
+ }
143
+ if (linesNodes.length > 0) {
144
+ var _attrs2 = linesNodes.map(function(node) {
145
+ var _node$x, _node$x$baseVal, _node$y, _node$y$baseVal;
146
+ return {
147
+ from: {
148
+ x2: (_node$x = node.x1) === null || _node$x === void 0 ? void 0 : (_node$x$baseVal = _node$x.baseVal) === null || _node$x$baseVal === void 0 ? void 0 : _node$x$baseVal.value,
149
+ y2: (_node$y = node.y1) === null || _node$y === void 0 ? void 0 : (_node$y$baseVal = _node$y.baseVal) === null || _node$y$baseVal === void 0 ? void 0 : _node$y$baseVal.value
150
+ },
151
+ to: {
152
+ x2: node.dataset["x2"],
153
+ y2: node.dataset["y2"]
154
+ }
155
+ };
156
+ });
157
+ linesAnimation.attr("opacity", 0).attr("x2", function(_, index) {
158
+ var _attrs2$index$from;
159
+ return (_attrs2$index$from = _attrs2[index].from) === null || _attrs2$index$from === void 0 ? void 0 : _attrs2$index$from.x2;
160
+ }).attr("y2", function(_, index) {
161
+ var _attrs2$index$from2;
162
+ return (_attrs2$index$from2 = _attrs2[index].from) === null || _attrs2$index$from2 === void 0 ? void 0 : _attrs2$index$from2.y2;
163
+ }).transition().duration(duration).attr("opacity", 1).attr("x2", function(_, index) {
164
+ var _attrs2$index$to;
165
+ return (_attrs2$index$to = _attrs2[index].to) === null || _attrs2$index$to === void 0 ? void 0 : _attrs2$index$to.x2;
166
+ }).attr("y2", function(_, index) {
167
+ var _attrs2$index$to2;
168
+ return (_attrs2$index$to2 = _attrs2[index].to) === null || _attrs2$index$to2 === void 0 ? void 0 : _attrs2$index$to2.y2;
169
+ });
170
+ }
171
+ if (labelsNodes.length > 0) {
172
+ labelsAnimation.attr("opacity", 0);
173
+ labelsAnimation.transition().duration(duration).attr("opacity", 1);
174
+ }
175
+ }
176
+ }, {
177
+ key: "componentDidUpdate",
178
+ value: function componentDidUpdate(prevProps) {
179
+ if (prevProps.$rootProps.data !== this.asProps.data) {
180
+ this.runAppearAnimation();
181
+ }
182
+ }
183
+ }, {
184
+ key: "componentDidMount",
185
+ value: function componentDidMount() {
186
+ this.runAppearAnimation();
187
+ }
188
+ }, {
189
+ key: "handleRadianClick",
190
+ value: function handleRadianClick(key) {
191
+ var _this2 = this;
192
+ return function(event) {
193
+ var newKey = key !== _this2.asProps.activeKey ? key : null;
194
+ _this2.handlers.activeKey(newKey, event);
195
+ };
196
+ }
197
+ }, {
198
+ key: "computeTextWidth",
199
+ value: function computeTextWidth() {
200
+ var _this$asProps2 = this.asProps, data = _this$asProps2.data, textSize = _this$asProps2.textSize;
201
+ var widths = data.map(function(_ref10) {
202
+ var label = _ref10.label;
203
+ return measureText(label, textSize);
204
+ });
205
+ return Math.max.apply(Math, _toConsumableArray(widths));
206
+ }
207
+ }, {
208
+ key: "getTitleProps",
209
+ value: function getTitleProps() {
210
+ var _this$asProps3 = this.asProps, uid = _this$asProps3.uid, size = _this$asProps3.size, textSize = _this$asProps3.textSize;
211
+ var _size = _slicedToArray(size, 2), width = _size[0], height = _size[1];
212
+ var center = [width / 2, height / 2];
213
+ var x = center[0], y = center[1];
214
+ return _defineProperty({
215
+ x,
216
+ y,
217
+ textSize: textSize * 1.5
218
+ }, "data-radial-animation", "".concat(uid, "-label"));
219
+ }
220
+ }, {
221
+ key: "getRadianProps",
222
+ value: function getRadianProps() {
223
+ var _this$asProps4 = this.asProps, data = _this$asProps4.data, restRootProps = _objectWithoutProperties(_this$asProps4, _excluded);
224
+ var textWidth = this.computeTextWidth();
225
+ return _objectSpread(_objectSpread({}, restRootProps), {}, {
226
+ radiansCount: data.length,
227
+ data,
228
+ textWidth,
229
+ onRadianClick: this.handleRadianClick
230
+ });
231
+ }
232
+ }, {
233
+ key: "render",
234
+ value: function render() {
235
+ var _ref;
236
+ var SRadialTree = this.Element;
237
+ var Children = this.asProps.Children;
238
+ this.asProps.dataHintsHandler.establishDataType("values-set");
239
+ return _ref = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SRadialTree, _ref.cn("SRadialTree", {
240
+ "render": "g"
241
+ }), /* @__PURE__ */ React.createElement(Children, _ref.cn("Children", {})));
242
+ }
243
+ }]);
244
+ return RadialTreeBase2;
245
+ }(Component);
246
+ _defineProperty(RadialTreeBase, "displayName", "RadialTree");
247
+ _defineProperty(RadialTreeBase, "style", style);
248
+ _defineProperty(RadialTreeBase, "enhance", [uniqueIDEnhancement()]);
249
+ _defineProperty(RadialTreeBase, "defaultProps", {
250
+ angleOffset: 0,
251
+ duration: 300,
252
+ centralMargin: 50,
253
+ labelMargin: 5,
254
+ iconColor: "#fff",
255
+ capSize: 8,
256
+ iconSize: 8,
257
+ textSize: 14,
258
+ defaultActiveKey: null
259
+ });
260
+ var RadialTreeRadian = /* @__PURE__ */ function(_Component2) {
261
+ _inherits(RadialTreeRadian2, _Component2);
262
+ var _super2 = _createSuper(RadialTreeRadian2);
263
+ function RadialTreeRadian2(props) {
264
+ var _this3;
265
+ _classCallCheck(this, RadialTreeRadian2);
266
+ _this3 = _super2.call(this, props);
267
+ _defineProperty(_assertThisInitialized(_this3), "Element", void 0);
268
+ _this3.renderRadian = _this3.renderRadian.bind(_assertThisInitialized(_this3));
269
+ return _this3;
270
+ }
271
+ _createClass(RadialTreeRadian2, [{
272
+ key: "getInteractiveAreaProps",
273
+ value: function getInteractiveAreaProps(_ref12, index) {
274
+ var _$rootProps$data;
275
+ var $rootProps = _ref12.$rootProps;
276
+ var data = (_$rootProps$data = $rootProps.data) === null || _$rootProps$data === void 0 ? void 0 : _$rootProps$data[index];
277
+ var _this$computeRadianPo = this.computeRadianPosition(data, index), xStart = _this$computeRadianPo.xStart, yStart = _this$computeRadianPo.yStart, xLabelCenter = _this$computeRadianPo.xLabelCenter, yLabelCenter = _this$computeRadianPo.yLabelCenter, capSize = _this$computeRadianPo.capSize;
278
+ return {
279
+ x1: xStart,
280
+ y1: yStart,
281
+ x2: xLabelCenter,
282
+ y2: yLabelCenter,
283
+ strokeWidth: capSize * 3
284
+ };
285
+ }
286
+ }, {
287
+ key: "getLineProps",
288
+ value: function getLineProps(_ref13, index) {
289
+ var _$rootProps$data2, _color, _ref14;
290
+ var $rootProps = _ref13.$rootProps;
291
+ var data = (_$rootProps$data2 = $rootProps.data) === null || _$rootProps$data2 === void 0 ? void 0 : _$rootProps$data2[index];
292
+ var _this$computeRadianPo2 = this.computeRadianPosition(data, index), xStart = _this$computeRadianPo2.xStart, yStart = _this$computeRadianPo2.yStart, xEnd = _this$computeRadianPo2.xEnd, yEnd = _this$computeRadianPo2.yEnd;
293
+ var _this$asProps5 = this.asProps, uid = _this$asProps5.uid, transparent = _this$asProps5.transparent, resolveColor = _this$asProps5.resolveColor;
294
+ var color = (_color = data.color) !== null && _color !== void 0 ? _color : this.asProps.color;
295
+ return _ref14 = {
296
+ x1: xStart,
297
+ y1: yStart,
298
+ x2: xEnd,
299
+ y2: yEnd,
300
+ stroke: color,
301
+ resolveColor,
302
+ transparent
303
+ }, _defineProperty(_ref14, "data-x1", xStart), _defineProperty(_ref14, "data-y1", yStart), _defineProperty(_ref14, "data-x2", xEnd), _defineProperty(_ref14, "data-y2", yEnd), _defineProperty(_ref14, "data-radial-animation", "".concat(uid, "-line")), _defineProperty(_ref14, "data-radian-index", index), _ref14;
304
+ }
305
+ }, {
306
+ key: "getCapProps",
307
+ value: function getCapProps(_ref15, index) {
308
+ var _$rootProps$data3, _color2, _ref16;
309
+ var $rootProps = _ref15.$rootProps;
310
+ var data = (_$rootProps$data3 = $rootProps.data) === null || _$rootProps$data3 === void 0 ? void 0 : _$rootProps$data3[index];
311
+ var _this$computeRadianPo3 = this.computeRadianPosition(data, index), xEnd = _this$computeRadianPo3.xEnd, yEnd = _this$computeRadianPo3.yEnd, capSize = _this$computeRadianPo3.capSize;
312
+ var _this$asProps6 = this.asProps, uid = _this$asProps6.uid, transparent = _this$asProps6.transparent, resolveColor = _this$asProps6.resolveColor, patterns = _this$asProps6.patterns;
313
+ var color = (_color2 = data.color) !== null && _color2 !== void 0 ? _color2 : this.asProps.color;
314
+ return _ref16 = {
315
+ x: xEnd,
316
+ y: yEnd
317
+ }, _defineProperty(_ref16, "data-cx", xEnd), _defineProperty(_ref16, "data-cy", yEnd), _defineProperty(_ref16, "radius", capSize), _defineProperty(_ref16, "color", color), _defineProperty(_ref16, "resolveColor", resolveColor), _defineProperty(_ref16, "transparent", transparent), _defineProperty(_ref16, "patterns", patterns), _defineProperty(_ref16, "uid", "".concat(uid, "-cap-").concat(index)), _defineProperty(_ref16, "data-radial-animation", "".concat(uid, "-cap-circle")), _defineProperty(_ref16, "data-radian-index", index), _ref16;
318
+ }
319
+ }, {
320
+ key: "getIconProps",
321
+ value: function getIconProps(_ref17, index) {
322
+ var _$rootProps$data4, _iconColor, _iconSize, _icon, _ref18;
323
+ var $rootProps = _ref17.$rootProps;
324
+ var data = (_$rootProps$data4 = $rootProps.data) === null || _$rootProps$data4 === void 0 ? void 0 : _$rootProps$data4[index];
325
+ var _this$computeRadianPo4 = this.computeRadianPosition(data, index), xEnd = _this$computeRadianPo4.xEnd, yEnd = _this$computeRadianPo4.yEnd, isActive = _this$computeRadianPo4.isActive;
326
+ var _this$asProps7 = this.asProps, uid = _this$asProps7.uid, resolveColor = _this$asProps7.resolveColor;
327
+ var iconColor = (_iconColor = data.iconColor) !== null && _iconColor !== void 0 ? _iconColor : this.asProps.iconColor;
328
+ var iconSize = (_iconSize = data.iconSize) !== null && _iconSize !== void 0 ? _iconSize : this.asProps.iconSize;
329
+ var icon = (_icon = data.icon) !== null && _icon !== void 0 ? _icon : this.asProps.icon;
330
+ var x = xEnd - iconSize / 2;
331
+ var y = yEnd - iconSize / 2;
332
+ return _ref18 = {
333
+ x,
334
+ y
335
+ }, _defineProperty(_ref18, "data-x", x), _defineProperty(_ref18, "data-y", y), _defineProperty(_ref18, "iconSize", iconSize), _defineProperty(_ref18, "color", iconColor !== null && iconColor !== void 0 ? iconColor : "#fff"), _defineProperty(_ref18, "resolveColor", resolveColor), _defineProperty(_ref18, "data-radial-animation", "".concat(uid, "-cap-icon")), _defineProperty(_ref18, "data-radian-index", index), _defineProperty(_ref18, "icon", icon), _defineProperty(_ref18, "tag", icon), _defineProperty(_ref18, "isActive", isActive), _ref18;
336
+ }
337
+ }, {
338
+ key: "getLabelProps",
339
+ value: function getLabelProps(_ref19, index) {
340
+ var _$rootProps$data5, _color3, _ref21;
341
+ var $rootProps = _ref19.$rootProps;
342
+ var data = (_$rootProps$data5 = $rootProps.data) === null || _$rootProps$data5 === void 0 ? void 0 : _$rootProps$data5[index];
343
+ var _this$computeRadianPo5 = this.computeRadianPosition(data, index), xLabelCenter = _this$computeRadianPo5.xLabelCenter, yLabelCenter = _this$computeRadianPo5.yLabelCenter, labelAngle = _this$computeRadianPo5.labelAngle, isHorizontal = _this$computeRadianPo5.isHorizontal;
344
+ var _this$asProps8 = this.asProps, uid = _this$asProps8.uid, textSize = _this$asProps8.textSize, transparent = _this$asProps8.transparent, resolveColor = _this$asProps8.resolveColor;
345
+ var _ref20 = data, label = _ref20.label;
346
+ var color = (_color3 = data.color) !== null && _color3 !== void 0 ? _color3 : this.asProps.color;
347
+ return _ref21 = {
348
+ x: xLabelCenter,
349
+ y: yLabelCenter,
350
+ angle: labelAngle
351
+ }, _defineProperty(_ref21, "data-radial-animation", "".concat(uid, "-label")), _defineProperty(_ref21, "data-radian-index", index), _defineProperty(_ref21, "label", label), _defineProperty(_ref21, "color", color), _defineProperty(_ref21, "resolveColor", resolveColor), _defineProperty(_ref21, "isHorizontal", isHorizontal), _defineProperty(_ref21, "textSize", textSize), _defineProperty(_ref21, "transparent", transparent), _ref21;
352
+ }
353
+ }, {
354
+ key: "getRadianKey",
355
+ value: function getRadianKey(data, index) {
356
+ var _data$key;
357
+ return (_data$key = data.key) !== null && _data$key !== void 0 ? _data$key : "radian-".concat(index);
358
+ }
359
+ }, {
360
+ key: "computeRadianPosition",
361
+ value: function computeRadianPosition(data, index) {
362
+ var _data$capSize;
363
+ var _this$asProps9 = this.asProps, centralMargin = _this$asProps9.centralMargin, labelMargin = _this$asProps9.labelMargin, angleOffset = _this$asProps9.angleOffset, activeKey = _this$asProps9.activeKey, size = _this$asProps9.size, radiansCount = _this$asProps9.radiansCount, textWidth = _this$asProps9.textWidth;
364
+ var _size2 = _slicedToArray(size, 2), width = _size2[0], height = _size2[1];
365
+ var key = this.getRadianKey(data, index);
366
+ var isActive = activeKey === key;
367
+ var baseCapSize = (_data$capSize = data.capSize) !== null && _data$capSize !== void 0 ? _data$capSize : this.asProps.capSize;
368
+ var capSize = baseCapSize * (isActive ? 1 : 0.5);
369
+ var minDemSize = Math.min(width, height) / 2;
370
+ var length = Math.max(minDemSize - textWidth - baseCapSize - centralMargin - labelMargin * 2, 10);
371
+ var angle = baseAngle + angleOffset + index / radiansCount * (Math.PI * 2);
372
+ var isHorizontal = angle - baseAngle > 1 / 6 * Math.PI && angle - baseAngle < 5 / 6 * Math.PI || angle - baseAngle > 7 / 6 * Math.PI && angle - baseAngle < 11 / 6 * Math.PI;
373
+ var topAngle = -Math.PI / 2;
374
+ var labelAngle = (angle - topAngle) % Math.PI + topAngle;
375
+ var center = [width / 2, height / 2];
376
+ var xCenter = center[0], yCenter = center[1];
377
+ var start = [xCenter + Math.cos(angle) * centralMargin, yCenter + Math.sin(angle) * centralMargin];
378
+ var end = [xCenter + Math.cos(angle) * (centralMargin + length), yCenter + Math.sin(angle) * (centralMargin + length)];
379
+ var xStart = start[0], yStart = start[1];
380
+ var xEnd = end[0], yEnd = end[1];
381
+ var labelCenter = [xCenter + Math.cos(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin), yCenter + Math.sin(angle) * (centralMargin + length + baseCapSize + textWidth / 2 + labelMargin)];
382
+ var xLabelCenter = labelCenter[0], yLabelCenter = labelCenter[1];
383
+ return {
384
+ xStart,
385
+ yStart,
386
+ xEnd,
387
+ yEnd,
388
+ xLabelCenter,
389
+ yLabelCenter,
390
+ labelAngle,
391
+ isHorizontal,
392
+ capSize,
393
+ isActive
394
+ };
395
+ }
396
+ }, {
397
+ key: "renderRadian",
398
+ value: function renderRadian(data, index) {
399
+ var _ref2;
400
+ var _this$asProps10 = this.asProps, styles = _this$asProps10.styles, Children = _this$asProps10.Children, onRadianClick = _this$asProps10.onRadianClick;
401
+ var key = this.getRadianKey(data, index);
402
+ var SRadian = "g";
403
+ var children = getOriginChildren(Children);
404
+ if (typeof children === "function") {
405
+ var _child = this.asProps.children;
406
+ var mergedProps = assignProps(children(this.asProps), this.asProps);
407
+ children = mergedProps.children;
408
+ mergedProps.children = _child;
409
+ }
410
+ this.asProps.dataHintsHandler.describeValueEntity("".concat(index, ".").concat(data.label), data.label);
411
+ var InteractiveArea3 = RadialTree.Radian.InteractiveArea;
412
+ return _ref2 = sstyled(styles), /* @__PURE__ */ React.createElement(SRadian, _ref2.cn("SRadian", {
413
+ "aria-hidden": true,
414
+ "key": key,
415
+ "onClick": onRadianClick(key)
416
+ }), /* @__PURE__ */ React.createElement(InteractiveArea3, _ref2.cn("InteractiveArea", {})), children);
417
+ }
418
+ }, {
419
+ key: "render",
420
+ value: function render() {
421
+ var _ref3, _this4 = this;
422
+ var data = this.asProps.data;
423
+ var SRadianList = "g";
424
+ return _ref3 = sstyled(this.asProps.styles), /* @__PURE__ */ React.createElement(SRadianList, _ref3.cn("SRadianList", {}), data.map(function(data2, index) {
425
+ return _this4.renderRadian(data2, index);
426
+ }));
427
+ }
428
+ }]);
429
+ return RadialTreeRadian2;
430
+ }(Component);
431
+ _defineProperty(RadialTreeRadian, "displayName", "RadialTreeRadian");
432
+ _defineProperty(RadialTreeRadian, "style", style);
433
+ _defineProperty(RadialTreeRadian, "defaultProps", {
434
+ centralMargin: 50,
435
+ labelMargin: 2,
436
+ iconColor: "#fff",
437
+ capSize: 16,
438
+ iconSize: 16,
439
+ textSize: 14
440
+ });
441
+ var InteractiveArea = function InteractiveArea2(_ref22) {
442
+ var _ref4;
443
+ var SInteractiveArea = _ref22.Element, styles = _ref22.styles;
444
+ return _ref4 = sstyled(styles), /* @__PURE__ */ React.createElement(SInteractiveArea, _ref4.cn("SInteractiveArea", {
445
+ "stroke": "transparent",
446
+ "render": "line"
447
+ }));
448
+ };
449
+ var Line = function Line2(_ref23) {
450
+ var _ref5;
451
+ var SLine = _ref23.Element, styles = _ref23.styles, stroke = _ref23.stroke, resolveColor = _ref23.resolveColor, transparent = _ref23.transparent;
452
+ return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SLine, _ref5.cn("SLine", {
453
+ "render": "line",
454
+ "stroke": resolveColor(stroke),
455
+ "transparent": transparent
456
+ }));
457
+ };
458
+ var Cap = function Cap2(_ref24) {
459
+ var _ref7;
460
+ var SCap = _ref24.Element, styles = _ref24.styles, _ref24$x = _ref24.x, x = _ref24$x === void 0 ? 0 : _ref24$x, _ref24$y = _ref24.y, y = _ref24$y === void 0 ? 0 : _ref24$y, radius = _ref24.radius, color = _ref24.color, resolveColor = _ref24.resolveColor, transparent = _ref24.transparent, patterns = _ref24.patterns;
461
+ if (!patterns) {
462
+ var _ref6;
463
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SCap, _ref6.cn("SCap", {
464
+ "render": "circle",
465
+ "cx": x,
466
+ "cy": y,
467
+ "r": radius,
468
+ "fill": resolveColor(color),
469
+ "transparent": transparent
470
+ }));
471
+ }
472
+ var patternKey = color || getChartDefaultColorName(0);
473
+ var _getPatternSymbolSize = getPatternSymbolSize({
474
+ patternKey,
475
+ patterns
476
+ }), _getPatternSymbolSize2 = _slicedToArray(_getPatternSymbolSize, 2), width = _getPatternSymbolSize2[0], height = _getPatternSymbolSize2[1];
477
+ return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SCap, _ref7.cn("SCap", {
478
+ "render": PatternSymbol,
479
+ "patternKey": color,
480
+ "x": x - (width || 0) / 2,
481
+ "y": y - (height || 0) / 2,
482
+ "fill": resolveColor(color),
483
+ "transparent": transparent,
484
+ "pattern": true
485
+ }));
486
+ };
487
+ var Icon = function Icon2(_ref25) {
488
+ var _ref8;
489
+ var SIcon = _ref25.Element, styles = _ref25.styles, isActive = _ref25.isActive, tag = _ref25.tag, x = _ref25.x, y = _ref25.y, iconSize = _ref25.iconSize, transparent = _ref25.transparent;
490
+ if (!(isActive && tag)) return null;
491
+ var width = iconSize;
492
+ var height = iconSize;
493
+ return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SIcon, _ref8.cn("SIcon", {
494
+ "x": x,
495
+ "y": y,
496
+ "width": width,
497
+ "height": height,
498
+ "render": tag,
499
+ "transparent": transparent
500
+ }));
501
+ };
502
+ var Label = function Label2(_ref26) {
503
+ var SLabel = _ref26.Element, Children = _ref26.Children, styles = _ref26.styles, label = _ref26.label, color = _ref26.color, resolveColor = _ref26.resolveColor, isHorizontal = _ref26.isHorizontal, x = _ref26.x, y = _ref26.y, textSize = _ref26.textSize, angle = _ref26.angle, transparent = _ref26.transparent;
504
+ var lines = String(label).split("\n");
505
+ var linesCount = lines.length;
506
+ var SLabelLine = "tspan";
507
+ var angleDegs = (angle / Math.PI * 180).toFixed(2);
508
+ var transformOrigin = [x.toFixed(2), y.toFixed(2)];
509
+ var transform = "rotate(".concat([angleDegs].concat(transformOrigin).join(", "), ")");
510
+ var sstyles = sstyled(styles);
511
+ var sLabelStyles = sstyles.cn("SLabel", {
512
+ color: resolveColor(color),
513
+ "text-cursor": isHorizontal ? "text" : "vertical-text",
514
+ transparent
515
+ });
516
+ return /* @__PURE__ */ React.createElement(SLabel, {
517
+ "aria-hidden": true,
518
+ render: "text",
519
+ textAnchor: "middle",
520
+ dominantBaseline: "central",
521
+ className: sLabelStyles.className,
522
+ style: sLabelStyles.style,
523
+ x: x.toFixed(2),
524
+ y: y.toFixed(2),
525
+ transform
526
+ }, lines.map(function(lineText, lineIndex) {
527
+ return /* @__PURE__ */ React.createElement(SLabelLine, {
528
+ x,
529
+ y: y + (lineIndex - (linesCount - 1) / 2) * textSize,
530
+ key: "#".concat(lineIndex, "-").concat(lineText)
531
+ }, lineText);
532
+ }), /* @__PURE__ */ React.createElement(Children, null));
533
+ };
534
+ var Radian = createElement(RadialTreeRadian, {
535
+ InteractiveArea,
536
+ Line,
537
+ Cap,
538
+ Icon,
539
+ Label
540
+ });
541
+ var Title = function Title2(_ref27) {
542
+ var _ref9;
543
+ var STitle = _ref27.Element, Children = _ref27.Children, children = _ref27.children, styles = _ref27.styles, textSize = _ref27.textSize, color = _ref27.color, resolveColor = _ref27.resolveColor, x = _ref27.x, y = _ref27.y, dataHintsHandler = _ref27.dataHintsHandler;
544
+ if (typeof children === "string") {
545
+ dataHintsHandler.setTitle("vertical", children);
546
+ }
547
+ return _ref9 = sstyled(styles), /* @__PURE__ */ React.createElement(STitle, _ref9.cn("STitle", {
548
+ "aria-hidden": true,
549
+ "render": "text",
550
+ "textAnchor": "middle",
551
+ "dominantBaseline": "central",
552
+ "fontSize": textSize,
553
+ "fill": resolveColor(color),
554
+ "x": x,
555
+ "y": y
556
+ }), /* @__PURE__ */ React.createElement(Children, _ref9.cn("Children", {})));
557
+ };
558
+ var RadialTree = createElement(RadialTreeBase, {
559
+ Title,
560
+ Radian
561
+ });
562
+ export {
563
+ RadialTree as default
564
+ };