@semcore/d3-chart 1.8.0 → 1.9.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.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/Axis.js +3 -5
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +3 -3
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +3 -24
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/ClipPath.js +2 -1
- package/lib/cjs/ClipPath.js.map +1 -1
- package/lib/cjs/Donut.js +1 -1
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +1 -1
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +8 -8
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +3 -3
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Plot.js +15 -1
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/RadialTree.js +691 -0
- package/lib/cjs/RadialTree.js.map +1 -0
- package/lib/cjs/ResponsiveContainer.js +1 -1
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/StackBar.js +8 -8
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +8 -8
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +3 -7
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +2 -2
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/createElement.js +3 -2
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/plot.shadow.css +6 -0
- package/lib/cjs/style/radial-tree.shadow.css +23 -0
- package/lib/cjs/types/Area.d.ts +47 -0
- package/lib/cjs/types/Axis.d.ts +64 -0
- package/lib/cjs/types/Bar.d.ts +48 -0
- package/lib/cjs/types/Bubble.d.ts +27 -0
- package/lib/cjs/types/ClipPath.d.ts +26 -0
- package/lib/cjs/types/Donut.d.ts +42 -0
- package/lib/cjs/types/GroupBar.d.ts +20 -0
- package/lib/cjs/types/HorizontalBar.d.ts +29 -0
- package/lib/cjs/types/Hover.d.ts +15 -0
- package/lib/cjs/types/Line.d.ts +50 -0
- package/lib/cjs/types/Plot.d.ts +16 -0
- package/lib/cjs/types/ResponsiveContainer.d.ts +20 -0
- package/lib/cjs/types/ScatterPlot.d.ts +27 -0
- package/lib/cjs/types/StackBar.d.ts +26 -0
- package/lib/cjs/types/StackedArea.d.ts +26 -0
- package/lib/cjs/types/Tooltip.d.ts +31 -0
- package/lib/cjs/types/Venn.d.ts +45 -0
- package/lib/cjs/types/context.d.ts +6 -0
- package/lib/cjs/types/index.d.ts +53 -0
- package/lib/cjs/utils.js +120 -55
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Axis.js +3 -5
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +3 -3
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +3 -24
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/ClipPath.js +2 -1
- package/lib/es6/ClipPath.js.map +1 -1
- package/lib/es6/Donut.js +1 -1
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +1 -1
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +8 -8
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +3 -3
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Plot.js +17 -1
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/RadialTree.js +679 -0
- package/lib/es6/RadialTree.js.map +1 -0
- package/lib/es6/ResponsiveContainer.js +1 -1
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/StackBar.js +8 -8
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +8 -8
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +3 -7
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +2 -2
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/createElement.js +3 -2
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/plot.shadow.css +6 -0
- package/lib/es6/style/radial-tree.shadow.css +23 -0
- package/lib/es6/types/Area.d.ts +47 -0
- package/lib/es6/types/Axis.d.ts +64 -0
- package/lib/es6/types/Bar.d.ts +48 -0
- package/lib/es6/types/Bubble.d.ts +27 -0
- package/lib/es6/types/ClipPath.d.ts +26 -0
- package/lib/es6/types/Donut.d.ts +42 -0
- package/lib/es6/types/GroupBar.d.ts +20 -0
- package/lib/es6/types/HorizontalBar.d.ts +29 -0
- package/lib/es6/types/Hover.d.ts +15 -0
- package/lib/es6/types/Line.d.ts +50 -0
- package/lib/es6/types/Plot.d.ts +16 -0
- package/lib/es6/types/ResponsiveContainer.d.ts +20 -0
- package/lib/es6/types/ScatterPlot.d.ts +27 -0
- package/lib/es6/types/StackBar.d.ts +26 -0
- package/lib/es6/types/StackedArea.d.ts +26 -0
- package/lib/es6/types/Tooltip.d.ts +31 -0
- package/lib/es6/types/Venn.d.ts +45 -0
- package/lib/es6/types/context.d.ts +6 -0
- package/lib/es6/types/index.d.ts +53 -0
- package/lib/es6/utils.js +95 -44
- package/lib/es6/utils.js.map +1 -1
- package/lib/types/RadialTree.d.ts +202 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/utils.d.ts +27 -0
- package/package.json +17 -10
- package/src/Bubble.jsx +1 -21
- package/src/ClipPath.jsx +1 -0
- package/src/Donut.jsx +7 -9
- package/src/Plot.jsx +2 -0
- package/src/RadialTree.tsx +768 -0
- package/src/createElement.jsx +3 -1
- package/src/index.js +1 -0
- package/src/style/plot.shadow.css +6 -0
- package/src/style/radial-tree.shadow.css +23 -0
- package/src/types/index.d.ts +6 -0
- package/src/utils.ts +227 -0
- package/src/utils.js +0 -147
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
+
|
|
16
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
+
|
|
18
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
19
|
+
|
|
20
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
21
|
+
|
|
22
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
23
|
+
|
|
24
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
25
|
+
|
|
26
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
27
|
+
|
|
28
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
29
|
+
|
|
30
|
+
var _core = require("@semcore/core");
|
|
31
|
+
|
|
32
|
+
var _react = _interopRequireDefault(require("react"));
|
|
33
|
+
|
|
34
|
+
var _createElement = _interopRequireDefault(require("./createElement"));
|
|
35
|
+
|
|
36
|
+
var _uniqueID = _interopRequireDefault(require("@semcore/utils/lib/uniqueID"));
|
|
37
|
+
|
|
38
|
+
var _d3Transition = require("d3-transition");
|
|
39
|
+
|
|
40
|
+
var _color = require("@semcore/utils/lib/color");
|
|
41
|
+
|
|
42
|
+
var _utils = require("./utils");
|
|
43
|
+
|
|
44
|
+
var _assignProps = _interopRequireDefault(require("@semcore/utils/lib/assignProps"));
|
|
45
|
+
|
|
46
|
+
var _getOriginChildren = _interopRequireDefault(require("@semcore/utils/lib/getOriginChildren"));
|
|
47
|
+
|
|
48
|
+
var _excluded = ["data"];
|
|
49
|
+
|
|
50
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51
|
+
|
|
52
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
53
|
+
|
|
54
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
55
|
+
|
|
56
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
57
|
+
|
|
58
|
+
/*__reshadow-styles__:"./style/radial-tree.shadow.css"*/
|
|
59
|
+
var style = (
|
|
60
|
+
/*__reshadow_css_start__*/
|
|
61
|
+
_core.sstyled.insert(
|
|
62
|
+
/*__inner_css_start__*/
|
|
63
|
+
".___SRadian_1rr18_gg_{cursor:pointer}.___SCap_1rr18_gg_{transition:r .1s}.___SLabel_1rr18_gg_{fill:var(--color_qzvs85);cursor:var(--text-cursor_qzvs85);transform-origin:var(--transform-origin_qzvs85)}.___SRadian_1rr18_gg_:hover .___SLabel_1rr18_gg_{fill:var(--color-hovered_qzvs85)}@media (prefers-reduced-motion){.___SLineCap_1rr18_gg_{transition:none}}"
|
|
64
|
+
/*__inner_css_end__*/
|
|
65
|
+
, "qzvs85_gg_")
|
|
66
|
+
/*__reshadow_css_end__*/
|
|
67
|
+
, {
|
|
68
|
+
"__SRadian": "___SRadian_1rr18_gg_",
|
|
69
|
+
"__SCap": "___SCap_1rr18_gg_",
|
|
70
|
+
"__SLabel": "___SLabel_1rr18_gg_",
|
|
71
|
+
"--color": "--color_qzvs85",
|
|
72
|
+
"--text-cursor": "--text-cursor_qzvs85",
|
|
73
|
+
"--transform-origin": "--transform-origin_qzvs85",
|
|
74
|
+
"--color-hovered": "--color-hovered_qzvs85",
|
|
75
|
+
"__SLineCap": "___SLineCap_1rr18_gg_"
|
|
76
|
+
});
|
|
77
|
+
var baseAngle = -Math.PI / 2; // The top vertical line
|
|
78
|
+
|
|
79
|
+
var RadialTreeBase = /*#__PURE__*/function (_Component) {
|
|
80
|
+
(0, _inherits2["default"])(RadialTreeBase, _Component);
|
|
81
|
+
|
|
82
|
+
var _super = _createSuper(RadialTreeBase);
|
|
83
|
+
|
|
84
|
+
function RadialTreeBase(props) {
|
|
85
|
+
var _this;
|
|
86
|
+
|
|
87
|
+
(0, _classCallCheck2["default"])(this, RadialTreeBase);
|
|
88
|
+
_this = _super.call(this, props);
|
|
89
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "Element", void 0);
|
|
90
|
+
_this.handleRadianClick = _this.handleRadianClick.bind((0, _assertThisInitialized2["default"])(_this));
|
|
91
|
+
return _this;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
(0, _createClass2["default"])(RadialTreeBase, [{
|
|
95
|
+
key: "uncontrolledProps",
|
|
96
|
+
value: function uncontrolledProps() {
|
|
97
|
+
return {
|
|
98
|
+
activeKey: null
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "runAppearAnimation",
|
|
103
|
+
value: function runAppearAnimation() {
|
|
104
|
+
var _this$asProps = this.asProps,
|
|
105
|
+
duration = _this$asProps.duration,
|
|
106
|
+
uid = _this$asProps.uid;
|
|
107
|
+
var preferReduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)')?.matches;
|
|
108
|
+
/** using `!(>)` instead of `<=` to get true on NaN and non numbers stuff */
|
|
109
|
+
|
|
110
|
+
if (!(duration > 0)) return;
|
|
111
|
+
if (preferReduceMotion) return;
|
|
112
|
+
var circlesAnimation = (0, _d3Transition.transition)().selection().selectAll("[data-radial-animation=".concat(uid, "-cap-circle]"));
|
|
113
|
+
var iconsAnimation = (0, _d3Transition.transition)().selection().selectAll("[data-radial-animation=".concat(uid, "-cap-icon]"));
|
|
114
|
+
var linesAnimation = (0, _d3Transition.transition)().selection().selectAll("[data-radial-animation=".concat(uid, "-line]"));
|
|
115
|
+
var labelsAnimation = (0, _d3Transition.transition)().selection().selectAll("[data-radial-animation=".concat(uid, "-label]"));
|
|
116
|
+
var circlesNodes = circlesAnimation.nodes();
|
|
117
|
+
var iconsNodes = iconsAnimation.nodes();
|
|
118
|
+
var linesNodes = linesAnimation.nodes();
|
|
119
|
+
var labelsNodes = linesAnimation.nodes();
|
|
120
|
+
|
|
121
|
+
if (circlesNodes.length > 0) {
|
|
122
|
+
var attrs = circlesNodes.map(function (node) {
|
|
123
|
+
var cx = node.cx?.baseVal?.value;
|
|
124
|
+
var cy = node.cy?.baseVal?.value;
|
|
125
|
+
var radianIndex = parseInt(node.dataset.radianIndex, 10);
|
|
126
|
+
var lineNode = linesNodes[radianIndex];
|
|
127
|
+
return {
|
|
128
|
+
from: {
|
|
129
|
+
cx: lineNode.x1?.baseVal?.value,
|
|
130
|
+
cy: lineNode.y1?.baseVal?.value
|
|
131
|
+
},
|
|
132
|
+
to: {
|
|
133
|
+
cx: cx,
|
|
134
|
+
cy: cy
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
circlesAnimation.attr('opacity', 0).attr('cx', function (_, index) {
|
|
139
|
+
return attrs[index].from?.cx;
|
|
140
|
+
}).attr('cy', function (_, index) {
|
|
141
|
+
return attrs[index].from?.cy;
|
|
142
|
+
});
|
|
143
|
+
circlesAnimation.transition().duration(duration).attr('opacity', 1).attr('cx', function (_, index) {
|
|
144
|
+
return attrs[index].to?.cx;
|
|
145
|
+
}).attr('cy', function (_, index) {
|
|
146
|
+
return attrs[index].to?.cy;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (iconsNodes.length > 0) {
|
|
151
|
+
var _attrs = iconsNodes.map(function (node) {
|
|
152
|
+
var x = node.x?.baseVal?.value;
|
|
153
|
+
var y = node.y?.baseVal?.value;
|
|
154
|
+
var width = node.width?.baseVal?.value;
|
|
155
|
+
var height = node.height?.baseVal?.value;
|
|
156
|
+
var radianIndex = parseInt(node.dataset.radianIndex, 10);
|
|
157
|
+
var lineNode = linesNodes[radianIndex];
|
|
158
|
+
return {
|
|
159
|
+
from: {
|
|
160
|
+
x: lineNode.x1?.baseVal?.value - width / 2,
|
|
161
|
+
y: lineNode.y1?.baseVal?.value - height / 2
|
|
162
|
+
},
|
|
163
|
+
to: {
|
|
164
|
+
x: x,
|
|
165
|
+
y: y
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
iconsAnimation.attr('opacity', 0).attr('x', function (_, index) {
|
|
171
|
+
return _attrs[index].from?.x;
|
|
172
|
+
}).attr('y', function (_, index) {
|
|
173
|
+
return _attrs[index].from?.y;
|
|
174
|
+
});
|
|
175
|
+
iconsAnimation.transition().duration(duration).attr('opacity', 1).attr('x', function (_, index) {
|
|
176
|
+
return _attrs[index].to?.x;
|
|
177
|
+
}).attr('y', function (_, index) {
|
|
178
|
+
return _attrs[index].to?.y;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (linesNodes.length > 0) {
|
|
183
|
+
var _attrs2 = linesNodes.map(function (node) {
|
|
184
|
+
var x2 = node.x2?.baseVal?.value;
|
|
185
|
+
var y2 = node.y2?.baseVal?.value;
|
|
186
|
+
return {
|
|
187
|
+
from: {
|
|
188
|
+
x2: node.x1?.baseVal?.value,
|
|
189
|
+
y2: node.y1?.baseVal?.value
|
|
190
|
+
},
|
|
191
|
+
to: {
|
|
192
|
+
x2: x2,
|
|
193
|
+
y2: y2
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
linesAnimation.attr('opacity', 0).attr('x2', function (_, index) {
|
|
199
|
+
return _attrs2[index].from?.x2;
|
|
200
|
+
}).attr('y2', function (_, index) {
|
|
201
|
+
return _attrs2[index].from?.y2;
|
|
202
|
+
});
|
|
203
|
+
linesAnimation.transition().duration(duration).attr('opacity', 1).attr('x2', function (_, index) {
|
|
204
|
+
return _attrs2[index].to?.x2;
|
|
205
|
+
}).attr('y2', function (_, index) {
|
|
206
|
+
return _attrs2[index].to?.y2;
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (labelsNodes.length > 0) {
|
|
211
|
+
labelsAnimation.attr('opacity', 0);
|
|
212
|
+
labelsAnimation.transition().duration(duration).attr('opacity', 1);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}, {
|
|
216
|
+
key: "componentDidUpdate",
|
|
217
|
+
value: function componentDidUpdate(prevProps) {
|
|
218
|
+
if (prevProps.$rootProps.data?.length !== this.asProps.data?.length) {
|
|
219
|
+
this.runAppearAnimation();
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "componentDidMount",
|
|
224
|
+
value: function componentDidMount() {
|
|
225
|
+
this.runAppearAnimation();
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "handleRadianClick",
|
|
229
|
+
value: function handleRadianClick(key) {
|
|
230
|
+
var _this2 = this;
|
|
231
|
+
|
|
232
|
+
return function (event) {
|
|
233
|
+
var newKey = key !== _this2.asProps.activeKey ? key : null;
|
|
234
|
+
|
|
235
|
+
_this2.handlers.activeKey(newKey, event);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}, {
|
|
239
|
+
key: "computeTextWidth",
|
|
240
|
+
value: function computeTextWidth() {
|
|
241
|
+
var _this$asProps2 = this.asProps,
|
|
242
|
+
data = _this$asProps2.data,
|
|
243
|
+
textSize = _this$asProps2.textSize;
|
|
244
|
+
var widths = data.map(function (_ref9) {
|
|
245
|
+
var label = _ref9.label;
|
|
246
|
+
return (0, _utils.measureText)(label, textSize);
|
|
247
|
+
});
|
|
248
|
+
return Math.max.apply(Math, (0, _toConsumableArray2["default"])(widths));
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
key: "getTitleProps",
|
|
252
|
+
value: function getTitleProps() {
|
|
253
|
+
var _this$asProps3 = this.asProps,
|
|
254
|
+
uid = _this$asProps3.uid,
|
|
255
|
+
size = _this$asProps3.size,
|
|
256
|
+
textSize = _this$asProps3.textSize;
|
|
257
|
+
|
|
258
|
+
var _size = (0, _slicedToArray2["default"])(size, 2),
|
|
259
|
+
width = _size[0],
|
|
260
|
+
height = _size[1];
|
|
261
|
+
|
|
262
|
+
var center = [width / 2, height / 2];
|
|
263
|
+
var x = center[0],
|
|
264
|
+
y = center[1];
|
|
265
|
+
return (0, _defineProperty2["default"])({
|
|
266
|
+
x: x,
|
|
267
|
+
y: y,
|
|
268
|
+
textSize: textSize * 1.5
|
|
269
|
+
}, 'data-radial-animation', "".concat(uid, "-label"));
|
|
270
|
+
}
|
|
271
|
+
}, {
|
|
272
|
+
key: "getRadianProps",
|
|
273
|
+
value: function getRadianProps() {
|
|
274
|
+
var _this$asProps4 = this.asProps,
|
|
275
|
+
data = _this$asProps4.data,
|
|
276
|
+
restRootProps = (0, _objectWithoutProperties2["default"])(_this$asProps4, _excluded);
|
|
277
|
+
var textWidth = this.computeTextWidth();
|
|
278
|
+
return _objectSpread(_objectSpread({}, restRootProps), {}, {
|
|
279
|
+
radiansCount: data.length,
|
|
280
|
+
data: data,
|
|
281
|
+
textWidth: textWidth,
|
|
282
|
+
onRadianClick: this.handleRadianClick
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}, {
|
|
286
|
+
key: "render",
|
|
287
|
+
value: function render() {
|
|
288
|
+
var _ref;
|
|
289
|
+
|
|
290
|
+
var SRadialTree = this.Element;
|
|
291
|
+
var Children = this.asProps.Children;
|
|
292
|
+
return _ref = (0, _core.sstyled)(this.asProps.styles), /*#__PURE__*/_react["default"].createElement(SRadialTree, _ref.cn("SRadialTree", {
|
|
293
|
+
"render": "g"
|
|
294
|
+
}), /*#__PURE__*/_react["default"].createElement(Children, _ref.cn("Children", {})));
|
|
295
|
+
}
|
|
296
|
+
}]);
|
|
297
|
+
return RadialTreeBase;
|
|
298
|
+
}(_core.Component);
|
|
299
|
+
|
|
300
|
+
(0, _defineProperty2["default"])(RadialTreeBase, "displayName", 'RadialTree');
|
|
301
|
+
(0, _defineProperty2["default"])(RadialTreeBase, "style", style);
|
|
302
|
+
(0, _defineProperty2["default"])(RadialTreeBase, "enhance", [(0, _uniqueID["default"])()]);
|
|
303
|
+
(0, _defineProperty2["default"])(RadialTreeBase, "defaultProps", {
|
|
304
|
+
angleOffset: 0,
|
|
305
|
+
duration: 300,
|
|
306
|
+
centralMargin: 50,
|
|
307
|
+
labelMargin: 2,
|
|
308
|
+
color: '#008FF8',
|
|
309
|
+
iconColor: '#fff',
|
|
310
|
+
capSize: 8,
|
|
311
|
+
iconSize: 8,
|
|
312
|
+
textSize: 14,
|
|
313
|
+
defaultActiveKey: null
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
var RadialTreeRadian = /*#__PURE__*/function (_Component2) {
|
|
317
|
+
(0, _inherits2["default"])(RadialTreeRadian, _Component2);
|
|
318
|
+
|
|
319
|
+
var _super2 = _createSuper(RadialTreeRadian);
|
|
320
|
+
|
|
321
|
+
function RadialTreeRadian(props) {
|
|
322
|
+
var _this3;
|
|
323
|
+
|
|
324
|
+
(0, _classCallCheck2["default"])(this, RadialTreeRadian);
|
|
325
|
+
_this3 = _super2.call(this, props);
|
|
326
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "Element", void 0);
|
|
327
|
+
_this3.renderRadian = _this3.renderRadian.bind((0, _assertThisInitialized2["default"])(_this3));
|
|
328
|
+
return _this3;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
(0, _createClass2["default"])(RadialTreeRadian, [{
|
|
332
|
+
key: "getInteractiveAreaProps",
|
|
333
|
+
value: function getInteractiveAreaProps(_ref11, index) {
|
|
334
|
+
var $rootProps = _ref11.$rootProps;
|
|
335
|
+
var data = $rootProps.data[index];
|
|
336
|
+
|
|
337
|
+
var _this$computeRadianPo = this.computeRadianPosition(data, index),
|
|
338
|
+
xStart = _this$computeRadianPo.xStart,
|
|
339
|
+
yStart = _this$computeRadianPo.yStart,
|
|
340
|
+
xLabelCenter = _this$computeRadianPo.xLabelCenter,
|
|
341
|
+
yLabelCenter = _this$computeRadianPo.yLabelCenter,
|
|
342
|
+
capSize = _this$computeRadianPo.capSize;
|
|
343
|
+
|
|
344
|
+
return {
|
|
345
|
+
x1: xStart,
|
|
346
|
+
y1: yStart,
|
|
347
|
+
x2: xLabelCenter,
|
|
348
|
+
y2: yLabelCenter,
|
|
349
|
+
strokeWidth: capSize * 3
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
}, {
|
|
353
|
+
key: "getLineProps",
|
|
354
|
+
value: function getLineProps(_ref12, index) {
|
|
355
|
+
var _ref13;
|
|
356
|
+
|
|
357
|
+
var $rootProps = _ref12.$rootProps;
|
|
358
|
+
var data = $rootProps.data[index];
|
|
359
|
+
|
|
360
|
+
var _this$computeRadianPo2 = this.computeRadianPosition(data, index),
|
|
361
|
+
xStart = _this$computeRadianPo2.xStart,
|
|
362
|
+
yStart = _this$computeRadianPo2.yStart,
|
|
363
|
+
xEnd = _this$computeRadianPo2.xEnd,
|
|
364
|
+
yEnd = _this$computeRadianPo2.yEnd;
|
|
365
|
+
|
|
366
|
+
var uid = this.asProps.uid;
|
|
367
|
+
var color = data.color ?? this.asProps.color;
|
|
368
|
+
return _ref13 = {
|
|
369
|
+
x1: xStart,
|
|
370
|
+
y1: yStart,
|
|
371
|
+
x2: xEnd,
|
|
372
|
+
y2: yEnd,
|
|
373
|
+
stroke: color
|
|
374
|
+
}, (0, _defineProperty2["default"])(_ref13, 'data-radial-animation', "".concat(uid, "-line")), (0, _defineProperty2["default"])(_ref13, 'data-radian-index', index), _ref13;
|
|
375
|
+
}
|
|
376
|
+
}, {
|
|
377
|
+
key: "getCapProps",
|
|
378
|
+
value: function getCapProps(_ref14, index) {
|
|
379
|
+
var _ref15;
|
|
380
|
+
|
|
381
|
+
var $rootProps = _ref14.$rootProps;
|
|
382
|
+
var data = $rootProps.data[index];
|
|
383
|
+
|
|
384
|
+
var _this$computeRadianPo3 = this.computeRadianPosition(data, index),
|
|
385
|
+
xEnd = _this$computeRadianPo3.xEnd,
|
|
386
|
+
yEnd = _this$computeRadianPo3.yEnd,
|
|
387
|
+
capSize = _this$computeRadianPo3.capSize;
|
|
388
|
+
|
|
389
|
+
var uid = this.asProps.uid;
|
|
390
|
+
var color = data.color ?? this.asProps.color;
|
|
391
|
+
return _ref15 = {
|
|
392
|
+
x: xEnd,
|
|
393
|
+
y: yEnd,
|
|
394
|
+
radius: capSize,
|
|
395
|
+
color: color
|
|
396
|
+
}, (0, _defineProperty2["default"])(_ref15, 'data-radial-animation', "".concat(uid, "-cap-circle")), (0, _defineProperty2["default"])(_ref15, 'data-radian-index', index), _ref15;
|
|
397
|
+
}
|
|
398
|
+
}, {
|
|
399
|
+
key: "getIconProps",
|
|
400
|
+
value: function getIconProps(_ref16, index) {
|
|
401
|
+
var _ref17;
|
|
402
|
+
|
|
403
|
+
var $rootProps = _ref16.$rootProps;
|
|
404
|
+
var data = $rootProps.data[index];
|
|
405
|
+
|
|
406
|
+
var _this$computeRadianPo4 = this.computeRadianPosition(data, index),
|
|
407
|
+
xEnd = _this$computeRadianPo4.xEnd,
|
|
408
|
+
yEnd = _this$computeRadianPo4.yEnd,
|
|
409
|
+
isActive = _this$computeRadianPo4.isActive;
|
|
410
|
+
|
|
411
|
+
var uid = this.asProps.uid;
|
|
412
|
+
var iconColor = data.iconColor ?? this.asProps.iconColor;
|
|
413
|
+
var iconSize = data.iconSize ?? this.asProps.iconSize;
|
|
414
|
+
var icon = data.icon ?? this.asProps.icon;
|
|
415
|
+
return _ref17 = {
|
|
416
|
+
x: xEnd - iconSize / 2,
|
|
417
|
+
y: yEnd - iconSize / 2,
|
|
418
|
+
iconSize: iconSize,
|
|
419
|
+
color: iconColor ?? '#fff'
|
|
420
|
+
}, (0, _defineProperty2["default"])(_ref17, 'data-radial-animation', "".concat(uid, "-cap-icon")), (0, _defineProperty2["default"])(_ref17, 'data-radian-index', index), (0, _defineProperty2["default"])(_ref17, "icon", icon), (0, _defineProperty2["default"])(_ref17, "isActive", isActive), _ref17;
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
key: "getLabelProps",
|
|
424
|
+
value: function getLabelProps(_ref18, index) {
|
|
425
|
+
var _ref19;
|
|
426
|
+
|
|
427
|
+
var $rootProps = _ref18.$rootProps;
|
|
428
|
+
var data = $rootProps.data[index];
|
|
429
|
+
|
|
430
|
+
var _this$computeRadianPo5 = this.computeRadianPosition(data, index),
|
|
431
|
+
xLabelCenter = _this$computeRadianPo5.xLabelCenter,
|
|
432
|
+
yLabelCenter = _this$computeRadianPo5.yLabelCenter,
|
|
433
|
+
labelAngle = _this$computeRadianPo5.labelAngle,
|
|
434
|
+
isHorizontal = _this$computeRadianPo5.isHorizontal;
|
|
435
|
+
|
|
436
|
+
var _this$asProps5 = this.asProps,
|
|
437
|
+
uid = _this$asProps5.uid,
|
|
438
|
+
textSize = _this$asProps5.textSize;
|
|
439
|
+
var label = data.label;
|
|
440
|
+
var color = data.color ?? this.asProps.color;
|
|
441
|
+
return _ref19 = {
|
|
442
|
+
x: xLabelCenter,
|
|
443
|
+
y: yLabelCenter,
|
|
444
|
+
angle: labelAngle
|
|
445
|
+
}, (0, _defineProperty2["default"])(_ref19, 'data-radial-animation', "".concat(uid, "-label")), (0, _defineProperty2["default"])(_ref19, 'data-radian-index', index), (0, _defineProperty2["default"])(_ref19, "label", label), (0, _defineProperty2["default"])(_ref19, "color", color), (0, _defineProperty2["default"])(_ref19, "isHorizontal", isHorizontal), (0, _defineProperty2["default"])(_ref19, "textSize", textSize), _ref19;
|
|
446
|
+
}
|
|
447
|
+
}, {
|
|
448
|
+
key: "getRadianKey",
|
|
449
|
+
value: function getRadianKey(data, index) {
|
|
450
|
+
return data.key ?? "radian-".concat(index);
|
|
451
|
+
}
|
|
452
|
+
}, {
|
|
453
|
+
key: "computeRadianPosition",
|
|
454
|
+
value: function computeRadianPosition(data, index) {
|
|
455
|
+
var _this$asProps6 = this.asProps,
|
|
456
|
+
centralMargin = _this$asProps6.centralMargin,
|
|
457
|
+
angleOffset = _this$asProps6.angleOffset,
|
|
458
|
+
activeKey = _this$asProps6.activeKey,
|
|
459
|
+
size = _this$asProps6.size,
|
|
460
|
+
radiansCount = _this$asProps6.radiansCount,
|
|
461
|
+
textWidth = _this$asProps6.textWidth;
|
|
462
|
+
|
|
463
|
+
var _size2 = (0, _slicedToArray2["default"])(size, 2),
|
|
464
|
+
width = _size2[0],
|
|
465
|
+
height = _size2[1];
|
|
466
|
+
|
|
467
|
+
var key = this.getRadianKey(data, index);
|
|
468
|
+
var isActive = activeKey === key;
|
|
469
|
+
var baseCapSize = data.capSize ?? this.asProps.capSize;
|
|
470
|
+
var capSize = baseCapSize * (isActive ? 1 : 0.5);
|
|
471
|
+
var minDemSize = Math.min(width, height) / 2;
|
|
472
|
+
var length = Math.max(minDemSize - textWidth - baseCapSize - centralMargin, 10);
|
|
473
|
+
var angle = baseAngle + angleOffset + index / radiansCount * (Math.PI * 2);
|
|
474
|
+
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;
|
|
475
|
+
var topAngle = -Math.PI / 2;
|
|
476
|
+
var labelAngle = (angle - topAngle) % Math.PI + topAngle;
|
|
477
|
+
var center = [width / 2, height / 2];
|
|
478
|
+
var xCenter = center[0],
|
|
479
|
+
yCenter = center[1];
|
|
480
|
+
var start = [xCenter + Math.cos(angle) * centralMargin, yCenter + Math.sin(angle) * centralMargin];
|
|
481
|
+
var end = [xCenter + Math.cos(angle) * (centralMargin + length), yCenter + Math.sin(angle) * (centralMargin + length)];
|
|
482
|
+
var xStart = start[0],
|
|
483
|
+
yStart = start[1];
|
|
484
|
+
var xEnd = end[0],
|
|
485
|
+
yEnd = end[1];
|
|
486
|
+
var labelCenter = [xCenter + Math.cos(angle) * (centralMargin + length + baseCapSize + textWidth / 2), yCenter + Math.sin(angle) * (centralMargin + length + baseCapSize + textWidth / 2)];
|
|
487
|
+
var xLabelCenter = labelCenter[0],
|
|
488
|
+
yLabelCenter = labelCenter[1];
|
|
489
|
+
return {
|
|
490
|
+
xStart: xStart,
|
|
491
|
+
yStart: yStart,
|
|
492
|
+
xEnd: xEnd,
|
|
493
|
+
yEnd: yEnd,
|
|
494
|
+
xLabelCenter: xLabelCenter,
|
|
495
|
+
yLabelCenter: yLabelCenter,
|
|
496
|
+
labelAngle: labelAngle,
|
|
497
|
+
isHorizontal: isHorizontal,
|
|
498
|
+
capSize: capSize,
|
|
499
|
+
isActive: isActive
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
}, {
|
|
503
|
+
key: "renderRadian",
|
|
504
|
+
value: function renderRadian(data, index) {
|
|
505
|
+
var _ref2;
|
|
506
|
+
|
|
507
|
+
var _this$asProps7 = this.asProps,
|
|
508
|
+
styles = _this$asProps7.styles,
|
|
509
|
+
Children = _this$asProps7.Children,
|
|
510
|
+
onRadianClick = _this$asProps7.onRadianClick;
|
|
511
|
+
var key = this.getRadianKey(data, index);
|
|
512
|
+
var SRadian = 'g';
|
|
513
|
+
var children = (0, _getOriginChildren["default"])(Children);
|
|
514
|
+
|
|
515
|
+
if (typeof children === 'function') {
|
|
516
|
+
var _child = this.asProps.children;
|
|
517
|
+
var mergedProps = (0, _assignProps["default"])(children(this.asProps), this.asProps);
|
|
518
|
+
children = mergedProps.children;
|
|
519
|
+
mergedProps.children = _child;
|
|
520
|
+
} // hidden from publicly typed export
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
var InteractiveArea = RadialTree.Radian.InteractiveArea;
|
|
524
|
+
return _ref2 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SRadian, _ref2.cn("SRadian", {
|
|
525
|
+
"key": key,
|
|
526
|
+
"onClick": onRadianClick(key)
|
|
527
|
+
}), /*#__PURE__*/_react["default"].createElement(InteractiveArea, _ref2.cn("InteractiveArea", {})), children);
|
|
528
|
+
}
|
|
529
|
+
}, {
|
|
530
|
+
key: "render",
|
|
531
|
+
value: function render() {
|
|
532
|
+
var _ref3,
|
|
533
|
+
_this4 = this;
|
|
534
|
+
|
|
535
|
+
var data = this.asProps.data;
|
|
536
|
+
var SRadianList = 'g';
|
|
537
|
+
return _ref3 = (0, _core.sstyled)(this.asProps.styles), /*#__PURE__*/_react["default"].createElement(SRadianList, _ref3.cn("SRadianList", {}), data.map(function (data, index) {
|
|
538
|
+
return _this4.renderRadian(data, index);
|
|
539
|
+
}));
|
|
540
|
+
}
|
|
541
|
+
}]);
|
|
542
|
+
return RadialTreeRadian;
|
|
543
|
+
}(_core.Component);
|
|
544
|
+
|
|
545
|
+
(0, _defineProperty2["default"])(RadialTreeRadian, "displayName", 'RadialTreeRadian');
|
|
546
|
+
(0, _defineProperty2["default"])(RadialTreeRadian, "style", style);
|
|
547
|
+
(0, _defineProperty2["default"])(RadialTreeRadian, "defaultProps", {
|
|
548
|
+
centralMargin: 50,
|
|
549
|
+
labelMargin: 2,
|
|
550
|
+
iconColor: '#fff',
|
|
551
|
+
capSize: 16,
|
|
552
|
+
iconSize: 16,
|
|
553
|
+
textSize: 14
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
var InteractiveArea = function InteractiveArea(_ref20) {
|
|
557
|
+
var _ref4;
|
|
558
|
+
|
|
559
|
+
var SInteractiveArea = _ref20.Element,
|
|
560
|
+
styles = _ref20.styles;
|
|
561
|
+
return _ref4 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SInteractiveArea, _ref4.cn("SInteractiveArea", {
|
|
562
|
+
"stroke": "transparent",
|
|
563
|
+
"render": "line"
|
|
564
|
+
}));
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
var Line = function Line(_ref21) {
|
|
568
|
+
var _ref5;
|
|
569
|
+
|
|
570
|
+
var SLine = _ref21.Element,
|
|
571
|
+
styles = _ref21.styles;
|
|
572
|
+
return _ref5 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SLine, _ref5.cn("SLine", {
|
|
573
|
+
"render": "line"
|
|
574
|
+
}));
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
var Cap = function Cap(_ref22) {
|
|
578
|
+
var _ref6;
|
|
579
|
+
|
|
580
|
+
var SCap = _ref22.Element,
|
|
581
|
+
styles = _ref22.styles,
|
|
582
|
+
x = _ref22.x,
|
|
583
|
+
y = _ref22.y,
|
|
584
|
+
radius = _ref22.radius,
|
|
585
|
+
color = _ref22.color;
|
|
586
|
+
return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SCap, _ref6.cn("SCap", {
|
|
587
|
+
"render": "circle",
|
|
588
|
+
"cx": x,
|
|
589
|
+
"cy": y,
|
|
590
|
+
"r": radius,
|
|
591
|
+
"fill": color
|
|
592
|
+
}));
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
var Icon = function Icon(_ref23) {
|
|
596
|
+
var _ref7;
|
|
597
|
+
|
|
598
|
+
var SIcon = _ref23.Element,
|
|
599
|
+
styles = _ref23.styles,
|
|
600
|
+
isActive = _ref23.isActive,
|
|
601
|
+
tag = _ref23.tag,
|
|
602
|
+
x = _ref23.x,
|
|
603
|
+
y = _ref23.y,
|
|
604
|
+
iconSize = _ref23.iconSize;
|
|
605
|
+
if (!(isActive && tag)) return null;
|
|
606
|
+
var width = iconSize;
|
|
607
|
+
var height = iconSize;
|
|
608
|
+
return _ref7 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SIcon, _ref7.cn("SIcon", {
|
|
609
|
+
"x": x,
|
|
610
|
+
"y": y,
|
|
611
|
+
"width": width,
|
|
612
|
+
"height": height,
|
|
613
|
+
"render": tag
|
|
614
|
+
}));
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
var Label = function Label(_ref24) {
|
|
618
|
+
var SLabel = _ref24.Element,
|
|
619
|
+
Children = _ref24.Children,
|
|
620
|
+
styles = _ref24.styles,
|
|
621
|
+
label = _ref24.label,
|
|
622
|
+
color = _ref24.color,
|
|
623
|
+
isHorizontal = _ref24.isHorizontal,
|
|
624
|
+
x = _ref24.x,
|
|
625
|
+
y = _ref24.y,
|
|
626
|
+
textSize = _ref24.textSize,
|
|
627
|
+
angle = _ref24.angle;
|
|
628
|
+
var lines = String(label).split('\n');
|
|
629
|
+
var linesCount = lines.length;
|
|
630
|
+
var SLabelLine = 'tspan';
|
|
631
|
+
var sstyles = (0, _core.sstyled)(styles);
|
|
632
|
+
var sLabelStyles = sstyles.cn('SLabel', {
|
|
633
|
+
color: color,
|
|
634
|
+
'color-hovered': (0, _color.shade)(color, -0.12),
|
|
635
|
+
'text-cursor': isHorizontal ? 'text' : 'vertical-text',
|
|
636
|
+
'transform-origin': "".concat(x.toFixed(2), "px ").concat(y.toFixed(2), "px")
|
|
637
|
+
});
|
|
638
|
+
return /*#__PURE__*/_react["default"].createElement(SLabel, {
|
|
639
|
+
render: "text",
|
|
640
|
+
textAnchor: "middle",
|
|
641
|
+
dominantBaseline: "central",
|
|
642
|
+
className: sLabelStyles.className,
|
|
643
|
+
style: sLabelStyles.style,
|
|
644
|
+
x: x.toFixed(2),
|
|
645
|
+
y: y.toFixed(2),
|
|
646
|
+
transform: "rotate(".concat((angle / Math.PI * 180).toFixed(2), ")")
|
|
647
|
+
}, lines.map(function (lineText, lineIndex) {
|
|
648
|
+
return /*#__PURE__*/_react["default"].createElement(SLabelLine, {
|
|
649
|
+
x: x,
|
|
650
|
+
y: y + (lineIndex - (linesCount - 1) / 2) * textSize,
|
|
651
|
+
key: "#".concat(lineIndex, "-").concat(lineText)
|
|
652
|
+
}, lineText);
|
|
653
|
+
}), /*#__PURE__*/_react["default"].createElement(Children, null));
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
var Radian = (0, _createElement["default"])(RadialTreeRadian, {
|
|
657
|
+
InteractiveArea: InteractiveArea,
|
|
658
|
+
Line: Line,
|
|
659
|
+
Cap: Cap,
|
|
660
|
+
Icon: Icon,
|
|
661
|
+
Label: Label
|
|
662
|
+
});
|
|
663
|
+
|
|
664
|
+
var Title = function Title(_ref25) {
|
|
665
|
+
var _ref8;
|
|
666
|
+
|
|
667
|
+
var STitle = _ref25.Element,
|
|
668
|
+
Children = _ref25.Children,
|
|
669
|
+
styles = _ref25.styles,
|
|
670
|
+
textSize = _ref25.textSize,
|
|
671
|
+
color = _ref25.color,
|
|
672
|
+
x = _ref25.x,
|
|
673
|
+
y = _ref25.y;
|
|
674
|
+
return _ref8 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(STitle, _ref8.cn("STitle", {
|
|
675
|
+
"render": "text",
|
|
676
|
+
"textAnchor": "middle",
|
|
677
|
+
"dominantBaseline": "central",
|
|
678
|
+
"fontSize": textSize,
|
|
679
|
+
"fill": color,
|
|
680
|
+
"x": x,
|
|
681
|
+
"y": y
|
|
682
|
+
}), /*#__PURE__*/_react["default"].createElement(Children, _ref8.cn("Children", {})));
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
var RadialTree = (0, _createElement["default"])(RadialTreeBase, {
|
|
686
|
+
Title: Title,
|
|
687
|
+
Radian: Radian
|
|
688
|
+
});
|
|
689
|
+
var _default = RadialTree;
|
|
690
|
+
exports["default"] = _default;
|
|
691
|
+
//# sourceMappingURL=RadialTree.js.map
|