@semcore/d3-chart 2.17.3 → 2.17.4
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 -2
- package/lib/cjs/Area.js +9 -9
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +8 -8
- package/lib/cjs/Bubble.js +10 -10
- package/lib/cjs/Donut.js +45 -43
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +9 -9
- package/lib/cjs/HorizontalBar.js +8 -8
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +8 -8
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +17 -17
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/ReferenceLine.js +9 -9
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/Tooltip.js +8 -8
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +3 -3
- package/lib/es6/Area.js +9 -9
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +8 -8
- package/lib/es6/Bubble.js +10 -10
- package/lib/es6/Donut.js +46 -44
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +9 -9
- package/lib/es6/HorizontalBar.js +8 -8
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +8 -8
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +17 -17
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/ReferenceLine.js +9 -9
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/Tooltip.js +8 -8
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +3 -3
- package/package.json +1 -1
package/lib/cjs/Radar.js
CHANGED
|
@@ -26,23 +26,23 @@ var _d3Shape = require("d3-shape");
|
|
|
26
26
|
var _createElement = _interopRequireDefault(require("./createElement"));
|
|
27
27
|
var _utils = require("./utils");
|
|
28
28
|
/*__reshadow-styles__:"./style/radar.shadow.css"*/
|
|
29
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
30
|
-
"__SAxis": "
|
|
31
|
-
"__SAxisLine": "
|
|
32
|
-
"__SAxisTick": "
|
|
33
|
-
"_active": "
|
|
34
|
-
"__SAxisLabel": "
|
|
35
|
-
"_xDirection": "
|
|
36
|
-
"--xDirection": "--
|
|
37
|
-
"_yDirection": "
|
|
38
|
-
"--yDirection": "--
|
|
39
|
-
"__SPolygon": "
|
|
40
|
-
"_color": "
|
|
41
|
-
"--color": "--
|
|
42
|
-
"__SPolygonDot": "
|
|
43
|
-
"_transparent": "
|
|
44
|
-
"__SPolygonLine": "
|
|
45
|
-
"__SPieRect": "
|
|
29
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SAxisLine_1r4dl_gg_,.___SAxisTick_1r4dl_gg_,.___SAxis_1r4dl_gg_{stroke:var(--intergalactic-chart-grid-line, #e0e1e9);stroke-width:1;fill:transparent}.___SAxisLine_1r4dl_gg_,.___SAxisTick_1r4dl_gg_{stroke-dasharray:2}.___SAxisLine_1r4dl_gg_.__active_1r4dl_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___SAxisLabel_1r4dl_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_1r4dl_gg_.__xDirection_1r4dl_gg_{text-anchor:var(--xDirection_1r4dl)}.___SAxisLabel_1r4dl_gg_.__yDirection_1r4dl_gg_{dominant-baseline:var(--yDirection_1r4dl)}.___SPolygonDot_1r4dl_gg_,.___SPolygon_1r4dl_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPolygon_1r4dl_gg_{opacity:.2}.___SPolygon_1r4dl_gg_.__color_1r4dl_gg_{fill:var(--color_1r4dl)}.___SPolygonDot_1r4dl_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #ffffff);r:6px}.___SPolygonDot_1r4dl_gg_.__transparent_1r4dl_gg_{opacity:.3}.___SPolygonDot_1r4dl_gg_.__color_1r4dl_gg_{fill:var(--color_1r4dl)}.___SPolygonLine_1r4dl_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SPolygonLine_1r4dl_gg_.__transparent_1r4dl_gg_{opacity:.3}.___SPolygonLine_1r4dl_gg_.__color_1r4dl_gg_{stroke:var(--color_1r4dl)}.___SPieRect_1r4dl_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}" /*__inner_css_end__*/, "1r4dl_gg_") /*__reshadow_css_end__*/, {
|
|
30
|
+
"__SAxis": "___SAxis_1r4dl_gg_",
|
|
31
|
+
"__SAxisLine": "___SAxisLine_1r4dl_gg_",
|
|
32
|
+
"__SAxisTick": "___SAxisTick_1r4dl_gg_",
|
|
33
|
+
"_active": "__active_1r4dl_gg_",
|
|
34
|
+
"__SAxisLabel": "___SAxisLabel_1r4dl_gg_",
|
|
35
|
+
"_xDirection": "__xDirection_1r4dl_gg_",
|
|
36
|
+
"--xDirection": "--xDirection_1r4dl",
|
|
37
|
+
"_yDirection": "__yDirection_1r4dl_gg_",
|
|
38
|
+
"--yDirection": "--yDirection_1r4dl",
|
|
39
|
+
"__SPolygon": "___SPolygon_1r4dl_gg_",
|
|
40
|
+
"_color": "__color_1r4dl_gg_",
|
|
41
|
+
"--color": "--color_1r4dl",
|
|
42
|
+
"__SPolygonDot": "___SPolygonDot_1r4dl_gg_",
|
|
43
|
+
"_transparent": "__transparent_1r4dl_gg_",
|
|
44
|
+
"__SPolygonLine": "___SPolygonLine_1r4dl_gg_",
|
|
45
|
+
"__SPieRect": "___SPieRect_1r4dl_gg_"
|
|
46
46
|
});
|
|
47
47
|
var clampAngle = function clampAngle(angle) {
|
|
48
48
|
angle = angle % (2 * Math.PI);
|
package/lib/cjs/RadialTree.js
CHANGED
|
@@ -27,18 +27,18 @@ var _createElement = _interopRequireDefault(require("./createElement"));
|
|
|
27
27
|
var _utils = require("./utils");
|
|
28
28
|
var _excluded = ["data"];
|
|
29
29
|
/*__reshadow-styles__:"./style/radial-tree.shadow.css"*/
|
|
30
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
31
|
-
"__SRadian": "
|
|
32
|
-
"__SLine": "
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_transparent": "
|
|
36
|
-
"__SCap": "
|
|
37
|
-
"__SIcon": "
|
|
38
|
-
"__SLabel": "
|
|
39
|
-
"--text-cursor": "--text-
|
|
40
|
-
"--color-hovered": "--color-
|
|
41
|
-
"__SLineCap": "
|
|
30
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SRadian_dmzt9_gg_{cursor:pointer;fill:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SLine_dmzt9_gg_{stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SLine_dmzt9_gg_.__color_dmzt9_gg_{stroke:var(--color_dmzt9)}.___SCap_dmzt9_gg_.__transparent_dmzt9_gg_,.___SIcon_dmzt9_gg_.__transparent_dmzt9_gg_,.___SLabel_dmzt9_gg_.__transparent_dmzt9_gg_,.___SLine_dmzt9_gg_.__transparent_dmzt9_gg_{opacity:.3}.___SCap_dmzt9_gg_{transition:r .1s}.___SLabel_dmzt9_gg_{fill:var(--color_dmzt9);cursor:var(--text-cursor_dmzt9)}@media (hover:hover){.___SRadian_dmzt9_gg_:hover .___SLabel_dmzt9_gg_{fill:var(--color-hovered_dmzt9)}}@media (prefers-reduced-motion){.___SLineCap_dmzt9_gg_{transition:none}}" /*__inner_css_end__*/, "dmzt9_gg_") /*__reshadow_css_end__*/, {
|
|
31
|
+
"__SRadian": "___SRadian_dmzt9_gg_",
|
|
32
|
+
"__SLine": "___SLine_dmzt9_gg_",
|
|
33
|
+
"_color": "__color_dmzt9_gg_",
|
|
34
|
+
"--color": "--color_dmzt9",
|
|
35
|
+
"_transparent": "__transparent_dmzt9_gg_",
|
|
36
|
+
"__SCap": "___SCap_dmzt9_gg_",
|
|
37
|
+
"__SIcon": "___SIcon_dmzt9_gg_",
|
|
38
|
+
"__SLabel": "___SLabel_dmzt9_gg_",
|
|
39
|
+
"--text-cursor": "--text-cursor_dmzt9",
|
|
40
|
+
"--color-hovered": "--color-hovered_dmzt9",
|
|
41
|
+
"__SLineCap": "___SLineCap_dmzt9_gg_"
|
|
42
42
|
});
|
|
43
43
|
var baseAngle = -Math.PI / 2; // The top vertical line
|
|
44
44
|
var RadialTreeBase = /*#__PURE__*/function (_Component) {
|
package/lib/cjs/ReferenceLine.js
CHANGED
|
@@ -17,15 +17,15 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
var _createElement = _interopRequireDefault(require("./createElement"));
|
|
18
18
|
var _utils = require("./utils");
|
|
19
19
|
/*__reshadow-styles__:"./style/reference-line.shadow.css"*/
|
|
20
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
21
|
-
"__SReferenceLine": "
|
|
22
|
-
"__STitle": "
|
|
23
|
-
"--transform-origin": "--transform-
|
|
24
|
-
"_position_top": "
|
|
25
|
-
"_position_bottom": "
|
|
26
|
-
"_position_right": "
|
|
27
|
-
"_position_left": "
|
|
28
|
-
"__SBackground": "
|
|
20
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SReferenceLine_iq9i1_gg_{fill:none;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___STitle_iq9i1_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79);transform-origin:var(--transform-origin_iq9i1)}.___STitle_iq9i1_gg_._position_top_iq9i1_gg_{text-anchor:middle}.___STitle_iq9i1_gg_._position_bottom_iq9i1_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_iq9i1_gg_._position_left_iq9i1_gg_,.___STitle_iq9i1_gg_._position_right_iq9i1_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___SBackground_iq9i1_gg_{fill:var(--intergalactic-chart-grid-period-bg, rgba(196, 199, 207, 0.2))}" /*__inner_css_end__*/, "iq9i1_gg_") /*__reshadow_css_end__*/, {
|
|
21
|
+
"__SReferenceLine": "___SReferenceLine_iq9i1_gg_",
|
|
22
|
+
"__STitle": "___STitle_iq9i1_gg_",
|
|
23
|
+
"--transform-origin": "--transform-origin_iq9i1",
|
|
24
|
+
"_position_top": "_position_top_iq9i1_gg_",
|
|
25
|
+
"_position_bottom": "_position_bottom_iq9i1_gg_",
|
|
26
|
+
"_position_right": "_position_right_iq9i1_gg_",
|
|
27
|
+
"_position_left": "_position_left_iq9i1_gg_",
|
|
28
|
+
"__SBackground": "___SBackground_iq9i1_gg_"
|
|
29
29
|
});
|
|
30
30
|
var side2direction = {
|
|
31
31
|
left: 'vertical',
|
package/lib/cjs/ScatterPlot.js
CHANGED
|
@@ -22,13 +22,13 @@ var _createElement = _interopRequireDefault(require("./createElement"));
|
|
|
22
22
|
var _utils = require("./utils");
|
|
23
23
|
var _ClipPath = _interopRequireDefault(require("./ClipPath"));
|
|
24
24
|
/*__reshadow-styles__:"./style/scatterplot.shadow.css"*/
|
|
25
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
26
|
-
"__SScatterPlot": "
|
|
27
|
-
"--duration": "--
|
|
28
|
-
"_color": "
|
|
29
|
-
"--color": "--
|
|
30
|
-
"_transparent": "
|
|
31
|
-
"__SValue": "
|
|
25
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SScatterPlot_zt8mj_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy;transition-duration:var(--duration_zt8mj);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_zt8mj_gg_:hover{opacity:.8}}.___SScatterPlot_zt8mj_gg_.__color_zt8mj_gg_{fill:var(--color_zt8mj)}.___SScatterPlot_zt8mj_gg_.__transparent_zt8mj_gg_{opacity:.3}.___SValue_zt8mj_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50, 10px);stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SValue_zt8mj_gg_.__color_zt8mj_gg_{stroke:var(--color_zt8mj)}.___SValue_zt8mj_gg_.__transparent_zt8mj_gg_{opacity:.3}" /*__inner_css_end__*/, "zt8mj_gg_") /*__reshadow_css_end__*/, {
|
|
26
|
+
"__SScatterPlot": "___SScatterPlot_zt8mj_gg_",
|
|
27
|
+
"--duration": "--duration_zt8mj",
|
|
28
|
+
"_color": "__color_zt8mj_gg_",
|
|
29
|
+
"--color": "--color_zt8mj",
|
|
30
|
+
"_transparent": "__transparent_zt8mj_gg_",
|
|
31
|
+
"__SValue": "___SValue_zt8mj_gg_"
|
|
32
32
|
});
|
|
33
33
|
var ScatterPlotRoot = /*#__PURE__*/function (_Component) {
|
|
34
34
|
(0, _inherits2["default"])(ScatterPlotRoot, _Component);
|
package/lib/cjs/Tooltip.js
CHANGED
|
@@ -24,14 +24,14 @@ var _createElement = _interopRequireDefault(require("./createElement"));
|
|
|
24
24
|
var _utils = require("./utils");
|
|
25
25
|
var _excluded = ["Children", "children", "tag"];
|
|
26
26
|
/*__reshadow-styles__:"./style/tooltip.shadow.css"*/
|
|
27
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
28
|
-
"__STooltip": "
|
|
29
|
-
"__STitle": "
|
|
30
|
-
"__SDotGroup": "
|
|
31
|
-
"__SDot": "
|
|
32
|
-
"_color": "
|
|
33
|
-
"--color": "--
|
|
34
|
-
"__SFooter": "
|
|
27
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___STooltip_1nscv_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-popper-rounded, 6px);border:1px solid var(--intergalactic-border-secondary, #e0e1e9);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));padding:var(--intergalactic-spacing-3x, 12px)}.___STitle_1nscv_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_1nscv_gg_{display:flex;align-items:center}.___SDot_1nscv_gg_{width:8px;height:8px;border-radius:50%;margin-right:var(--intergalactic-spacing-2x, 8px);background:var(--intergalactic-icon-secondary-info, #2bb3ff)}.___SDot_1nscv_gg_.__color_1nscv_gg_{background:var(--color_1nscv)}.___SFooter_1nscv_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9);padding:var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);border-radius:0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);margin:var(--intergalactic-spacing-3x, 12px) calc(-1*var(--intergalactic-spacing-3x, 12px)) calc(-1*var(--intergalactic-spacing-3x, 12px))}" /*__inner_css_end__*/, "1nscv_gg_") /*__reshadow_css_end__*/, {
|
|
28
|
+
"__STooltip": "___STooltip_1nscv_gg_",
|
|
29
|
+
"__STitle": "___STitle_1nscv_gg_",
|
|
30
|
+
"__SDotGroup": "___SDotGroup_1nscv_gg_",
|
|
31
|
+
"__SDot": "___SDot_1nscv_gg_",
|
|
32
|
+
"_color": "__color_1nscv_gg_",
|
|
33
|
+
"--color": "--color_1nscv",
|
|
34
|
+
"__SFooter": "___SFooter_1nscv_gg_"
|
|
35
35
|
});
|
|
36
36
|
var TooltipRoot = /*#__PURE__*/function (_Component) {
|
|
37
37
|
(0, _inherits2["default"])(TooltipRoot, _Component);
|
package/lib/cjs/Venn.js
CHANGED
|
@@ -21,13 +21,13 @@ var _animation = require("@semcore/animation");
|
|
|
21
21
|
var _createElement = _interopRequireDefault(require("./createElement"));
|
|
22
22
|
var _utils = require("./utils");
|
|
23
23
|
/*__reshadow-styles__:"./style/venn.shadow.css"*/
|
|
24
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
25
|
-
"__SCircle": "
|
|
26
|
-
"--duration": "--
|
|
27
|
-
"_color": "
|
|
28
|
-
"--color": "--
|
|
29
|
-
"_transparent": "
|
|
30
|
-
"__SIntersection": "
|
|
24
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SCircle_txd52_gg_,.___SIntersection_txd52_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_txd52_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_txd52);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_txd52_gg_:hover{fill-opacity:.7}}.___SCircle_txd52_gg_.__color_txd52_gg_{fill:var(--color_txd52)}.___SCircle_txd52_gg_.__transparent_txd52_gg_{opacity:.3}.___SIntersection_txd52_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_txd52_gg_:hover{fill-opacity:.1}}.___SIntersection_txd52_gg_.__transparent_txd52_gg_{opacity:.3}" /*__inner_css_end__*/, "txd52_gg_") /*__reshadow_css_end__*/, {
|
|
25
|
+
"__SCircle": "___SCircle_txd52_gg_",
|
|
26
|
+
"--duration": "--duration_txd52",
|
|
27
|
+
"_color": "__color_txd52_gg_",
|
|
28
|
+
"--color": "--color_txd52",
|
|
29
|
+
"_transparent": "__transparent_txd52_gg_",
|
|
30
|
+
"__SIntersection": "___SIntersection_txd52_gg_"
|
|
31
31
|
});
|
|
32
32
|
var VennRoot = /*#__PURE__*/function (_Component) {
|
|
33
33
|
(0, _inherits2["default"])(VennRoot, _Component);
|
|
@@ -16,8 +16,8 @@ var _intergalacticDynamicLocales = require("./translations/module/__intergalacti
|
|
|
16
16
|
var _WithI18n = require("@semcore/utils/lib/enhances/WithI18n");
|
|
17
17
|
var _flexBox = require("@semcore/flex-box");
|
|
18
18
|
/*__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
19
|
-
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
20
|
-
"__SPlotA11yModule": "
|
|
19
|
+
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_1vhl9_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1vhl9_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "1vhl9_gg_") /*__reshadow_css_end__*/, {
|
|
20
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1vhl9_gg_"
|
|
21
21
|
});
|
|
22
22
|
var globalWasFocused = false;
|
|
23
23
|
var globalNavWithKeyboard = false;
|
|
@@ -20,9 +20,9 @@ var _flexBox = require("@semcore/flex-box");
|
|
|
20
20
|
var _i18nEnhance = require("@semcore/utils/lib/enhances/i18nEnhance");
|
|
21
21
|
var _intergalacticDynamicLocales = require("./translations/view/__intergalactic-dynamic-locales");
|
|
22
22
|
/*__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
|
|
23
|
-
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".
|
|
24
|
-
"__SPlotA11yView": "
|
|
25
|
-
"_focus-within": "__focus-
|
|
23
|
+
var styles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SPlotA11yView_f5bxs_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_f5bxs_gg_.__focus-within_f5bxs_gg_,.___SPlotA11yView_f5bxs_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_f5bxs_gg_:focus,.___SPlotA11yView_f5bxs_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_f5bxs_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_f5bxs_gg_ table,.___SPlotA11yView_f5bxs_gg_ td,.___SPlotA11yView_f5bxs_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}" /*__inner_css_end__*/, "f5bxs_gg_") /*__reshadow_css_end__*/, {
|
|
24
|
+
"__SPlotA11yView": "___SPlotA11yView_f5bxs_gg_",
|
|
25
|
+
"_focus-within": "__focus-within_f5bxs_gg_"
|
|
26
26
|
});
|
|
27
27
|
var PlotA11yView = function PlotA11yView(_ref3) {
|
|
28
28
|
var _ref = arguments[0],
|
package/lib/es6/Area.js
CHANGED
|
@@ -15,15 +15,15 @@ import createElement from './createElement';
|
|
|
15
15
|
import { definedData, scaleOfBandwidth, getNullData, definedNullData } from './utils';
|
|
16
16
|
import ClipPath from './ClipPath';
|
|
17
17
|
/*__reshadow-styles__:"./style/area.shadow.css"*/
|
|
18
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
19
|
-
"__SArea": "
|
|
20
|
-
"_color": "
|
|
21
|
-
"--color": "--
|
|
22
|
-
"_transparent": "
|
|
23
|
-
"__SAreaLine": "
|
|
24
|
-
"--duration": "--
|
|
25
|
-
"__SNull": "
|
|
26
|
-
"_hide": "
|
|
18
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SArea_133ws_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);fill-opacity:.2}.___SArea_133ws_gg_.__color_133ws_gg_{fill:var(--color_133ws)}.___SArea_133ws_gg_.__transparent_133ws_gg_{opacity:.3}.___SAreaLine_133ws_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SAreaLine_133ws_gg_.__color_133ws_gg_{stroke:var(--color_133ws)}.___SAreaLine_133ws_gg_.__transparent_133ws_gg_{opacity:.3}.___SAreaLine_133ws_gg_,.___SArea_133ws_gg_{transition-property:d;transition-duration:var(--duration_133ws);transition-timing-function:ease-in-out}.___SNull_133ws_gg_{fill:transparent;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf);stroke-dasharray:4}.___SNull_133ws_gg_.__hide_133ws_gg_{display:none}" /*__inner_css_end__*/, "133ws_gg_") /*__reshadow_css_end__*/, {
|
|
19
|
+
"__SArea": "___SArea_133ws_gg_",
|
|
20
|
+
"_color": "__color_133ws_gg_",
|
|
21
|
+
"--color": "--color_133ws",
|
|
22
|
+
"_transparent": "__transparent_133ws_gg_",
|
|
23
|
+
"__SAreaLine": "___SAreaLine_133ws_gg_",
|
|
24
|
+
"--duration": "--duration_133ws",
|
|
25
|
+
"__SNull": "___SNull_133ws_gg_",
|
|
26
|
+
"_hide": "__hide_133ws_gg_"
|
|
27
27
|
});
|
|
28
28
|
var AreaRoot = /*#__PURE__*/function (_Component) {
|
|
29
29
|
_inherits(AreaRoot, _Component);
|
package/lib/es6/Axis.js
CHANGED
|
@@ -12,20 +12,20 @@ import { Component, sstyled } from '@semcore/core';
|
|
|
12
12
|
import createElement from './createElement';
|
|
13
13
|
import { scaleOfBandwidth } from './utils';
|
|
14
14
|
/*__reshadow-styles__:"./style/axis.shadow.css"*/
|
|
15
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
16
|
-
"__SAxis": "
|
|
17
|
-
"_hide": "
|
|
18
|
-
"__STick": "
|
|
19
|
-
"__SGrid": "
|
|
20
|
-
"__STitle": "
|
|
21
|
-
"--transform-origin": "--transform-
|
|
22
|
-
"_position_top": "
|
|
23
|
-
"_position_bottom": "
|
|
24
|
-
"_position_right": "
|
|
25
|
-
"_position_left": "
|
|
26
|
-
"_verticalWritingMode": "
|
|
27
|
-
"_position_custom_0": "
|
|
28
|
-
"_position_custom_1": "
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SAxis_1535t_gg_{stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SAxis_1535t_gg_.__hide_1535t_gg_,.___STick_1535t_gg_.__hide_1535t_gg_{display:none}.___STick_1535t_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79)}.___SGrid_1535t_gg_{fill:transparent;stroke:var(--intergalactic-border-secondary, #e0e1e9)}.___STitle_1535t_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-text-hint, #6c6e79);transform-origin:var(--transform-origin_1535t)}.___STitle_1535t_gg_._position_top_1535t_gg_{text-anchor:middle}.___STitle_1535t_gg_._position_bottom_1535t_gg_{text-anchor:middle;alignment-baseline:hanging}.___STitle_1535t_gg_._position_left_1535t_gg_,.___STitle_1535t_gg_._position_right_1535t_gg_{transform:rotate(-90deg);text-anchor:middle;alignment-baseline:middle}.___STitle_1535t_gg_._position_left_1535t_gg_.__verticalWritingMode_1535t_gg_,.___STitle_1535t_gg_._position_right_1535t_gg_.__verticalWritingMode_1535t_gg_{writing-mode:vertical-rl;transform:none}.___STick_1535t_gg_._position_top_1535t_gg_{transform:translateY(-12px);text-anchor:middle}.___STick_1535t_gg_._position_bottom_1535t_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_1535t_gg_._position_right_1535t_gg_{transform:translateX(16px);text-anchor:start;alignment-baseline:middle}.___STick_1535t_gg_._position_left_1535t_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}.___STick_1535t_gg_._position_custom_0_1535t_gg_{transform:translateY(12px);text-anchor:middle;alignment-baseline:hanging}.___STick_1535t_gg_._position_custom_1_1535t_gg_{transform:translateX(-16px);text-anchor:end;alignment-baseline:middle}" /*__inner_css_end__*/, "1535t_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SAxis": "___SAxis_1535t_gg_",
|
|
17
|
+
"_hide": "__hide_1535t_gg_",
|
|
18
|
+
"__STick": "___STick_1535t_gg_",
|
|
19
|
+
"__SGrid": "___SGrid_1535t_gg_",
|
|
20
|
+
"__STitle": "___STitle_1535t_gg_",
|
|
21
|
+
"--transform-origin": "--transform-origin_1535t",
|
|
22
|
+
"_position_top": "_position_top_1535t_gg_",
|
|
23
|
+
"_position_bottom": "_position_bottom_1535t_gg_",
|
|
24
|
+
"_position_right": "_position_right_1535t_gg_",
|
|
25
|
+
"_position_left": "_position_left_1535t_gg_",
|
|
26
|
+
"_verticalWritingMode": "__verticalWritingMode_1535t_gg_",
|
|
27
|
+
"_position_custom_0": "_position_custom_0_1535t_gg_",
|
|
28
|
+
"_position_custom_1": "_position_custom_1_1535t_gg_"
|
|
29
29
|
});
|
|
30
30
|
var CUSTOM_0 = Symbol('custom_0');
|
|
31
31
|
var CUSTOM_1 = Symbol('custom_1');
|
package/lib/es6/Bar.js
CHANGED
|
@@ -13,14 +13,14 @@ import createElement from './createElement';
|
|
|
13
13
|
import ClipPath from './ClipPath';
|
|
14
14
|
import { getBandwidth, roundedPath } from './utils';
|
|
15
15
|
/*__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
16
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
17
|
-
"__SBar": "
|
|
18
|
-
"--duration": "--
|
|
19
|
-
"_color": "
|
|
20
|
-
"--color": "--
|
|
21
|
-
"_hide": "
|
|
22
|
-
"_transparent": "
|
|
23
|
-
"__SBackground": "
|
|
16
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBar_1ecvr_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_1ecvr);transition-timing-function:ease-in-out}.___SBar_1ecvr_gg_.__color_1ecvr_gg_{fill:var(--color_1ecvr)}.___SBar_1ecvr_gg_.__hide_1ecvr_gg_{display:none}.___SBar_1ecvr_gg_.__transparent_1ecvr_gg_{opacity:.3}.___SBackground_1ecvr_gg_{fill:var(--intergalactic-chart-palette-order-other-data, #c4c7cf)}" /*__inner_css_end__*/, "1ecvr_gg_") /*__reshadow_css_end__*/, {
|
|
17
|
+
"__SBar": "___SBar_1ecvr_gg_",
|
|
18
|
+
"--duration": "--duration_1ecvr",
|
|
19
|
+
"_color": "__color_1ecvr_gg_",
|
|
20
|
+
"--color": "--color_1ecvr",
|
|
21
|
+
"_hide": "__hide_1ecvr_gg_",
|
|
22
|
+
"_transparent": "__transparent_1ecvr_gg_",
|
|
23
|
+
"__SBackground": "___SBackground_1ecvr_gg_"
|
|
24
24
|
});
|
|
25
25
|
export var MIN_HEIGHT = 2;
|
|
26
26
|
var calcPartBarY = function calcPartBarY(y, minHeight, height) {
|
package/lib/es6/Bubble.js
CHANGED
|
@@ -18,16 +18,16 @@ import createElement from './createElement';
|
|
|
18
18
|
import ClipPath from './ClipPath';
|
|
19
19
|
import { CONSTANT, measureText } from './utils';
|
|
20
20
|
/*__reshadow-styles__:"./style/bubble.shadow.css"*/
|
|
21
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
22
|
-
"__SBubble": "
|
|
23
|
-
"--duration": "--
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"__SCenter": "
|
|
28
|
-
"__SLabel": "
|
|
29
|
-
"_position_right": "
|
|
30
|
-
"_position_left": "
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBubble_1hemx_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px;transition-property:cx,cy;transition-duration:var(--duration_1hemx);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_1hemx_gg_:hover{opacity:.8}}.___SBubble_1hemx_gg_.__color_1hemx_gg_{fill:var(--color_1hemx)}.___SBubble_1hemx_gg_.__transparent_1hemx_gg_{opacity:.3}.___SCenter_1hemx_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SCenter_1hemx_gg_.__color_1hemx_gg_{stroke:var(--color_1hemx)}.___SCenter_1hemx_gg_.__transparent_1hemx_gg_{opacity:.3}.___SLabel_1hemx_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLabel_1hemx_gg_._position_right_1hemx_gg_{text-anchor:end}.___SLabel_1hemx_gg_._position_left_1hemx_gg_{text-anchor:start}.___SLabel_1hemx_gg_.__color_1hemx_gg_{fill:var(--color_1hemx)}.___SLabel_1hemx_gg_.__transparent_1hemx_gg_{opacity:.3}" /*__inner_css_end__*/, "1hemx_gg_") /*__reshadow_css_end__*/, {
|
|
22
|
+
"__SBubble": "___SBubble_1hemx_gg_",
|
|
23
|
+
"--duration": "--duration_1hemx",
|
|
24
|
+
"_color": "__color_1hemx_gg_",
|
|
25
|
+
"--color": "--color_1hemx",
|
|
26
|
+
"_transparent": "__transparent_1hemx_gg_",
|
|
27
|
+
"__SCenter": "___SCenter_1hemx_gg_",
|
|
28
|
+
"__SLabel": "___SLabel_1hemx_gg_",
|
|
29
|
+
"_position_right": "_position_right_1hemx_gg_",
|
|
30
|
+
"_position_left": "_position_left_1hemx_gg_"
|
|
31
31
|
});
|
|
32
32
|
var BubbleRoot = /*#__PURE__*/function (_Component) {
|
|
33
33
|
_inherits(BubbleRoot, _Component);
|
package/lib/es6/Donut.js
CHANGED
|
@@ -8,7 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
9
9
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
10
10
|
var _excluded = ["Element", "styles", "d3Arc", "data", "color", "$animationActivePie", "active", "d3ArcOut", "name", "dataKey", "dataHintsHandler", "transparent"];
|
|
11
|
-
import React, { useEffect, useState } from 'react';
|
|
11
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
12
12
|
import { arc, pie } from 'd3-shape';
|
|
13
13
|
import { interpolate } from 'd3-interpolate';
|
|
14
14
|
import { transition } from 'd3-transition';
|
|
@@ -19,13 +19,13 @@ import uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';
|
|
|
19
19
|
import createElement from './createElement';
|
|
20
20
|
import { CONSTANT } from './utils';
|
|
21
21
|
/*__reshadow-styles__:"./style/donut.shadow.css"*/
|
|
22
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
23
|
-
"__SPie": "
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"__SEmptyData": "
|
|
28
|
-
"__SLabel": "
|
|
22
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPie_1b4fv_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPie_1b4fv_gg_.__color_1b4fv_gg_{fill:var(--color_1b4fv)}.___SPie_1b4fv_gg_.__transparent_1b4fv_gg_{opacity:.3}.___SEmptyData_1b4fv_gg_{fill:var(--intergalactic-chart-palette-order-null, #e0e1e9)}.___SEmptyData_1b4fv_gg_.__color_1b4fv_gg_{fill:var(--color_1b4fv)}.___SLabel_1b4fv_gg_{text-anchor:middle;vertical-anchor:middle}" /*__inner_css_end__*/, "1b4fv_gg_") /*__reshadow_css_end__*/, {
|
|
23
|
+
"__SPie": "___SPie_1b4fv_gg_",
|
|
24
|
+
"_color": "__color_1b4fv_gg_",
|
|
25
|
+
"--color": "--color_1b4fv",
|
|
26
|
+
"_transparent": "__transparent_1b4fv_gg_",
|
|
27
|
+
"__SEmptyData": "___SEmptyData_1b4fv_gg_",
|
|
28
|
+
"__SLabel": "___SLabel_1b4fv_gg_"
|
|
29
29
|
});
|
|
30
30
|
var DEFAULT_INSTANCE = Symbol('DEFAULT_INSTANCE');
|
|
31
31
|
function transitionAnglePie(_ref4) {
|
|
@@ -62,16 +62,19 @@ function transitionAnglePie(_ref4) {
|
|
|
62
62
|
function transitionRadiusPie(_ref5) {
|
|
63
63
|
var data = _ref5.data,
|
|
64
64
|
selector = _ref5.selector,
|
|
65
|
+
element = _ref5.element,
|
|
65
66
|
duration = _ref5.duration,
|
|
66
67
|
innerRadius = _ref5.innerRadius,
|
|
67
|
-
|
|
68
|
+
outerRadiusStartEnd = _ref5.outerRadiusStartEnd;
|
|
68
69
|
return transition().selection().select(selector).interrupt().transition().duration(duration).attrTween('d', function () {
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var iOuterRadius = interpolate(
|
|
70
|
+
var _outerRadiusStartEnd = _slicedToArray(outerRadiusStartEnd, 2),
|
|
71
|
+
start = _outerRadiusStartEnd[0],
|
|
72
|
+
end = _outerRadiusStartEnd[1];
|
|
73
|
+
var iOuterRadius = interpolate(start, end);
|
|
73
74
|
return function (t) {
|
|
74
|
-
var
|
|
75
|
+
var outerRadiusPX = iOuterRadius(t);
|
|
76
|
+
element.dataset['currentRadius'] = outerRadiusPX;
|
|
77
|
+
var d3ArcOut = arc().innerRadius(innerRadius).outerRadius(outerRadiusPX);
|
|
75
78
|
return d3ArcOut(data);
|
|
76
79
|
};
|
|
77
80
|
});
|
|
@@ -79,13 +82,12 @@ function transitionRadiusPie(_ref5) {
|
|
|
79
82
|
var increaseFactor = 8;
|
|
80
83
|
function getOuterRadius(_ref6) {
|
|
81
84
|
var size = _ref6.size,
|
|
82
|
-
halfsize = _ref6.halfsize
|
|
83
|
-
outerRadius = _ref6.outerRadius;
|
|
85
|
+
halfsize = _ref6.halfsize;
|
|
84
86
|
var _size = _slicedToArray(size, 2),
|
|
85
87
|
width = _size[0],
|
|
86
88
|
height = _size[1];
|
|
87
89
|
var minORmax = halfsize ? Math.max : Math.min;
|
|
88
|
-
return
|
|
90
|
+
return minORmax(width - increaseFactor * 2, height - increaseFactor * 2) / 2;
|
|
89
91
|
}
|
|
90
92
|
var DonutRoot = /*#__PURE__*/function (_Component) {
|
|
91
93
|
_inherits(DonutRoot, _Component);
|
|
@@ -113,28 +115,22 @@ var DonutRoot = /*#__PURE__*/function (_Component) {
|
|
|
113
115
|
_defineProperty(_assertThisInitialized(_this), "animationActivePie", function (_ref8) {
|
|
114
116
|
var data = _ref8.data,
|
|
115
117
|
active = _ref8.active,
|
|
116
|
-
selector = _ref8.selector
|
|
118
|
+
selector = _ref8.selector,
|
|
119
|
+
element = _ref8.element;
|
|
117
120
|
var _this$asProps = _this.asProps,
|
|
118
121
|
duration = _this$asProps.duration,
|
|
119
122
|
innerRadius = _this$asProps.innerRadius,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
data: data,
|
|
132
|
-
selector: "#".concat(_this.id, " ").concat(selector),
|
|
133
|
-
duration: duration === 0 ? 0 : 300,
|
|
134
|
-
innerRadius: innerRadius,
|
|
135
|
-
outerRadiusMinMax: active ? [outerRadius, outerRadius + increaseFactor] : [outerRadius + increaseFactor, outerRadius]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
123
|
+
d3Arc = _this$asProps.d3Arc;
|
|
124
|
+
var outerRadius = d3Arc.outerRadius()();
|
|
125
|
+
if (_this.canAnimatedHover && duration > 0) {
|
|
126
|
+
transitionRadiusPie({
|
|
127
|
+
data: data,
|
|
128
|
+
selector: "#".concat(_this.id, " ").concat(selector),
|
|
129
|
+
element: element,
|
|
130
|
+
duration: duration === 0 ? 0 : 300,
|
|
131
|
+
innerRadius: innerRadius,
|
|
132
|
+
outerRadiusStartEnd: active ? [+element.dataset['currentRadius'] || outerRadius, outerRadius + increaseFactor] : [+element.dataset['currentRadius'] || outerRadius, outerRadius]
|
|
133
|
+
});
|
|
138
134
|
}
|
|
139
135
|
});
|
|
140
136
|
_defineProperty(_assertThisInitialized(_this), "animationUpdatePie", function () {
|
|
@@ -249,7 +245,8 @@ var DonutRoot = /*#__PURE__*/function (_Component) {
|
|
|
249
245
|
_this2.animationActivePie({
|
|
250
246
|
active: true,
|
|
251
247
|
data: data,
|
|
252
|
-
selector: "[d=\"".concat(e.target.getAttribute('d'), "\"]")
|
|
248
|
+
selector: "[d=\"".concat(e.target.getAttribute('d'), "\"]"),
|
|
249
|
+
element: e.target
|
|
253
250
|
});
|
|
254
251
|
}
|
|
255
252
|
},
|
|
@@ -258,7 +255,8 @@ var DonutRoot = /*#__PURE__*/function (_Component) {
|
|
|
258
255
|
_this2.animationActivePie({
|
|
259
256
|
active: false,
|
|
260
257
|
data: data,
|
|
261
|
-
selector: "[d=\"".concat(e.target.getAttribute('d'), "\"]")
|
|
258
|
+
selector: "[d=\"".concat(e.target.getAttribute('d'), "\"]"),
|
|
259
|
+
element: e.target
|
|
262
260
|
});
|
|
263
261
|
}
|
|
264
262
|
}
|
|
@@ -319,16 +317,15 @@ _defineProperty(DonutRoot, "defaultProps", function (_ref18) {
|
|
|
319
317
|
_ref18$halfsize = _ref18.halfsize,
|
|
320
318
|
halfsize = _ref18$halfsize === void 0 ? false : _ref18$halfsize,
|
|
321
319
|
size = _ref18.$rootProps.size;
|
|
322
|
-
var d3Arc = arc().outerRadius(getOuterRadius({
|
|
320
|
+
var d3Arc = arc().outerRadius(outerRadius || getOuterRadius({
|
|
323
321
|
size: size,
|
|
324
322
|
halfsize: halfsize,
|
|
325
323
|
outerRadius: outerRadius
|
|
326
324
|
})).innerRadius(innerRadius);
|
|
327
|
-
var d3ArcOut = arc().outerRadius(getOuterRadius({
|
|
325
|
+
var d3ArcOut = arc().outerRadius((outerRadius || getOuterRadius({
|
|
328
326
|
size: size,
|
|
329
|
-
halfsize: halfsize
|
|
330
|
-
|
|
331
|
-
}) + increaseFactor).innerRadius(innerRadius);
|
|
327
|
+
halfsize: halfsize
|
|
328
|
+
})) + increaseFactor).innerRadius(innerRadius);
|
|
332
329
|
var d3Pie = pie().sort(null).value(function (_ref19) {
|
|
333
330
|
var _ref20 = _slicedToArray(_ref19, 2),
|
|
334
331
|
value = _ref20[1];
|
|
@@ -364,7 +361,10 @@ function Pie(_ref15) {
|
|
|
364
361
|
_useState2 = _slicedToArray(_useState, 2),
|
|
365
362
|
isMount = _useState2[0],
|
|
366
363
|
setIsMount = _useState2[1];
|
|
364
|
+
var pieRef = useRef(null);
|
|
367
365
|
useEffect(function () {
|
|
366
|
+
pieRef.current.dataset['currentRadius'] = (active ? d3ArcOut : d3Arc).outerRadius()();
|
|
367
|
+
|
|
368
368
|
// do not run animation on first render
|
|
369
369
|
if (!isMount) {
|
|
370
370
|
setIsMount(true);
|
|
@@ -374,7 +374,8 @@ function Pie(_ref15) {
|
|
|
374
374
|
$animationActivePie({
|
|
375
375
|
active: active,
|
|
376
376
|
data: data,
|
|
377
|
-
selector: "[name=\"".concat(other.name, "\"]")
|
|
377
|
+
selector: "[name=\"".concat(other.name, "\"]"),
|
|
378
|
+
element: pieRef.current
|
|
378
379
|
});
|
|
379
380
|
}
|
|
380
381
|
}, [active]);
|
|
@@ -382,6 +383,7 @@ function Pie(_ref15) {
|
|
|
382
383
|
dataHintsHandler.describeValueEntity(dataKey, name);
|
|
383
384
|
return _ref = sstyled(styles), /*#__PURE__*/React.createElement(SPie, _ref.cn("SPie", {
|
|
384
385
|
"render": 'path',
|
|
386
|
+
"ref": pieRef,
|
|
385
387
|
"color": color,
|
|
386
388
|
"d": active ? d3ArcOut(data) : d3Arc(data),
|
|
387
389
|
"transparent": transparent
|