@semcore/d3-chart 17.0.0-prerelease.9 → 17.0.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 +20 -1
- package/lib/cjs/Area.js +11 -11
- package/lib/cjs/Axis.js +16 -16
- package/lib/cjs/Bar.js +16 -16
- package/lib/cjs/Bubble.js +20 -15
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/CompactHorizontalBar.js +16 -16
- package/lib/cjs/Donut.js +9 -9
- package/lib/cjs/Dots.js +8 -8
- package/lib/cjs/HorizontalBar.js +16 -16
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +9 -9
- package/lib/cjs/Plot.js +2 -2
- package/lib/cjs/Radar.js +19 -19
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/Reference.js +12 -12
- package/lib/cjs/ScatterPlot.js +9 -9
- package/lib/cjs/Tooltip.js +9 -9
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +7 -7
- package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
- package/lib/cjs/component/Chart/AbstractChart.js +9 -21
- package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.js +197 -57
- package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/cjs/component/Chart/CigaretteChart.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/style/bubble.shadow.css +4 -0
- package/lib/cjs/utils.js +3 -2
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +11 -11
- package/lib/es6/Axis.js +16 -16
- package/lib/es6/Bar.js +16 -16
- package/lib/es6/Bubble.js +20 -15
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/CompactHorizontalBar.js +16 -16
- package/lib/es6/Donut.js +9 -9
- package/lib/es6/Dots.js +8 -8
- package/lib/es6/HorizontalBar.js +16 -16
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +9 -9
- package/lib/es6/Plot.js +2 -2
- package/lib/es6/Radar.js +19 -19
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/Reference.js +12 -12
- package/lib/es6/ScatterPlot.js +9 -9
- package/lib/es6/Tooltip.js +9 -9
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +6 -5
- package/lib/es6/a11y/PlotA11yView.js.map +1 -1
- package/lib/es6/component/Chart/AbstractChart.js +9 -21
- package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.js +199 -59
- package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
- package/lib/es6/component/Chart/CigaretteChart.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/style/bubble.shadow.css +4 -0
- package/lib/es6/utils.js +3 -2
- package/lib/es6/utils.js.map +1 -1
- package/lib/esm/AnimatedClipPath.mjs +1 -1
- package/lib/esm/Area.mjs +14 -14
- package/lib/esm/Axis.mjs +21 -23
- package/lib/esm/Bar.mjs +18 -18
- package/lib/esm/Bubble.mjs +24 -20
- package/lib/esm/CompactHorizontalBar.mjs +21 -20
- package/lib/esm/Donut.mjs +15 -13
- package/lib/esm/Dots.mjs +10 -10
- package/lib/esm/HorizontalBar.mjs +18 -18
- package/lib/esm/Hover.mjs +6 -6
- package/lib/esm/Line.mjs +12 -12
- package/lib/esm/Pattern.mjs +6 -7
- package/lib/esm/Plot.mjs +6 -7
- package/lib/esm/Radar.mjs +27 -29
- package/lib/esm/RadialTree.mjs +30 -75
- package/lib/esm/Reference.mjs +13 -13
- package/lib/esm/ResponsiveContainer.mjs +3 -5
- package/lib/esm/ScatterPlot.mjs +12 -11
- package/lib/esm/StackBar.mjs +2 -2
- package/lib/esm/StackedArea.mjs +2 -2
- package/lib/esm/Tooltip.mjs +15 -17
- package/lib/esm/Venn.mjs +13 -12
- package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -4
- package/lib/esm/a11y/PlotA11yModule.mjs +5 -4
- package/lib/esm/a11y/PlotA11yView.mjs +14 -21
- package/lib/esm/a11y/focus.mjs +2 -2
- package/lib/esm/a11y/hints.mjs +3 -3
- package/lib/esm/a11y/insights.mjs +15 -20
- package/lib/esm/a11y/intl.mjs +1 -1
- package/lib/esm/a11y/locale.mjs +1 -2
- package/lib/esm/a11y/serialize.mjs +17 -17
- package/lib/esm/component/Chart/AbstractChart.mjs +25 -38
- package/lib/esm/component/Chart/AreaChart.mjs +5 -4
- package/lib/esm/component/Chart/BarChart.mjs +4 -3
- package/lib/esm/component/Chart/BubbleChart.mjs +8 -8
- package/lib/esm/component/Chart/CigaretteChart.mjs +204 -64
- package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
- package/lib/esm/component/Chart/DonutChart.mjs +3 -2
- package/lib/esm/component/Chart/HistogramChart.mjs +5 -4
- package/lib/esm/component/Chart/LineChart.mjs +5 -4
- package/lib/esm/component/Chart/RadarChart.mjs +4 -5
- package/lib/esm/component/Chart/ScatterPlotChart.mjs +3 -2
- package/lib/esm/component/Chart/VennChart.mjs +3 -3
- package/lib/esm/component/ChartLegend/BaseLegend.mjs +9 -14
- package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +6 -6
- package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +19 -19
- package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +9 -10
- package/lib/esm/component/ChartLegend/index.mjs +2 -0
- package/lib/esm/component/Cigarette/Cigarette.mjs +1 -2
- package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +2 -3
- package/lib/esm/createElement.mjs +1 -1
- package/lib/esm/index.mjs +1 -0
- package/lib/esm/style/bubble.shadow.css +4 -0
- package/lib/esm/utils.mjs +3 -3
- package/lib/types/a11y/PlotA11yView.d.ts +1 -1
- package/lib/types/component/Chart/AbstractChart.d.ts +4 -7
- package/lib/types/component/Chart/CigaretteChart.type.d.ts +7 -4
- package/package.json +17 -17
package/lib/esm/Bar.mjs
CHANGED
|
@@ -12,26 +12,26 @@ const style = (
|
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SBar_12z5v_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_12z5v);transition-timing-function:ease-in-out}.___SBar_12z5v_gg_.__color_12z5v_gg_{fill:var(--color_12z5v)}.___SBar_12z5v_gg_.__pattern_12z5v_gg_.__color_12z5v_gg_{fill:var(--pattern_12z5v);stroke:var(--color_12z5v);stroke-width:1px}.___SBar_12z5v_gg_.__hide_12z5v_gg_{display:none}.___SBar_12z5v_gg_.__transparent_12z5v_gg_{opacity:.3}.___SBackground_12z5v_gg_.__onClick_12z5v_gg_,.___SBar_12z5v_gg_.__onClick_12z5v_gg_{cursor:pointer}.___SBackground_12z5v_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_12z5v_gg_{display:flex;justify-content:space-between}.___SBarLabel_12z5v_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_12z5v_gg_,.___SBarPercent_12z5v_gg_,.___SBarValue_12z5v_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_12z5v_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_12z5v_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_12z5v_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"12z5v_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SBar": "
|
|
21
|
-
"--duration": "--
|
|
22
|
-
"_color": "
|
|
23
|
-
"--color": "--
|
|
24
|
-
"_pattern": "
|
|
25
|
-
"--pattern": "--
|
|
26
|
-
"_hide": "
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"_onClick": "
|
|
29
|
-
"__SBackground": "
|
|
30
|
-
"__SBarAnnotation": "
|
|
31
|
-
"__SBarLabel": "
|
|
32
|
-
"__SBarPercent": "
|
|
33
|
-
"__SBarValue": "
|
|
34
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
20
|
+
"__SBar": "___SBar_12z5v_gg_",
|
|
21
|
+
"--duration": "--duration_12z5v",
|
|
22
|
+
"_color": "__color_12z5v_gg_",
|
|
23
|
+
"--color": "--color_12z5v",
|
|
24
|
+
"_pattern": "__pattern_12z5v_gg_",
|
|
25
|
+
"--pattern": "--pattern_12z5v",
|
|
26
|
+
"_hide": "__hide_12z5v_gg_",
|
|
27
|
+
"_transparent": "__transparent_12z5v_gg_",
|
|
28
|
+
"_onClick": "__onClick_12z5v_gg_",
|
|
29
|
+
"__SBackground": "___SBackground_12z5v_gg_",
|
|
30
|
+
"__SBarAnnotation": "___SBarAnnotation_12z5v_gg_",
|
|
31
|
+
"__SBarLabel": "___SBarLabel_12z5v_gg_",
|
|
32
|
+
"__SBarPercent": "___SBarPercent_12z5v_gg_",
|
|
33
|
+
"__SBarValue": "___SBarValue_12z5v_gg_",
|
|
34
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_12z5v_gg_"
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
const MIN_HEIGHT = 2;
|
|
@@ -102,7 +102,7 @@ class BarRoot extends Component {
|
|
|
102
102
|
const width = Math.min(bandWidth, maxBarSize);
|
|
103
103
|
const barX = xScale(d[x]) + bandWidth / 2 - width / 2 + offset[0];
|
|
104
104
|
const barY = yScale(Math.max(d[y0] ?? 0, height <= hMin && d[y] > 0 ? 0 : d[y])) + offset[1] - calcPartBarY(d[y], hMin, height);
|
|
105
|
-
const handleClick = (event) => onClick
|
|
105
|
+
const handleClick = (event) => onClick?.(d, event, i, y);
|
|
106
106
|
const dSvg = getRect({
|
|
107
107
|
x: barX,
|
|
108
108
|
y: barY,
|
package/lib/esm/Bubble.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { sstyled,
|
|
2
|
+
import { sstyled, Component, assignProps } from "@semcore/core";
|
|
3
3
|
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
4
4
|
import findComponent from "@semcore/core/lib/utils/findComponent";
|
|
5
5
|
import uniqueIDEnhancement from "@semcore/core/lib/utils/uniqueID";
|
|
@@ -15,23 +15,24 @@ const style = (
|
|
|
15
15
|
/*__reshadow_css_start__*/
|
|
16
16
|
(sstyled.insert(
|
|
17
17
|
/*__inner_css_start__*/
|
|
18
|
-
".
|
|
18
|
+
".___SBubble_6mdvd_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_6mdvd);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SBubble_6mdvd_gg_:hover{opacity:.8}}g._visible_false_6mdvd_gg_{display:none}.___SBubble_6mdvd_gg_.__clickable_6mdvd_gg_{cursor:pointer}.___SBubble_6mdvd_gg_.__color_6mdvd_gg_{fill:var(--color_6mdvd)}.___SBubble_6mdvd_gg_.__pattern_6mdvd_gg_.__color_6mdvd_gg_{fill:var(--pattern_6mdvd);stroke:var(--color_6mdvd);stroke-width:1px}.___SBubble_6mdvd_gg_.__transparent_6mdvd_gg_{opacity:.3}.___SCenter_6mdvd_gg_{text-anchor:middle;font-size:calc(var(--intergalactic-fs-100, 12px) - 1px);stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SCenter_6mdvd_gg_.__color_6mdvd_gg_{stroke:var(--color_6mdvd)}.___SCenter_6mdvd_gg_.__transparent_6mdvd_gg_{opacity:.3}.___SLabel_6mdvd_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLabel_6mdvd_gg_._position_right_6mdvd_gg_{text-anchor:end}.___SLabel_6mdvd_gg_._position_left_6mdvd_gg_{text-anchor:start}.___SLabel_6mdvd_gg_.__color_6mdvd_gg_{fill:var(--color_6mdvd)}.___SLabel_6mdvd_gg_.__transparent_6mdvd_gg_{opacity:.3}",
|
|
19
19
|
/*__inner_css_end__*/
|
|
20
|
-
"
|
|
20
|
+
"6mdvd_gg_"
|
|
21
21
|
), /*__reshadow_css_end__*/
|
|
22
22
|
{
|
|
23
|
-
"_visible_false": "
|
|
24
|
-
"__SBubble": "
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
23
|
+
"_visible_false": "_visible_false_6mdvd_gg_",
|
|
24
|
+
"__SBubble": "___SBubble_6mdvd_gg_",
|
|
25
|
+
"_clickable": "__clickable_6mdvd_gg_",
|
|
26
|
+
"_color": "__color_6mdvd_gg_",
|
|
27
|
+
"--color": "--color_6mdvd",
|
|
28
|
+
"_pattern": "__pattern_6mdvd_gg_",
|
|
29
|
+
"--pattern": "--pattern_6mdvd",
|
|
30
|
+
"_transparent": "__transparent_6mdvd_gg_",
|
|
31
|
+
"__SCenter": "___SCenter_6mdvd_gg_",
|
|
32
|
+
"__SLabel": "___SLabel_6mdvd_gg_",
|
|
33
|
+
"_position_right": "_position_right_6mdvd_gg_",
|
|
34
|
+
"_position_left": "_position_left_6mdvd_gg_",
|
|
35
|
+
"--duration": "--duration_6mdvd"
|
|
35
36
|
})
|
|
36
37
|
);
|
|
37
38
|
class BubbleRoot extends Component {
|
|
@@ -72,8 +73,7 @@ class BubbleRoot extends Component {
|
|
|
72
73
|
const selectRectNode = selectRect.node();
|
|
73
74
|
if (selectRectNode) {
|
|
74
75
|
selectRect.transition().duration(duration).attr("r", function(_, ind) {
|
|
75
|
-
|
|
76
|
-
return z((_a = data[ind]) == null ? void 0 : _a[value]);
|
|
76
|
+
return z(data[ind]?.[value]);
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -103,7 +103,7 @@ class BubbleRoot extends Component {
|
|
|
103
103
|
const {
|
|
104
104
|
onClick
|
|
105
105
|
} = this.asProps;
|
|
106
|
-
onClick
|
|
106
|
+
onClick?.(index, e);
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
getCircleProps() {
|
|
@@ -123,7 +123,8 @@ class BubbleRoot extends Component {
|
|
|
123
123
|
data,
|
|
124
124
|
transparent,
|
|
125
125
|
resolveColor,
|
|
126
|
-
patterns
|
|
126
|
+
patterns,
|
|
127
|
+
onClick
|
|
127
128
|
} = this.asProps;
|
|
128
129
|
return {
|
|
129
130
|
color,
|
|
@@ -143,6 +144,7 @@ class BubbleRoot extends Component {
|
|
|
143
144
|
resolveColor,
|
|
144
145
|
patterns,
|
|
145
146
|
bindHandlerTooltip: this.bindHandlerTooltip,
|
|
147
|
+
clickable: Boolean(onClick),
|
|
146
148
|
onClickCircleRoot: this.handlerOnClick.bind(this)
|
|
147
149
|
};
|
|
148
150
|
}
|
|
@@ -218,6 +220,7 @@ function BubbleCircle(props) {
|
|
|
218
220
|
bindHandlerTooltip,
|
|
219
221
|
Element,
|
|
220
222
|
visible = true,
|
|
223
|
+
clickable,
|
|
221
224
|
onClick,
|
|
222
225
|
onClickCircleRoot
|
|
223
226
|
} = props;
|
|
@@ -269,7 +272,8 @@ function BubbleCircle(props) {
|
|
|
269
272
|
"pattern": patterns ? `url(#${uid}-${index}-pattern)` : void 0,
|
|
270
273
|
"r": z(circleData[value]),
|
|
271
274
|
"use:duration": `${duration}ms`,
|
|
272
|
-
"transparent": transparent
|
|
275
|
+
"transparent": transparent,
|
|
276
|
+
"clickable": clickable || Boolean(onClick)
|
|
273
277
|
})), patterns && /* @__PURE__ */ React.createElement(PatternFill, _ref3.cn("PatternFill", {
|
|
274
278
|
"id": `${uid}-${index}-pattern`,
|
|
275
279
|
"patternKey": circleData[color],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { sstyled,
|
|
2
|
+
import { sstyled, Component, assignProps } from "@semcore/core";
|
|
3
3
|
import { Box } from "@semcore/base-components";
|
|
4
4
|
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
5
5
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
@@ -10,32 +10,32 @@ import AnimatedClipPath from "./AnimatedClipPath.mjs";
|
|
|
10
10
|
import createElement from "./createElement.mjs";
|
|
11
11
|
import { PatternFill } from "./Pattern.mjs";
|
|
12
12
|
import Tooltip from "./Tooltip.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { scaleToBand, roundedPath, eventToPoint } from "./utils.mjs";
|
|
14
14
|
/*!__reshadow-styles__:"./style/bar.shadow.css"*/
|
|
15
15
|
const style = (
|
|
16
16
|
/*__reshadow_css_start__*/
|
|
17
17
|
(sstyled.insert(
|
|
18
18
|
/*__inner_css_start__*/
|
|
19
|
-
".
|
|
19
|
+
".___SBar_12z5v_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_12z5v);transition-timing-function:ease-in-out}.___SBar_12z5v_gg_.__color_12z5v_gg_{fill:var(--color_12z5v)}.___SBar_12z5v_gg_.__pattern_12z5v_gg_.__color_12z5v_gg_{fill:var(--pattern_12z5v);stroke:var(--color_12z5v);stroke-width:1px}.___SBar_12z5v_gg_.__hide_12z5v_gg_{display:none}.___SBar_12z5v_gg_.__transparent_12z5v_gg_{opacity:.3}.___SBackground_12z5v_gg_.__onClick_12z5v_gg_,.___SBar_12z5v_gg_.__onClick_12z5v_gg_{cursor:pointer}.___SBackground_12z5v_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_12z5v_gg_{display:flex;justify-content:space-between}.___SBarLabel_12z5v_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_12z5v_gg_,.___SBarPercent_12z5v_gg_,.___SBarValue_12z5v_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_12z5v_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_12z5v_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_12z5v_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
20
20
|
/*__inner_css_end__*/
|
|
21
|
-
"
|
|
21
|
+
"12z5v_gg_"
|
|
22
22
|
), /*__reshadow_css_end__*/
|
|
23
23
|
{
|
|
24
|
-
"__SBar": "
|
|
25
|
-
"--duration": "--
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_hide": "
|
|
31
|
-
"_transparent": "
|
|
32
|
-
"_onClick": "
|
|
33
|
-
"__SBackground": "
|
|
34
|
-
"__SBarAnnotation": "
|
|
35
|
-
"__SBarLabel": "
|
|
36
|
-
"__SBarPercent": "
|
|
37
|
-
"__SBarValue": "
|
|
38
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
24
|
+
"__SBar": "___SBar_12z5v_gg_",
|
|
25
|
+
"--duration": "--duration_12z5v",
|
|
26
|
+
"_color": "__color_12z5v_gg_",
|
|
27
|
+
"--color": "--color_12z5v",
|
|
28
|
+
"_pattern": "__pattern_12z5v_gg_",
|
|
29
|
+
"--pattern": "--pattern_12z5v",
|
|
30
|
+
"_hide": "__hide_12z5v_gg_",
|
|
31
|
+
"_transparent": "__transparent_12z5v_gg_",
|
|
32
|
+
"_onClick": "__onClick_12z5v_gg_",
|
|
33
|
+
"__SBackground": "___SBackground_12z5v_gg_",
|
|
34
|
+
"__SBarAnnotation": "___SBarAnnotation_12z5v_gg_",
|
|
35
|
+
"__SBarLabel": "___SBarLabel_12z5v_gg_",
|
|
36
|
+
"__SBarPercent": "___SBarPercent_12z5v_gg_",
|
|
37
|
+
"__SBarValue": "___SBarValue_12z5v_gg_",
|
|
38
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_12z5v_gg_"
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
const MIN_WIDTH = 4;
|
|
@@ -334,7 +334,7 @@ function Bar(props) {
|
|
|
334
334
|
hide
|
|
335
335
|
} = props;
|
|
336
336
|
const onClickHandler = React.useCallback((event) => {
|
|
337
|
-
onClick
|
|
337
|
+
onClick?.(index, event);
|
|
338
338
|
}, [onClick, index]);
|
|
339
339
|
const contextValue = React.useMemo(() => ({
|
|
340
340
|
onClick: onClickHandler,
|
|
@@ -552,6 +552,7 @@ function CompactHorizontalBarTooltip(props) {
|
|
|
552
552
|
}, _ref4)
|
|
553
553
|
}));
|
|
554
554
|
}
|
|
555
|
+
;
|
|
555
556
|
const CompactHorizontalBar = createElement(CompactHorizontalBarRoot, {
|
|
556
557
|
Annotation,
|
|
557
558
|
Label,
|
package/lib/esm/Donut.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { sstyled,
|
|
2
|
+
import { sstyled, Component, assignProps } from "@semcore/core";
|
|
3
3
|
import { callAllEventHandlers } from "@semcore/core/lib/utils/assignProps";
|
|
4
4
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
5
5
|
import getOriginChildren from "@semcore/core/lib/utils/getOriginChildren";
|
|
@@ -17,22 +17,22 @@ const style = (
|
|
|
17
17
|
/*__reshadow_css_start__*/
|
|
18
18
|
(sstyled.insert(
|
|
19
19
|
/*__inner_css_start__*/
|
|
20
|
-
".
|
|
20
|
+
".___SPie_1nttx_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SPie_1nttx_gg_.__color_1nttx_gg_{fill:var(--color_1nttx)}.___SPie_1nttx_gg_.__pattern_1nttx_gg_.__color_1nttx_gg_{fill:var(--pattern_1nttx);stroke:var(--color_1nttx);stroke-width:1px}.___SPie_1nttx_gg_.__transparent_1nttx_gg_{opacity:.3}.___SEmptyData_1nttx_gg_{fill:var(--intergalactic-chart-palette-order-null, #e0e1e9)}.___SEmptyData_1nttx_gg_.__color_1nttx_gg_{fill:var(--color_1nttx)}.___SLabel_1nttx_gg_{text-anchor:middle;vertical-anchor:middle;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}",
|
|
21
21
|
/*__inner_css_end__*/
|
|
22
|
-
"
|
|
22
|
+
"1nttx_gg_"
|
|
23
23
|
), /*__reshadow_css_end__*/
|
|
24
24
|
{
|
|
25
|
-
"__SPie": "
|
|
26
|
-
"_color": "
|
|
27
|
-
"--color": "--
|
|
28
|
-
"_pattern": "
|
|
29
|
-
"--pattern": "--
|
|
30
|
-
"_transparent": "
|
|
31
|
-
"__SEmptyData": "
|
|
32
|
-
"__SLabel": "
|
|
25
|
+
"__SPie": "___SPie_1nttx_gg_",
|
|
26
|
+
"_color": "__color_1nttx_gg_",
|
|
27
|
+
"--color": "--color_1nttx",
|
|
28
|
+
"_pattern": "__pattern_1nttx_gg_",
|
|
29
|
+
"--pattern": "--pattern_1nttx",
|
|
30
|
+
"_transparent": "__transparent_1nttx_gg_",
|
|
31
|
+
"__SEmptyData": "___SEmptyData_1nttx_gg_",
|
|
32
|
+
"__SLabel": "___SLabel_1nttx_gg_"
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
|
-
const DEFAULT_INSTANCE = Symbol("DEFAULT_INSTANCE");
|
|
35
|
+
const DEFAULT_INSTANCE = /* @__PURE__ */ Symbol("DEFAULT_INSTANCE");
|
|
36
36
|
function transitionAnglePie({
|
|
37
37
|
selector,
|
|
38
38
|
duration,
|
|
@@ -334,7 +334,8 @@ _defineProperty(DonutRoot, "defaultProps", ({
|
|
|
334
334
|
}) => {
|
|
335
335
|
const d3Arc = arc().outerRadius(outerRadius || getOuterRadius({
|
|
336
336
|
size,
|
|
337
|
-
halfsize
|
|
337
|
+
halfsize,
|
|
338
|
+
outerRadius
|
|
338
339
|
})).innerRadius(innerRadius).padAngle(paddingAngle);
|
|
339
340
|
const d3ArcOut = arc().outerRadius((outerRadius || getOuterRadius({
|
|
340
341
|
size,
|
|
@@ -463,6 +464,7 @@ function DonutTooltip(props) {
|
|
|
463
464
|
}, _ref)
|
|
464
465
|
}));
|
|
465
466
|
}
|
|
467
|
+
;
|
|
466
468
|
const Donut = createElement(DonutRoot, {
|
|
467
469
|
Pie,
|
|
468
470
|
Label,
|
package/lib/esm/Dots.mjs
CHANGED
|
@@ -4,24 +4,24 @@ import { bisector } from "d3-array";
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import createElement from "./createElement.mjs";
|
|
6
6
|
import { getPatternSymbolSize, PatternSymbol } from "./Pattern.mjs";
|
|
7
|
-
import { interpolateValue, eventToPoint, invert
|
|
7
|
+
import { getChartDefaultColorName, interpolateValue, eventToPoint, invert } from "./utils.mjs";
|
|
8
8
|
/*!__reshadow-styles__:"./style/dot.shadow.css"*/
|
|
9
9
|
const style = (
|
|
10
10
|
/*__reshadow_css_start__*/
|
|
11
11
|
(sstyled.insert(
|
|
12
12
|
/*__inner_css_start__*/
|
|
13
|
-
".
|
|
13
|
+
".___SDots_a9v7p_gg_ .___SDot_a9v7p_gg_{transition-duration:var(--duration_a9v7p)}.___SDot_a9v7p_gg_{stroke-width:1px;stroke:var(--intergalactic-chart-grid-border, #ffffff);fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy,x,y;transition-timing-function:ease-in-out}.___SDot_a9v7p_gg_.__hide_a9v7p_gg_{display:none}.___SDot_a9v7p_gg_.__color_a9v7p_gg_{fill:var(--color_a9v7p)}.___SDot_a9v7p_gg_.__transparent_a9v7p_gg_{opacity:.3}",
|
|
14
14
|
/*__inner_css_end__*/
|
|
15
|
-
"
|
|
15
|
+
"a9v7p_gg_"
|
|
16
16
|
), /*__reshadow_css_end__*/
|
|
17
17
|
{
|
|
18
|
-
"__SDot": "
|
|
19
|
-
"_hide": "
|
|
20
|
-
"_color": "
|
|
21
|
-
"--color": "--
|
|
22
|
-
"_transparent": "
|
|
23
|
-
"__SDots": "
|
|
24
|
-
"--duration": "--
|
|
18
|
+
"__SDot": "___SDot_a9v7p_gg_",
|
|
19
|
+
"_hide": "__hide_a9v7p_gg_",
|
|
20
|
+
"_color": "__color_a9v7p_gg_",
|
|
21
|
+
"--color": "--color_a9v7p",
|
|
22
|
+
"_transparent": "__transparent_a9v7p_gg_",
|
|
23
|
+
"__SDots": "___SDots_a9v7p_gg_",
|
|
24
|
+
"--duration": "--duration_a9v7p"
|
|
25
25
|
})
|
|
26
26
|
);
|
|
27
27
|
function Dots(props) {
|
|
@@ -11,26 +11,26 @@ const style = (
|
|
|
11
11
|
/*__reshadow_css_start__*/
|
|
12
12
|
(sstyled.insert(
|
|
13
13
|
/*__inner_css_start__*/
|
|
14
|
-
".
|
|
14
|
+
".___SBar_12z5v_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:height,width,y;transition-duration:var(--duration_12z5v);transition-timing-function:ease-in-out}.___SBar_12z5v_gg_.__color_12z5v_gg_{fill:var(--color_12z5v)}.___SBar_12z5v_gg_.__pattern_12z5v_gg_.__color_12z5v_gg_{fill:var(--pattern_12z5v);stroke:var(--color_12z5v);stroke-width:1px}.___SBar_12z5v_gg_.__hide_12z5v_gg_{display:none}.___SBar_12z5v_gg_.__transparent_12z5v_gg_{opacity:.3}.___SBackground_12z5v_gg_.__onClick_12z5v_gg_,.___SBar_12z5v_gg_.__onClick_12z5v_gg_{cursor:pointer}.___SBackground_12z5v_gg_{fill:var(--intergalactic-chart-grid-bar-chart-base-bg, #e0e1e9)}.___SBarAnnotation_12z5v_gg_{display:flex;justify-content:space-between}.___SBarLabel_12z5v_gg_{color:var(--intergalactic-text-primary, #191b23);margin-right:auto}.___SBarLabel_12z5v_gg_,.___SBarPercent_12z5v_gg_,.___SBarValue_12z5v_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBarPercent_12z5v_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SBarValue_12z5v_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary, #191b23);text-align:right}.___SCompactHorizontalBarHoverRect_12z5v_gg_{fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
15
15
|
/*__inner_css_end__*/
|
|
16
|
-
"
|
|
16
|
+
"12z5v_gg_"
|
|
17
17
|
), /*__reshadow_css_end__*/
|
|
18
18
|
{
|
|
19
|
-
"__SBar": "
|
|
20
|
-
"--duration": "--
|
|
21
|
-
"_color": "
|
|
22
|
-
"--color": "--
|
|
23
|
-
"_pattern": "
|
|
24
|
-
"--pattern": "--
|
|
25
|
-
"_hide": "
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"_onClick": "
|
|
28
|
-
"__SBackground": "
|
|
29
|
-
"__SBarAnnotation": "
|
|
30
|
-
"__SBarLabel": "
|
|
31
|
-
"__SBarPercent": "
|
|
32
|
-
"__SBarValue": "
|
|
33
|
-
"__SCompactHorizontalBarHoverRect": "
|
|
19
|
+
"__SBar": "___SBar_12z5v_gg_",
|
|
20
|
+
"--duration": "--duration_12z5v",
|
|
21
|
+
"_color": "__color_12z5v_gg_",
|
|
22
|
+
"--color": "--color_12z5v",
|
|
23
|
+
"_pattern": "__pattern_12z5v_gg_",
|
|
24
|
+
"--pattern": "--pattern_12z5v",
|
|
25
|
+
"_hide": "__hide_12z5v_gg_",
|
|
26
|
+
"_transparent": "__transparent_12z5v_gg_",
|
|
27
|
+
"_onClick": "__onClick_12z5v_gg_",
|
|
28
|
+
"__SBackground": "___SBackground_12z5v_gg_",
|
|
29
|
+
"__SBarAnnotation": "___SBarAnnotation_12z5v_gg_",
|
|
30
|
+
"__SBarLabel": "___SBarLabel_12z5v_gg_",
|
|
31
|
+
"__SBarPercent": "___SBarPercent_12z5v_gg_",
|
|
32
|
+
"__SBarValue": "___SBarValue_12z5v_gg_",
|
|
33
|
+
"__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_12z5v_gg_"
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
36
|
const MIN_WIDTH = 2;
|
|
@@ -85,7 +85,7 @@ class HorizontalBarRoot extends Component {
|
|
|
85
85
|
const width = Number(d[x] - (d[x0] ?? 0)) === 0 ? 0 : Math.max(absWidth, wMin);
|
|
86
86
|
const barY = yScale(d[y]) + bandHeight / 2 - height / 2 + offset[1];
|
|
87
87
|
const barX = xScale(Math.min(d[x0] ?? 0, width <= wMin && d[x] < 0 ? 0 : d[x])) + offset[0] - calcPartBarX(d[x], wMin, width);
|
|
88
|
-
const handleClick = (event) => onClick
|
|
88
|
+
const handleClick = (event) => onClick?.(d, event, i, x);
|
|
89
89
|
const dSvg = getHorizontalRect({
|
|
90
90
|
x: barX,
|
|
91
91
|
y: barY,
|
package/lib/esm/Hover.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import { sstyled,
|
|
2
|
+
import { sstyled, Component, assignProps } from "@semcore/core";
|
|
3
3
|
import canUseDOM from "@semcore/core/lib/utils/canUseDOM";
|
|
4
4
|
import { hasParent } from "@semcore/core/lib/utils/hasParent";
|
|
5
5
|
import trottle from "@semcore/core/lib/utils/rafTrottle";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import createElement from "./createElement.mjs";
|
|
8
8
|
import Tooltip from "./Tooltip.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { eventToPoint, invert, getIndexFromData, scaleOfBandwidth, scaleToBand } from "./utils.mjs";
|
|
10
10
|
/*!__reshadow-styles__:"./style/hover.shadow.css"*/
|
|
11
11
|
const style = (
|
|
12
12
|
/*__reshadow_css_start__*/
|
|
13
13
|
(sstyled.insert(
|
|
14
14
|
/*__inner_css_start__*/
|
|
15
|
-
".
|
|
15
|
+
".___SHoverLine_1hwe4_gg_,.___SHoverLine_1hwe4_gg_:focus-visible{outline:0;stroke:var(--intergalactic-chart-grid-x-axis, #c4c7cf)}.___SHoverRect_1hwe4_gg_,.___SHoverRect_1hwe4_gg_:focus-visible{outline:0;fill:var(--intergalactic-chart-grid-bar-chart-hover, rgba(196, 199, 207, 0.3))}",
|
|
16
16
|
/*__inner_css_end__*/
|
|
17
|
-
"
|
|
17
|
+
"1hwe4_gg_"
|
|
18
18
|
), /*__reshadow_css_end__*/
|
|
19
19
|
{
|
|
20
|
-
"__SHoverLine": "
|
|
21
|
-
"__SHoverRect": "
|
|
20
|
+
"__SHoverLine": "___SHoverLine_1hwe4_gg_",
|
|
21
|
+
"__SHoverRect": "___SHoverRect_1hwe4_gg_"
|
|
22
22
|
})
|
|
23
23
|
);
|
|
24
24
|
class Hover extends Component {
|
package/lib/esm/Line.mjs
CHANGED
|
@@ -2,31 +2,31 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
2
2
|
import { sstyled, Component } from "@semcore/core";
|
|
3
3
|
import uniqueIDEnhancement, { useUID } from "@semcore/core/lib/utils/uniqueID";
|
|
4
4
|
import { bisector } from "d3-array";
|
|
5
|
-
import {
|
|
5
|
+
import { line, curveLinear, curveCardinal, area } from "d3-shape";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import AnimatedClipPath from "./AnimatedClipPath.mjs";
|
|
8
8
|
import createElement from "./createElement.mjs";
|
|
9
9
|
import Dots from "./Dots.mjs";
|
|
10
10
|
import { resolvePatternDasharray } from "./Pattern.mjs";
|
|
11
|
-
import { interpolateValue,
|
|
11
|
+
import { interpolateValue, getNullData, definedNullData, eventToPoint, invert, getChartDefaultColorName, definedData, scaleOfBandwidth } from "./utils.mjs";
|
|
12
12
|
/*!__reshadow-styles__:"./style/line.shadow.css"*/
|
|
13
13
|
const style = (
|
|
14
14
|
/*__reshadow_css_start__*/
|
|
15
15
|
(sstyled.insert(
|
|
16
16
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
17
|
+
".___SLine_1r87s_gg_{fill:transparent;stroke-width:3;stroke:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:d;transition-duration:var(--duration_1r87s);transition-timing-function:ease-in-out}.___SLine_1r87s_gg_.__color_1r87s_gg_{stroke:var(--color_1r87s)}.___SLine_1r87s_gg_.__hide_1r87s_gg_{display:none}.___SLine_1r87s_gg_.__transparent_1r87s_gg_{opacity:.3}.___SNull_1r87s_gg_{fill:transparent;stroke:var(--intergalactic-border-primary, #c4c7cf);stroke-dasharray:4}.___SNull_1r87s_gg_.__hide_1r87s_gg_{display:none}.___SLineArea_1r87s_gg_{transition-property:d;transition-duration:var(--duration_1r87s);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1, #2bb3ff)}.___SLineArea_1r87s_gg_.__color_1r87s_gg_{fill:var(--color_1r87s)}",
|
|
18
18
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
19
|
+
"1r87s_gg_"
|
|
20
20
|
), /*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SLine": "
|
|
23
|
-
"--duration": "--
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"_hide": "
|
|
27
|
-
"_transparent": "
|
|
28
|
-
"__SNull": "
|
|
29
|
-
"__SLineArea": "
|
|
22
|
+
"__SLine": "___SLine_1r87s_gg_",
|
|
23
|
+
"--duration": "--duration_1r87s",
|
|
24
|
+
"_color": "__color_1r87s_gg_",
|
|
25
|
+
"--color": "--color_1r87s",
|
|
26
|
+
"_hide": "__hide_1r87s_gg_",
|
|
27
|
+
"_transparent": "__transparent_1r87s_gg_",
|
|
28
|
+
"__SNull": "___SNull_1r87s_gg_",
|
|
29
|
+
"__SLineArea": "___SLineArea_1r87s_gg_"
|
|
30
30
|
})
|
|
31
31
|
);
|
|
32
32
|
class LineRoot extends Component {
|
package/lib/esm/Pattern.mjs
CHANGED
|
@@ -483,9 +483,8 @@ const getPatternSymbolSize = ({
|
|
|
483
483
|
patternKey,
|
|
484
484
|
patterns
|
|
485
485
|
}) => {
|
|
486
|
-
var _a;
|
|
487
486
|
const patternData = resolvePattern(patternKey, patterns);
|
|
488
|
-
if (!
|
|
487
|
+
if (!patternData?.symbol?.size) return [10, 10];
|
|
489
488
|
return patternData.symbol.size;
|
|
490
489
|
};
|
|
491
490
|
const PatternSymbol = ({
|
|
@@ -496,10 +495,10 @@ const PatternSymbol = ({
|
|
|
496
495
|
}) => {
|
|
497
496
|
const DefaultSymbol = React.useMemo(() => {
|
|
498
497
|
const patternData = resolvePattern(patternKey, patterns);
|
|
499
|
-
const children = patternData
|
|
500
|
-
const viewBox = patternData
|
|
501
|
-
const width = patternData
|
|
502
|
-
const height = patternData
|
|
498
|
+
const children = patternData?.symbol.children;
|
|
499
|
+
const viewBox = patternData?.symbol.viewBox;
|
|
500
|
+
const width = patternData?.symbol.size[0];
|
|
501
|
+
const height = patternData?.symbol.size[1];
|
|
503
502
|
return (props2) => /* @__PURE__ */ React.createElement("svg", _extends({
|
|
504
503
|
fill: color,
|
|
505
504
|
x: "0",
|
|
@@ -516,7 +515,7 @@ const PatternSymbol = ({
|
|
|
516
515
|
};
|
|
517
516
|
const resolvePatternDasharray = (patternKey, patterns) => {
|
|
518
517
|
const pattern = resolvePattern(patternKey, patterns);
|
|
519
|
-
return pattern
|
|
518
|
+
return pattern?.dasharray;
|
|
520
519
|
};
|
|
521
520
|
export {
|
|
522
521
|
PatternFill,
|
package/lib/esm/Plot.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import {
|
|
2
|
+
import { sstyled, Component, assignProps, createComponent } from "@semcore/core";
|
|
3
3
|
import { Box } from "@semcore/base-components";
|
|
4
4
|
import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
|
|
5
5
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
@@ -14,12 +14,12 @@ const style = (
|
|
|
14
14
|
/*__reshadow_css_start__*/
|
|
15
15
|
(sstyled.insert(
|
|
16
16
|
/*__inner_css_start__*/
|
|
17
|
-
".
|
|
17
|
+
".___SPlot_l2at0_gg_{overflow:hidden}.___SPlot_l2at0_gg_:focus{outline:0}.___SPlot_l2at0_gg_:active{outline:0;-webkit-text-decoration:none;text-decoration:none}foreignObject[data-aria-only]{pointer-events:none}.___SPlot_l2at0_gg_:has(foreignObject[data-aria-only]:focus-within){outline-color:var(--intergalactic-keyboard-focus-outline, #008ff8);outline-style:solid;outline-width:2px;outline-offset:2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset;border-radius:var(--intergalactic-surface-rounded, 6px)}",
|
|
18
18
|
/*__inner_css_end__*/
|
|
19
|
-
"
|
|
19
|
+
"l2at0_gg_"
|
|
20
20
|
), /*__reshadow_css_end__*/
|
|
21
21
|
{
|
|
22
|
-
"__SPlot": "
|
|
22
|
+
"__SPlot": "___SPlot_l2at0_gg_"
|
|
23
23
|
})
|
|
24
24
|
);
|
|
25
25
|
class PlotRoot extends Component {
|
|
@@ -53,7 +53,6 @@ class PlotRoot extends Component {
|
|
|
53
53
|
this.eventEmitter = props.eventEmitter || new EventEmitter();
|
|
54
54
|
}
|
|
55
55
|
setContext() {
|
|
56
|
-
var _a, _b;
|
|
57
56
|
const {
|
|
58
57
|
scale,
|
|
59
58
|
data,
|
|
@@ -64,8 +63,8 @@ class PlotRoot extends Component {
|
|
|
64
63
|
patterns,
|
|
65
64
|
duration
|
|
66
65
|
} = this.asProps;
|
|
67
|
-
const yScaleDomain =
|
|
68
|
-
if (
|
|
66
|
+
const yScaleDomain = scale?.[1]?.domain?.();
|
|
67
|
+
if (yScaleDomain?.length && data?.length) {
|
|
69
68
|
this.dataHintsHandler.setPointsDensity(data.length / width, Math.abs(yScaleDomain[1] - yScaleDomain[0]) / height);
|
|
70
69
|
}
|
|
71
70
|
return {
|