@semcore/d3-chart 16.0.6 → 16.1.0-prerelease.1
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 +25 -0
- package/lib/cjs/Area.js +55 -30
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +28 -15
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +31 -19
- package/lib/cjs/CompactHorizontalBar.js.map +1 -1
- package/lib/cjs/Donut.js +31 -16
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +24 -10
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +51 -25
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +206 -176
- package/lib/cjs/Radar.js.map +1 -1
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +22 -10
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +32 -15
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +2 -2
- package/lib/cjs/component/Chart/AreaChart.js +6 -3
- package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
- package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.js +2 -0
- package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
- package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.js +3 -1
- package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
- package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.js +4 -2
- package/lib/cjs/component/Chart/LineChart.js.map +1 -1
- package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.js +3 -1
- package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
- package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js +3 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.js +6 -2
- package/lib/cjs/component/Chart/VennChart.js.map +1 -1
- package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
- package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/cjs/types/Area.d.js.map +1 -1
- package/lib/cjs/types/Bubble.d.js.map +1 -1
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/Line.d.js.map +1 -1
- package/lib/cjs/types/Radar.d.js.map +1 -1
- package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
- package/lib/es6/Area.js +56 -31
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +28 -15
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +31 -19
- package/lib/es6/CompactHorizontalBar.js.map +1 -1
- package/lib/es6/Donut.js +31 -16
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +24 -10
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +52 -26
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +206 -176
- package/lib/es6/Radar.js.map +1 -1
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +22 -10
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +32 -15
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +2 -2
- package/lib/es6/component/Chart/AreaChart.js +6 -3
- package/lib/es6/component/Chart/AreaChart.js.map +1 -1
- package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.js +2 -0
- package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
- package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.js +3 -1
- package/lib/es6/component/Chart/DonutChart.js.map +1 -1
- package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.js +4 -2
- package/lib/es6/component/Chart/LineChart.js.map +1 -1
- package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.js +3 -1
- package/lib/es6/component/Chart/RadarChart.js.map +1 -1
- package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js +3 -1
- package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
- package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.js +6 -2
- package/lib/es6/component/Chart/VennChart.js.map +1 -1
- package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
- package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
- package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
- package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
- package/lib/es6/types/Area.d.js.map +1 -1
- package/lib/es6/types/Bubble.d.js.map +1 -1
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/Line.d.js.map +1 -1
- package/lib/es6/types/Radar.d.js.map +1 -1
- package/lib/es6/types/ScatterPlot.d.js.map +1 -1
- package/lib/esm/Area.mjs +33 -17
- package/lib/esm/Axis.mjs +15 -15
- package/lib/esm/Bar.mjs +17 -17
- package/lib/esm/Bubble.mjs +28 -16
- package/lib/esm/CompactHorizontalBar.mjs +31 -20
- package/lib/esm/Donut.mjs +32 -18
- package/lib/esm/Dots.mjs +21 -11
- package/lib/esm/HorizontalBar.mjs +17 -17
- package/lib/esm/Hover.mjs +4 -4
- package/lib/esm/Line.mjs +32 -15
- package/lib/esm/Plot.mjs +4 -4
- package/lib/esm/Radar.mjs +119 -96
- package/lib/esm/RadialTree.mjs +13 -13
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ScatterPlot.mjs +23 -11
- package/lib/esm/Tooltip.mjs +10 -10
- package/lib/esm/Venn.mjs +31 -16
- package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
- package/lib/esm/a11y/PlotA11yView.mjs +3 -3
- package/lib/esm/component/Chart/AreaChart.mjs +5 -3
- package/lib/esm/component/Chart/BubbleChart.mjs +2 -0
- package/lib/esm/component/Chart/DonutChart.mjs +2 -1
- package/lib/esm/component/Chart/LineChart.mjs +3 -2
- package/lib/esm/component/Chart/RadarChart.mjs +2 -1
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +2 -1
- package/lib/esm/component/Chart/VennChart.mjs +4 -2
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +18 -18
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +7 -7
- package/lib/types/Area.d.ts +2 -0
- package/lib/types/Bubble.d.ts +2 -0
- package/lib/types/Donut.d.ts +2 -0
- package/lib/types/Line.d.ts +2 -0
- package/lib/types/Radar.d.ts +2 -0
- package/lib/types/ScatterPlot.d.ts +2 -0
- package/lib/types/component/Chart/AreaChart.type.d.ts +2 -0
- package/lib/types/component/Chart/BubbleChart.type.d.ts +2 -0
- package/lib/types/component/Chart/DonutChart.type.d.ts +4 -1
- package/lib/types/component/Chart/LineChart.type.d.ts +2 -0
- package/lib/types/component/Chart/RadarChart.type.d.ts +2 -0
- package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +2 -0
- package/lib/types/component/Chart/VennChart.type.d.ts +4 -1
- package/package.json +16 -16
package/lib/esm/Line.mjs
CHANGED
|
@@ -8,13 +8,14 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
9
|
import { sstyled, Component } from "@semcore/core";
|
|
10
10
|
import uniqueIDEnhancement, { useUID } from "@semcore/core/lib/utils/uniqueID";
|
|
11
|
+
import { bisector } from "d3-array";
|
|
11
12
|
import { area, curveCardinal, line, curveLinear } from "d3-shape";
|
|
12
13
|
import React from "react";
|
|
13
14
|
import AnimatedClipPath from "./AnimatedClipPath.mjs";
|
|
14
15
|
import createElement from "./createElement.mjs";
|
|
15
16
|
import Dots from "./Dots.mjs";
|
|
16
17
|
import { resolvePatternDasharray } from "./Pattern.mjs";
|
|
17
|
-
import { interpolateValue, getNullData, definedData, definedNullData, getChartDefaultColorName, scaleOfBandwidth } from "./utils.mjs";
|
|
18
|
+
import { interpolateValue, getNullData, eventToPoint, invert, definedData, definedNullData, getChartDefaultColorName, scaleOfBandwidth } from "./utils.mjs";
|
|
18
19
|
function _callSuper(t, o, e) {
|
|
19
20
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
20
21
|
}
|
|
@@ -23,19 +24,19 @@ var style = (
|
|
|
23
24
|
/*__reshadow_css_start__*/
|
|
24
25
|
(sstyled.insert(
|
|
25
26
|
/*__inner_css_start__*/
|
|
26
|
-
".
|
|
27
|
+
".___SLine_o5bhk_gg_{fill:transparent;stroke-width:3;stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:d;transition-duration:var(--duration_o5bhk);transition-timing-function:ease-in-out}.___SLine_o5bhk_gg_.__color_o5bhk_gg_{stroke:var(--color_o5bhk)}.___SLine_o5bhk_gg_.__hide_o5bhk_gg_{display:none}.___SLine_o5bhk_gg_.__transparent_o5bhk_gg_{opacity:.3}.___SNull_o5bhk_gg_{fill:transparent;stroke:var(--intergalactic-border-primary, #c4c7cf);stroke-dasharray:4}.___SNull_o5bhk_gg_.__hide_o5bhk_gg_{display:none}.___SLineArea_o5bhk_gg_{transition-property:d;transition-duration:var(--duration_o5bhk);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLineArea_o5bhk_gg_.__color_o5bhk_gg_{fill:var(--color_o5bhk)}",
|
|
27
28
|
/*__inner_css_end__*/
|
|
28
|
-
"
|
|
29
|
+
"o5bhk_gg_"
|
|
29
30
|
), /*__reshadow_css_end__*/
|
|
30
31
|
{
|
|
31
|
-
"__SLine": "
|
|
32
|
-
"--duration": "--
|
|
33
|
-
"_color": "
|
|
34
|
-
"--color": "--
|
|
35
|
-
"_hide": "
|
|
36
|
-
"_transparent": "
|
|
37
|
-
"__SNull": "
|
|
38
|
-
"__SLineArea": "
|
|
32
|
+
"__SLine": "___SLine_o5bhk_gg_",
|
|
33
|
+
"--duration": "--duration_o5bhk",
|
|
34
|
+
"_color": "__color_o5bhk_gg_",
|
|
35
|
+
"--color": "--color_o5bhk",
|
|
36
|
+
"_hide": "__hide_o5bhk_gg_",
|
|
37
|
+
"_transparent": "__transparent_o5bhk_gg_",
|
|
38
|
+
"__SNull": "___SNull_o5bhk_gg_",
|
|
39
|
+
"__SLineArea": "___SLineArea_o5bhk_gg_"
|
|
39
40
|
})
|
|
40
41
|
);
|
|
41
42
|
var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
@@ -47,7 +48,7 @@ var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
|
47
48
|
return _createClass(LineRoot2, [{
|
|
48
49
|
key: "getDotsProps",
|
|
49
50
|
value: function getDotsProps() {
|
|
50
|
-
var _this$asProps = this.asProps, x = _this$asProps.x, y = _this$asProps.y, d3 = _this$asProps.d3, color = _this$asProps.color, resolveColor = _this$asProps.resolveColor, duration = _this$asProps.duration, transparent = _this$asProps.transparent, patterns = _this$asProps.patterns;
|
|
51
|
+
var _this$asProps = this.asProps, x = _this$asProps.x, y = _this$asProps.y, d3 = _this$asProps.d3, color = _this$asProps.color, resolveColor = _this$asProps.resolveColor, duration = _this$asProps.duration, transparent = _this$asProps.transparent, patterns = _this$asProps.patterns, onClick = _this$asProps.onClick;
|
|
51
52
|
return {
|
|
52
53
|
x,
|
|
53
54
|
y,
|
|
@@ -56,7 +57,8 @@ var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
|
56
57
|
resolveColor,
|
|
57
58
|
duration,
|
|
58
59
|
transparent,
|
|
59
|
-
patterns
|
|
60
|
+
patterns,
|
|
61
|
+
onClick
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
64
|
}, {
|
|
@@ -91,12 +93,25 @@ var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
|
91
93
|
scale
|
|
92
94
|
};
|
|
93
95
|
}
|
|
96
|
+
}, {
|
|
97
|
+
key: "handlerOnClick",
|
|
98
|
+
value: function handlerOnClick(e) {
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
var _this$asProps4 = this.asProps, rootRef = _this$asProps4.rootRef, _this$asProps4$scale = _slicedToArray(_this$asProps4.scale, 1), xScale = _this$asProps4$scale[0], data = _this$asProps4.data, x = _this$asProps4.x, onClick = _this$asProps4.onClick;
|
|
101
|
+
if (!onClick) return;
|
|
102
|
+
var _eventToPoint = eventToPoint(e, rootRef.current), _eventToPoint2 = _slicedToArray(_eventToPoint, 1), pX = _eventToPoint2[0];
|
|
103
|
+
var vX = invert(xScale, pX);
|
|
104
|
+
var index = bisector(function(d) {
|
|
105
|
+
return d[x];
|
|
106
|
+
}).center(data, vX);
|
|
107
|
+
onClick(index, e);
|
|
108
|
+
}
|
|
94
109
|
}, {
|
|
95
110
|
key: "render",
|
|
96
111
|
value: function render() {
|
|
97
112
|
var _ref;
|
|
98
113
|
var SLine = this.Element;
|
|
99
|
-
var _this$
|
|
114
|
+
var _this$asProps5 = this.asProps, styles = _this$asProps5.styles, hide = _this$asProps5.hide, color = _this$asProps5.color, resolveColor = _this$asProps5.resolveColor, uid = _this$asProps5.uid, size = _this$asProps5.size, d3 = _this$asProps5.d3, duration = _this$asProps5.duration, x = _this$asProps5.x, y = _this$asProps5.y, transparent = _this$asProps5.transparent, patterns = _this$asProps5.patterns;
|
|
100
115
|
var data = this.asProps.data.filter(function(item) {
|
|
101
116
|
return item[y] !== interpolateValue;
|
|
102
117
|
});
|
|
@@ -112,7 +127,9 @@ var LineRoot = /* @__PURE__ */ function(_Component) {
|
|
|
112
127
|
"transparent": transparent,
|
|
113
128
|
"d": d3(data),
|
|
114
129
|
"use:duration": "".concat(duration, "ms"),
|
|
115
|
-
"strokeDasharray": patterns ? resolvePatternDasharray(patternKey, patterns) : void 0
|
|
130
|
+
"strokeDasharray": patterns ? resolvePatternDasharray(patternKey, patterns) : void 0,
|
|
131
|
+
"onClickCapture": this.handlerOnClick.bind(this),
|
|
132
|
+
"pointerEvents": "stroke"
|
|
116
133
|
})), duration && /* @__PURE__ */ React.createElement(AnimatedClipPath, _ref.cn("AnimatedClipPath", {
|
|
117
134
|
"aria-hidden": true,
|
|
118
135
|
"duration": duration,
|
package/lib/esm/Plot.mjs
CHANGED
|
@@ -26,13 +26,13 @@ var style = (
|
|
|
26
26
|
/*__reshadow_css_start__*/
|
|
27
27
|
(sstyled.insert(
|
|
28
28
|
/*__inner_css_start__*/
|
|
29
|
-
".
|
|
29
|
+
".___SPlot_clrhu_gg_{overflow:hidden}.___SPlot_clrhu_gg_:active,.___SPlot_clrhu_gg_:focus{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_clrhu_gg_.__keyboardFocused_clrhu_gg_{border:1px solid var(--intergalactic-chart-palette-order-9, #008ff8);box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}",
|
|
30
30
|
/*__inner_css_end__*/
|
|
31
|
-
"
|
|
31
|
+
"clrhu_gg_"
|
|
32
32
|
), /*__reshadow_css_end__*/
|
|
33
33
|
{
|
|
34
|
-
"__SPlot": "
|
|
35
|
-
"_keyboardFocused": "
|
|
34
|
+
"__SPlot": "___SPlot_clrhu_gg_",
|
|
35
|
+
"_keyboardFocused": "__keyboardFocused_clrhu_gg_"
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
38
|
var PlotRoot = /* @__PURE__ */ function(_Component) {
|
package/lib/esm/Radar.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import React, { cloneElement } from "react";
|
|
|
19
19
|
import createElement from "./createElement.mjs";
|
|
20
20
|
import { PatternFill, getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
21
21
|
import Tooltip from "./Tooltip.mjs";
|
|
22
|
-
import { getChartDefaultColorName,
|
|
22
|
+
import { getChartDefaultColorName, eventToPoint, measureText } from "./utils.mjs";
|
|
23
23
|
function _callSuper(t, o, e) {
|
|
24
24
|
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
25
25
|
}
|
|
@@ -28,29 +28,29 @@ var style = (
|
|
|
28
28
|
/*__reshadow_css_start__*/
|
|
29
29
|
(sstyled.insert(
|
|
30
30
|
/*__inner_css_start__*/
|
|
31
|
-
".
|
|
31
|
+
".___SAxisLine_15mev_gg_,.___SAxisTick_15mev_gg_,.___SAxis_15mev_gg_{stroke:var(--intergalactic-chart-grid-line, #e0e1e9);stroke-width:1;fill:transparent}.___SAxisLine_15mev_gg_,.___SAxisTick_15mev_gg_{stroke-dasharray:2}.___SAxisLine_15mev_gg_.__active_15mev_gg_{stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___SAxisLabel_15mev_gg_{text-anchor:middle;dominant-baseline:central;font-size:12px}.___SAxisLabel_15mev_gg_.__xDirection_15mev_gg_{text-anchor:var(--xDirection_15mev)}.___SAxisLabel_15mev_gg_.__yDirection_15mev_gg_{dominant-baseline:var(--yDirection_15mev)}.___SPolygonDot_15mev_gg_,.___SPolygon_15mev_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPolygon_15mev_gg_{opacity:.2}.___SPolygon_15mev_gg_.__color_15mev_gg_{fill:var(--color_15mev)}.___SPolygon_15mev_gg_.__pattern_15mev_gg_.__color_15mev_gg_{fill:var(--pattern_15mev);stroke:var(--color_15mev);stroke-width:1px}.___SPolygonDot_15mev_gg_{stroke-width:2px;stroke:var(--intergalactic-chart-grid-border, #ffffff);r:6px}.___SPolygonDot_15mev_gg_.__transparent_15mev_gg_{opacity:.3}.___SPolygonDot_15mev_gg_.__color_15mev_gg_{fill:var(--color_15mev)}.___SPolygonLine_15mev_gg_{stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);stroke-width:3;fill:transparent}.___SPolygonLine_15mev_gg_.__transparent_15mev_gg_{opacity:.3}.___SPolygonLine_15mev_gg_.__color_15mev_gg_{stroke:var(--color_15mev)}.___SPieRect_15mev_gg_{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
32
32
|
/*__inner_css_end__*/
|
|
33
|
-
"
|
|
33
|
+
"15mev_gg_"
|
|
34
34
|
), /*__reshadow_css_end__*/
|
|
35
35
|
{
|
|
36
|
-
"__SAxis": "
|
|
37
|
-
"__SAxisLine": "
|
|
38
|
-
"__SAxisTick": "
|
|
39
|
-
"_active": "
|
|
40
|
-
"__SAxisLabel": "
|
|
41
|
-
"_xDirection": "
|
|
42
|
-
"--xDirection": "--
|
|
43
|
-
"_yDirection": "
|
|
44
|
-
"--yDirection": "--
|
|
45
|
-
"__SPolygon": "
|
|
46
|
-
"_color": "
|
|
47
|
-
"--color": "--
|
|
48
|
-
"_pattern": "
|
|
49
|
-
"--pattern": "--
|
|
50
|
-
"__SPolygonDot": "
|
|
51
|
-
"_transparent": "
|
|
52
|
-
"__SPolygonLine": "
|
|
53
|
-
"__SPieRect": "
|
|
36
|
+
"__SAxis": "___SAxis_15mev_gg_",
|
|
37
|
+
"__SAxisLine": "___SAxisLine_15mev_gg_",
|
|
38
|
+
"__SAxisTick": "___SAxisTick_15mev_gg_",
|
|
39
|
+
"_active": "__active_15mev_gg_",
|
|
40
|
+
"__SAxisLabel": "___SAxisLabel_15mev_gg_",
|
|
41
|
+
"_xDirection": "__xDirection_15mev_gg_",
|
|
42
|
+
"--xDirection": "--xDirection_15mev",
|
|
43
|
+
"_yDirection": "__yDirection_15mev_gg_",
|
|
44
|
+
"--yDirection": "--yDirection_15mev",
|
|
45
|
+
"__SPolygon": "___SPolygon_15mev_gg_",
|
|
46
|
+
"_color": "__color_15mev_gg_",
|
|
47
|
+
"--color": "--color_15mev",
|
|
48
|
+
"_pattern": "__pattern_15mev_gg_",
|
|
49
|
+
"--pattern": "--pattern_15mev",
|
|
50
|
+
"__SPolygonDot": "___SPolygonDot_15mev_gg_",
|
|
51
|
+
"_transparent": "__transparent_15mev_gg_",
|
|
52
|
+
"__SPolygonLine": "___SPolygonLine_15mev_gg_",
|
|
53
|
+
"__SPieRect": "___SPieRect_15mev_gg_"
|
|
54
54
|
})
|
|
55
55
|
);
|
|
56
56
|
var clampAngle = function clampAngle2(angle) {
|
|
@@ -205,15 +205,76 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
205
205
|
type: this.asProps.type,
|
|
206
206
|
offset: this.offset,
|
|
207
207
|
categories: this.asProps.data[this.categoriesKey],
|
|
208
|
-
angleOffset: this.asProps.angleOffset
|
|
208
|
+
angleOffset: this.asProps.angleOffset,
|
|
209
|
+
getIndex: this.getIndex.bind(this),
|
|
210
|
+
getPolygon: this.getPolygon.bind(this),
|
|
211
|
+
getPie: this.getPie.bind(this)
|
|
209
212
|
};
|
|
210
213
|
}
|
|
214
|
+
}, {
|
|
215
|
+
key: "getIndex",
|
|
216
|
+
value: function getIndex(point) {
|
|
217
|
+
var _this2 = this;
|
|
218
|
+
var _this$asProps3 = this.asProps, data = _this$asProps3.data, type = _this$asProps3.type;
|
|
219
|
+
var categories = data[this.categoriesKey];
|
|
220
|
+
var index;
|
|
221
|
+
if (type === "circle") {
|
|
222
|
+
index = categories.findIndex(function(_c, i) {
|
|
223
|
+
return pieContains(_this2.getPie(i), point);
|
|
224
|
+
});
|
|
225
|
+
} else {
|
|
226
|
+
index = categories.findIndex(function(_c, i) {
|
|
227
|
+
return polygonContains(_this2.getPolygon(i), point);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
return index === -1 ? null : index;
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "getPolygon",
|
|
234
|
+
value: function getPolygon(index) {
|
|
235
|
+
var _this$asProps4 = this.asProps, data = _this$asProps4.data, size = _this$asProps4.size, angleOffset = _this$asProps4.angleOffset;
|
|
236
|
+
var offset = this.offset;
|
|
237
|
+
var categories = data[this.categoriesKey];
|
|
238
|
+
var total = categories.length;
|
|
239
|
+
var diam = Math.min(size[0], size[1]);
|
|
240
|
+
var radius = diam / 2 - offset;
|
|
241
|
+
var prevIndex = (index - 1 + total) % total;
|
|
242
|
+
var nextIndex = (index + 1 + total) % total;
|
|
243
|
+
var _getRadianPosition = getRadianPosition(prevIndex, radius, total, angleOffset), _getRadianPosition2 = _slicedToArray(_getRadianPosition, 2), prevX1 = _getRadianPosition2[0], prevY1 = _getRadianPosition2[1];
|
|
244
|
+
var _getRadianPosition3 = getRadianPosition(index, radius, total, angleOffset), _getRadianPosition4 = _slicedToArray(_getRadianPosition3, 2), x = _getRadianPosition4[0], y = _getRadianPosition4[1];
|
|
245
|
+
var _getRadianPosition5 = getRadianPosition(nextIndex, radius, total, angleOffset), _getRadianPosition6 = _slicedToArray(_getRadianPosition5, 2), nextX1 = _getRadianPosition6[0], nextY1 = _getRadianPosition6[1];
|
|
246
|
+
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
247
|
+
}
|
|
248
|
+
}, {
|
|
249
|
+
key: "getPie",
|
|
250
|
+
value: function getPie(index) {
|
|
251
|
+
var _this$asProps5 = this.asProps, data = _this$asProps5.data, size = _this$asProps5.size, angleOffset = _this$asProps5.angleOffset;
|
|
252
|
+
var categories = data[this.categoriesKey];
|
|
253
|
+
var offset = this.offset;
|
|
254
|
+
var angle = Math.PI * 2 / categories.length;
|
|
255
|
+
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
256
|
+
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
key: "handlerOnClick",
|
|
260
|
+
value: function handlerOnClick(e) {
|
|
261
|
+
e.stopPropagation();
|
|
262
|
+
var _this$asProps6 = this.asProps, rootRef = _this$asProps6.rootRef, size = _this$asProps6.size, onClick = _this$asProps6.onClick;
|
|
263
|
+
if (!onClick) return;
|
|
264
|
+
var _eventToPoint = eventToPoint(e, rootRef.current), _eventToPoint2 = _slicedToArray(_eventToPoint, 2), pointX = _eventToPoint2[0], pointY = _eventToPoint2[1];
|
|
265
|
+
var r = Math.min(size[0], size[1]) / 2;
|
|
266
|
+
var centerX = pointX - r;
|
|
267
|
+
var centerY = pointY - r;
|
|
268
|
+
var index = this.getIndex([centerX, centerY]);
|
|
269
|
+
if (index === null) return;
|
|
270
|
+
onClick(index, e);
|
|
271
|
+
}
|
|
211
272
|
}, {
|
|
212
273
|
key: "render",
|
|
213
274
|
value: function render() {
|
|
214
275
|
var _ref2;
|
|
215
276
|
var SRadar = this.Element;
|
|
216
|
-
var _this$
|
|
277
|
+
var _this$asProps7 = this.asProps, Children = _this$asProps7.Children, styles = _this$asProps7.styles, size = _this$asProps7.size, data = _this$asProps7.data, offset = _this$asProps7.offset;
|
|
217
278
|
var _size = _slicedToArray(size, 2), width = _size[0], height = _size[1];
|
|
218
279
|
this.asProps.dataHintsHandler.establishDataType("indexed-groups");
|
|
219
280
|
var dataKey;
|
|
@@ -233,7 +294,8 @@ var RadarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
233
294
|
"id": this.id,
|
|
234
295
|
"render": "g",
|
|
235
296
|
"childrenPosition": "inside",
|
|
236
|
-
"transform": "translate(".concat(width / 2, ",").concat(height / 2, ")")
|
|
297
|
+
"transform": "translate(".concat(width / 2, ",").concat(height / 2, ")"),
|
|
298
|
+
"onClickCapture": this.handlerOnClick.bind(this)
|
|
237
299
|
}));
|
|
238
300
|
}
|
|
239
301
|
}]);
|
|
@@ -254,7 +316,7 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
254
316
|
return _createClass(PolygonRoot2, [{
|
|
255
317
|
key: "getDotsProps",
|
|
256
318
|
value: function getDotsProps() {
|
|
257
|
-
var _this$
|
|
319
|
+
var _this$asProps8 = this.asProps, data = _this$asProps8.data, scale = _this$asProps8.scale, color = _this$asProps8.color, resolveColor = _this$asProps8.resolveColor, transparent = _this$asProps8.transparent, dataKey = _this$asProps8.dataKey, dataHintsHandler = _this$asProps8.dataHintsHandler, angleOffset = _this$asProps8.angleOffset, patterns = _this$asProps8.patterns;
|
|
258
320
|
return {
|
|
259
321
|
data,
|
|
260
322
|
scale,
|
|
@@ -270,7 +332,7 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
270
332
|
}, {
|
|
271
333
|
key: "getLineProps",
|
|
272
334
|
value: function getLineProps() {
|
|
273
|
-
var _this$
|
|
335
|
+
var _this$asProps9 = this.asProps, d3 = _this$asProps9.d3, data = _this$asProps9.data, color = _this$asProps9.color, resolveColor = _this$asProps9.resolveColor, transparent = _this$asProps9.transparent;
|
|
274
336
|
return {
|
|
275
337
|
data,
|
|
276
338
|
color,
|
|
@@ -283,7 +345,7 @@ var PolygonRoot = /* @__PURE__ */ function(_Component2) {
|
|
|
283
345
|
key: "render",
|
|
284
346
|
value: function render() {
|
|
285
347
|
var _ref3;
|
|
286
|
-
var _this$
|
|
348
|
+
var _this$asProps0 = this.asProps, SPolygon = _this$asProps0.Element, styles = _this$asProps0.styles, d3 = _this$asProps0.d3, data = _this$asProps0.data, color = _this$asProps0.color, resolveColor = _this$asProps0.resolveColor, fill = _this$asProps0.fill, uid = _this$asProps0.uid, patterns = _this$asProps0.patterns;
|
|
287
349
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, (_ref3 = sstyled(styles), /* @__PURE__ */ React.createElement(SPolygon, _ref3.cn("SPolygon", {
|
|
288
350
|
"render": "path",
|
|
289
351
|
"d": d3(data),
|
|
@@ -328,7 +390,7 @@ function PolygonDots(props) {
|
|
|
328
390
|
if (value === null || value === void 0) return;
|
|
329
391
|
var radius = scale(value);
|
|
330
392
|
props.dataHintsHandler.describeGroupedValues(categoryKey, "".concat(categoryKey, ".").concat(i));
|
|
331
|
-
var
|
|
393
|
+
var _getRadianPosition7 = getRadianPosition(i, radius, data.length, angleOffset), _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2), cx = _getRadianPosition8[0], cy = _getRadianPosition8[1];
|
|
332
394
|
if (!patterns) {
|
|
333
395
|
var _ref5;
|
|
334
396
|
return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SPolygonDot, _ref5.cn("SPolygonDot", {
|
|
@@ -359,23 +421,23 @@ function PolygonDots(props) {
|
|
|
359
421
|
}
|
|
360
422
|
var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
361
423
|
function AxisRoot2() {
|
|
362
|
-
var
|
|
424
|
+
var _this3;
|
|
363
425
|
_classCallCheck(this, AxisRoot2);
|
|
364
426
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
365
427
|
args[_key2] = arguments[_key2];
|
|
366
428
|
}
|
|
367
|
-
|
|
368
|
-
_defineProperty(
|
|
369
|
-
_defineProperty(
|
|
429
|
+
_this3 = _callSuper(this, AxisRoot2, [].concat(args));
|
|
430
|
+
_defineProperty(_this3, "unsubscribeTooltipVisible", null);
|
|
431
|
+
_defineProperty(_this3, "state", {
|
|
370
432
|
activeLineIndex: null
|
|
371
433
|
});
|
|
372
|
-
_defineProperty(
|
|
434
|
+
_defineProperty(_this3, "handleTooltipRenderingProps", function(_anchorProps, _ref16) {
|
|
373
435
|
var index = _ref16.index;
|
|
374
|
-
|
|
436
|
+
_this3.setState({
|
|
375
437
|
activeLineIndex: index
|
|
376
438
|
});
|
|
377
439
|
});
|
|
378
|
-
return
|
|
440
|
+
return _this3;
|
|
379
441
|
}
|
|
380
442
|
_inherits(AxisRoot2, _Component3);
|
|
381
443
|
return _createClass(AxisRoot2, [{
|
|
@@ -391,7 +453,7 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
391
453
|
key: "getTicksProps",
|
|
392
454
|
value: function getTicksProps(_ref17) {
|
|
393
455
|
var _ref17$tickSize = _ref17.tickSize, tickSize = _ref17$tickSize === void 0 ? 100 : _ref17$tickSize;
|
|
394
|
-
var _this$
|
|
456
|
+
var _this$asProps1 = this.asProps, data = _this$asProps1.data, offset = _this$asProps1.offset, categories = _this$asProps1.categories, size = _this$asProps1.size, type = _this$asProps1.type;
|
|
395
457
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
396
458
|
return {
|
|
397
459
|
type,
|
|
@@ -406,7 +468,7 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
406
468
|
key: "getLabelsProps",
|
|
407
469
|
value: function getLabelsProps(_ref18) {
|
|
408
470
|
var _ref18$labelOffset = _ref18.labelOffset, labelOffset = _ref18$labelOffset === void 0 ? 10 : _ref18$labelOffset;
|
|
409
|
-
var _this$
|
|
471
|
+
var _this$asProps10 = this.asProps, offset = _this$asProps10.offset, categories = _this$asProps10.categories, textSize = _this$asProps10.textSize, angleOffset = _this$asProps10.angleOffset;
|
|
410
472
|
return {
|
|
411
473
|
categories,
|
|
412
474
|
textSize,
|
|
@@ -430,7 +492,7 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
430
492
|
key: "render",
|
|
431
493
|
value: function render() {
|
|
432
494
|
var _ref7;
|
|
433
|
-
var _this$
|
|
495
|
+
var _this$asProps11 = this.asProps, SAxis = _this$asProps11.Element, styles = _this$asProps11.styles, categories = _this$asProps11.categories, size = _this$asProps11.size, offset = _this$asProps11.offset, type = _this$asProps11.type, angleOffset = _this$asProps11.angleOffset;
|
|
434
496
|
var activeLineIndex = this.state.activeLineIndex;
|
|
435
497
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
436
498
|
var total = categories.length;
|
|
@@ -443,7 +505,7 @@ var AxisRoot = /* @__PURE__ */ function(_Component3) {
|
|
|
443
505
|
"render": "path",
|
|
444
506
|
"d": this.createLineRadial(radius, total)(categories)
|
|
445
507
|
})), categories.map(function(_category, i) {
|
|
446
|
-
var
|
|
508
|
+
var _getRadianPosition9 = getRadianPosition(i, radius, total, angleOffset), _getRadianPosition0 = _slicedToArray(_getRadianPosition9, 2), x = _getRadianPosition0[0], y = _getRadianPosition0[1];
|
|
447
509
|
var _sstyled$cn = sstyled(styles).cn("SAxisLine", {
|
|
448
510
|
active: activeLineIndex === i
|
|
449
511
|
}), className = _sstyled$cn.className;
|
|
@@ -493,7 +555,7 @@ function AxisLabels(props) {
|
|
|
493
555
|
var SAxisLabel = props.Element, styles = props.styles, textSize = props.textSize, size = props.size, offset = props.offset, categories = props.categories, angleOffset = props.angleOffset;
|
|
494
556
|
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
495
557
|
return categories.map(function(category, i) {
|
|
496
|
-
var
|
|
558
|
+
var _getRadianPosition1 = getRadianPosition(i, radius, categories.length, angleOffset), _getRadianPosition10 = _slicedToArray(_getRadianPosition1, 2), x = _getRadianPosition10[0], y = _getRadianPosition10[1];
|
|
497
559
|
var _getLabelPlacement = getLabelPlacement(i, categories.length, angleOffset), _getLabelPlacement2 = _slicedToArray(_getLabelPlacement, 2), xDirection = _getLabelPlacement2[0], yDirection = _getLabelPlacement2[1];
|
|
498
560
|
if (typeof category === "string") {
|
|
499
561
|
var _ref9;
|
|
@@ -529,27 +591,27 @@ function AxisLabels(props) {
|
|
|
529
591
|
}
|
|
530
592
|
var Hover = /* @__PURE__ */ function(_Component4) {
|
|
531
593
|
function Hover2() {
|
|
532
|
-
var
|
|
594
|
+
var _this4;
|
|
533
595
|
_classCallCheck(this, Hover2);
|
|
534
596
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
535
597
|
args[_key3] = arguments[_key3];
|
|
536
598
|
}
|
|
537
|
-
|
|
538
|
-
_defineProperty(
|
|
599
|
+
_this4 = _callSuper(this, Hover2, [].concat(args));
|
|
600
|
+
_defineProperty(_this4, "state", {
|
|
539
601
|
index: null
|
|
540
602
|
});
|
|
541
|
-
_defineProperty(
|
|
542
|
-
_defineProperty(
|
|
543
|
-
_defineProperty(
|
|
544
|
-
_defineProperty(
|
|
545
|
-
var
|
|
603
|
+
_defineProperty(_this4, "virtualElement", canUseDOM() ? document.createElement("div") : {});
|
|
604
|
+
_defineProperty(_this4, "unsubscribeMouseMoveRoot", null);
|
|
605
|
+
_defineProperty(_this4, "unsubscribeMouseLeaveRoot", null);
|
|
606
|
+
_defineProperty(_this4, "handlerMouseMoveRoot", trottle(function(e) {
|
|
607
|
+
var _this4$asProps = _this4.asProps, eventEmitter = _this4$asProps.eventEmitter, size = _this4$asProps.size, rootRef = _this4$asProps.rootRef, patterns = _this4$asProps.patterns, getIndex = _this4$asProps.getIndex;
|
|
546
608
|
var point = eventToPoint(e, rootRef.current);
|
|
547
609
|
var diam = Math.min(size[0], size[1]);
|
|
548
610
|
var centerX = point[0] - diam / 2;
|
|
549
611
|
var centerY = point[1] - diam / 2;
|
|
550
612
|
var clientX = e.clientX, clientY = e.clientY;
|
|
551
|
-
var index =
|
|
552
|
-
|
|
613
|
+
var index = getIndex([centerX, centerY]);
|
|
614
|
+
_this4.setState({
|
|
553
615
|
index
|
|
554
616
|
}, function() {
|
|
555
617
|
eventEmitter.emit("setTooltipPosition", clientX, clientY);
|
|
@@ -560,14 +622,14 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
560
622
|
eventEmitter.emit("setTooltipVisible", index !== null);
|
|
561
623
|
});
|
|
562
624
|
}));
|
|
563
|
-
_defineProperty(
|
|
564
|
-
|
|
625
|
+
_defineProperty(_this4, "handlerMouseLeaveRoot", trottle(function() {
|
|
626
|
+
_this4.setState({
|
|
565
627
|
index: null
|
|
566
628
|
}, function() {
|
|
567
|
-
|
|
629
|
+
_this4.asProps.eventEmitter.emit("setTooltipVisible", false);
|
|
568
630
|
});
|
|
569
631
|
}));
|
|
570
|
-
return
|
|
632
|
+
return _this4;
|
|
571
633
|
}
|
|
572
634
|
_inherits(Hover2, _Component4);
|
|
573
635
|
return _createClass(Hover2, [{
|
|
@@ -586,45 +648,6 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
586
648
|
};
|
|
587
649
|
};
|
|
588
650
|
}
|
|
589
|
-
}, {
|
|
590
|
-
key: "getPolygon",
|
|
591
|
-
value: function getPolygon(index) {
|
|
592
|
-
var _this$asProps0 = this.asProps, categories = _this$asProps0.categories, size = _this$asProps0.size, offset = _this$asProps0.offset, angleOffset = _this$asProps0.angleOffset;
|
|
593
|
-
var total = categories.length;
|
|
594
|
-
var diam = Math.min(size[0], size[1]);
|
|
595
|
-
var radius = diam / 2 - offset;
|
|
596
|
-
var prevIndex = (index - 1 + total) % total;
|
|
597
|
-
var nextIndex = (index + 1 + total) % total;
|
|
598
|
-
var _getRadianPosition7 = getRadianPosition(prevIndex, radius, total, angleOffset), _getRadianPosition8 = _slicedToArray(_getRadianPosition7, 2), prevX1 = _getRadianPosition8[0], prevY1 = _getRadianPosition8[1];
|
|
599
|
-
var _getRadianPosition9 = getRadianPosition(index, radius, total, angleOffset), _getRadianPosition0 = _slicedToArray(_getRadianPosition9, 2), x = _getRadianPosition0[0], y = _getRadianPosition0[1];
|
|
600
|
-
var _getRadianPosition1 = getRadianPosition(nextIndex, radius, total, angleOffset), _getRadianPosition10 = _slicedToArray(_getRadianPosition1, 2), nextX1 = _getRadianPosition10[0], nextY1 = _getRadianPosition10[1];
|
|
601
|
-
return [[0, 0], [(prevX1 + x) / 2, (prevY1 + y) / 2], [x, y], [(nextX1 + x) / 2, (nextY1 + y) / 2]];
|
|
602
|
-
}
|
|
603
|
-
}, {
|
|
604
|
-
key: "getPie",
|
|
605
|
-
value: function getPie(index) {
|
|
606
|
-
var _this$asProps1 = this.asProps, categories = _this$asProps1.categories, size = _this$asProps1.size, offset = _this$asProps1.offset, angleOffset = _this$asProps1.angleOffset;
|
|
607
|
-
var angle = Math.PI * 2 / categories.length;
|
|
608
|
-
var radius = Math.min(size[0], size[1]) / 2 - offset;
|
|
609
|
-
return [index * angle - angle / 2 - angleOffset, (index + 1) * angle - angle / 2 - angleOffset, radius];
|
|
610
|
-
}
|
|
611
|
-
}, {
|
|
612
|
-
key: "getIndex",
|
|
613
|
-
value: function getIndex(point) {
|
|
614
|
-
var _this4 = this;
|
|
615
|
-
var _this$asProps10 = this.asProps, categories = _this$asProps10.categories, type = _this$asProps10.type;
|
|
616
|
-
var index;
|
|
617
|
-
if (type === "circle") {
|
|
618
|
-
index = categories.findIndex(function(_c, i) {
|
|
619
|
-
return pieContains(_this4.getPie(i), point);
|
|
620
|
-
});
|
|
621
|
-
} else {
|
|
622
|
-
index = categories.findIndex(function(_c, i) {
|
|
623
|
-
return polygonContains(_this4.getPolygon(i), point);
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
return index === -1 ? null : index;
|
|
627
|
-
}
|
|
628
651
|
}, {
|
|
629
652
|
key: "componentDidMount",
|
|
630
653
|
value: function componentDidMount() {
|
|
@@ -649,13 +672,13 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
649
672
|
}, {
|
|
650
673
|
key: "render",
|
|
651
674
|
value: function render() {
|
|
652
|
-
var _this$
|
|
675
|
+
var _this$asProps12 = this.asProps, styles = _this$asProps12.styles, type = _this$asProps12.type, getPie = _this$asProps12.getPie, getPolygon = _this$asProps12.getPolygon;
|
|
653
676
|
var index = this.state.index;
|
|
654
677
|
var SPieRect = this.Element;
|
|
655
678
|
if (index !== null) {
|
|
656
679
|
if (type === "circle") {
|
|
657
680
|
var _ref0;
|
|
658
|
-
var
|
|
681
|
+
var _getPie = getPie(index), _getPie2 = _slicedToArray(_getPie, 3), startAngle = _getPie2[0], endAngle = _getPie2[1], radius = _getPie2[2];
|
|
659
682
|
var circle = arc().innerRadius(0).outerRadius(radius).startAngle(startAngle).endAngle(endAngle);
|
|
660
683
|
return _ref0 = sstyled(styles), /* @__PURE__ */ React.createElement(SPieRect, _ref0.cn("SPieRect", {
|
|
661
684
|
"render": "path",
|
|
@@ -665,7 +688,7 @@ var Hover = /* @__PURE__ */ function(_Component4) {
|
|
|
665
688
|
var _ref1;
|
|
666
689
|
return _ref1 = sstyled(styles), /* @__PURE__ */ React.createElement(SPieRect, _ref1.cn("SPieRect", {
|
|
667
690
|
"render": "path",
|
|
668
|
-
"d": line()(
|
|
691
|
+
"d": line()(getPolygon(index))
|
|
669
692
|
}));
|
|
670
693
|
}
|
|
671
694
|
}
|
package/lib/esm/RadialTree.mjs
CHANGED
|
@@ -28,22 +28,22 @@ var style = (
|
|
|
28
28
|
/*__reshadow_css_start__*/
|
|
29
29
|
(sstyled.insert(
|
|
30
30
|
/*__inner_css_start__*/
|
|
31
|
-
".
|
|
31
|
+
".___SRadian_zc1qp_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info, #008ff8)}.___SLine_zc1qp_gg_{stroke:var(--intergalactic-text-large-info, #008ff8)}.___SLine_zc1qp_gg_.__stroke_zc1qp_gg_{stroke:var(--stroke_zc1qp)}.___SLine_zc1qp_gg_.__transparent_zc1qp_gg_{opacity:.3}.___SCap_zc1qp_gg_{transition:r .1s}.___SCap_zc1qp_gg_.__pattern_zc1qp_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:1px}.___SCap_zc1qp_gg_.__transparent_zc1qp_gg_,.___SIcon_zc1qp_gg_.__transparent_zc1qp_gg_,.___SLabel_zc1qp_gg_.__transparent_zc1qp_gg_{opacity:.3}.___SLabel_zc1qp_gg_{fill:var(--color_zc1qp)}@media (hover:hover){.___SRadian_zc1qp_gg_:hover .___SLabel_zc1qp_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_zc1qp_gg_{transition:none}}",
|
|
32
32
|
/*__inner_css_end__*/
|
|
33
|
-
"
|
|
33
|
+
"zc1qp_gg_"
|
|
34
34
|
), /*__reshadow_css_end__*/
|
|
35
35
|
{
|
|
36
|
-
"__SRadian": "
|
|
37
|
-
"__SLine": "
|
|
38
|
-
"_stroke": "
|
|
39
|
-
"--stroke": "--
|
|
40
|
-
"_transparent": "
|
|
41
|
-
"__SCap": "
|
|
42
|
-
"_pattern": "
|
|
43
|
-
"__SIcon": "
|
|
44
|
-
"__SLabel": "
|
|
45
|
-
"--color": "--
|
|
46
|
-
"__SLineCap": "
|
|
36
|
+
"__SRadian": "___SRadian_zc1qp_gg_",
|
|
37
|
+
"__SLine": "___SLine_zc1qp_gg_",
|
|
38
|
+
"_stroke": "__stroke_zc1qp_gg_",
|
|
39
|
+
"--stroke": "--stroke_zc1qp",
|
|
40
|
+
"_transparent": "__transparent_zc1qp_gg_",
|
|
41
|
+
"__SCap": "___SCap_zc1qp_gg_",
|
|
42
|
+
"_pattern": "__pattern_zc1qp_gg_",
|
|
43
|
+
"__SIcon": "___SIcon_zc1qp_gg_",
|
|
44
|
+
"__SLabel": "___SLabel_zc1qp_gg_",
|
|
45
|
+
"--color": "--color_zc1qp",
|
|
46
|
+
"__SLineCap": "___SLineCap_zc1qp_gg_"
|
|
47
47
|
})
|
|
48
48
|
);
|
|
49
49
|
var baseAngle = -Math.PI / 2;
|
package/lib/esm/Reference.mjs
CHANGED
|
@@ -20,22 +20,22 @@ var style = (
|
|
|
20
20
|
/*__reshadow_css_start__*/
|
|
21
21
|
(sstyled.insert(
|
|
22
22
|
/*__inner_css_start__*/
|
|
23
|
-
".
|
|
23
|
+
".___SReferenceLine_uwwsc_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line, #a9abb6)}.___STitle_uwwsc_gg_{font-size:var(--intergalactic-fs-100, 12px);fill:var(--intergalactic-chart-grid-text-label, #6c6e79);transform-origin:var(--transform-origin_uwwsc)}.___STitle_uwwsc_gg_._position_top_uwwsc_gg_{text-anchor:middle}.___STitle_uwwsc_gg_._position_bottom_uwwsc_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_uwwsc_gg_._position_left_uwwsc_gg_,.___STitle_uwwsc_gg_._position_right_uwwsc_gg_{transform:rotate(-90deg);text-anchor:middle;dominant-baseline:middle}.___SBackground_uwwsc_gg_{fill:var(--intergalactic-chart-grid-period-bg, rgba(196, 199, 207, 0.2))}.___SStripes_uwwsc_gg_{fill:var(--fill_uwwsc)}.___SStripesPatternPath_uwwsc_gg_{stroke:var(--intergalactic-chart-grid-period-pattern, rgba(25, 27, 35, 0.15));stroke-width:1px}",
|
|
24
24
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
25
|
+
"uwwsc_gg_"
|
|
26
26
|
), /*__reshadow_css_end__*/
|
|
27
27
|
{
|
|
28
|
-
"__SReferenceLine": "
|
|
29
|
-
"__STitle": "
|
|
30
|
-
"--transform-origin": "--transform-
|
|
31
|
-
"_position_top": "
|
|
32
|
-
"_position_bottom": "
|
|
33
|
-
"_position_right": "
|
|
34
|
-
"_position_left": "
|
|
35
|
-
"__SBackground": "
|
|
36
|
-
"__SStripes": "
|
|
37
|
-
"--fill": "--
|
|
38
|
-
"__SStripesPatternPath": "
|
|
28
|
+
"__SReferenceLine": "___SReferenceLine_uwwsc_gg_",
|
|
29
|
+
"__STitle": "___STitle_uwwsc_gg_",
|
|
30
|
+
"--transform-origin": "--transform-origin_uwwsc",
|
|
31
|
+
"_position_top": "_position_top_uwwsc_gg_",
|
|
32
|
+
"_position_bottom": "_position_bottom_uwwsc_gg_",
|
|
33
|
+
"_position_right": "_position_right_uwwsc_gg_",
|
|
34
|
+
"_position_left": "_position_left_uwwsc_gg_",
|
|
35
|
+
"__SBackground": "___SBackground_uwwsc_gg_",
|
|
36
|
+
"__SStripes": "___SStripes_uwwsc_gg_",
|
|
37
|
+
"--fill": "--fill_uwwsc",
|
|
38
|
+
"__SStripesPatternPath": "___SStripesPatternPath_uwwsc_gg_"
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
var side2direction = {
|