@alfalab/core-components-chart 3.1.0 → 3.1.2
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/Component.js +18 -21
- package/components/Dot/index.css +8 -8
- package/components/Dot/index.js +1 -1
- package/components/Legends/index.css +8 -8
- package/components/Legends/index.d.ts +1 -1
- package/components/Legends/index.js +3 -2
- package/components/LinearGradient.d.ts +1 -1
- package/components/RectBar.js +2 -7
- package/components/Tick/index.css +4 -4
- package/components/Tick/index.js +2 -4
- package/components/TooltipContent/index.css +7 -7
- package/components/TooltipContent/index.js +1 -1
- package/cssm/Component.js +20 -23
- package/cssm/components/Legends/index.d.ts +1 -1
- package/cssm/components/Legends/index.js +2 -1
- package/cssm/components/LinearGradient.d.ts +1 -1
- package/cssm/components/RectBar.js +2 -7
- package/cssm/components/Tick/index.js +1 -3
- package/cssm/hooks/useSettings/index.d.ts +14 -11
- package/cssm/hooks/useSettings/index.js +1 -1
- package/cssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +2 -2
- package/cssm/hooks/useSettings/utils/setComposedChartsMargin.js +2 -2
- package/cssm/hooks/useSettings/utils/setDatas.d.ts +2 -3
- package/cssm/hooks/useSettings/utils/setDatas.js +2 -2
- package/cssm/hooks/useSettings/utils/setGradientCharts.js +1 -1
- package/cssm/hooks/useSettings/utils/setLegendMargin.d.ts +1 -1
- package/cssm/icons/CircleLine.d.ts +1 -1
- package/cssm/index.js +14 -14
- package/cssm/{tslib.es6-2be2aee7.d.ts → tslib.es6-0de342ae.d.ts} +8 -4
- package/{tslib.es6-e232afa5.js → cssm/tslib.es6-0de342ae.js} +1 -1
- package/cssm/types/chart.types.d.ts +1 -1
- package/cssm/types/options.types.d.ts +2 -2
- package/cssm/types/seria.types.d.ts +2 -2
- package/cssm/types/tooltip.types.d.ts +1 -1
- package/esm/Component.js +18 -21
- package/esm/components/Dot/index.css +8 -8
- package/esm/components/Dot/index.js +1 -1
- package/esm/components/Legends/index.css +8 -8
- package/esm/components/Legends/index.d.ts +1 -1
- package/esm/components/Legends/index.js +3 -2
- package/esm/components/LinearGradient.d.ts +1 -1
- package/esm/components/RectBar.js +2 -7
- package/esm/components/Tick/index.css +4 -4
- package/esm/components/Tick/index.js +2 -4
- package/esm/components/TooltipContent/index.css +7 -7
- package/esm/components/TooltipContent/index.js +1 -1
- package/esm/hooks/useSettings/index.d.ts +14 -11
- package/esm/hooks/useSettings/index.js +1 -1
- package/esm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +2 -2
- package/esm/hooks/useSettings/utils/setComposedChartsMargin.js +2 -2
- package/esm/hooks/useSettings/utils/setDatas.d.ts +2 -3
- package/esm/hooks/useSettings/utils/setDatas.js +2 -2
- package/esm/hooks/useSettings/utils/setGradientCharts.js +1 -1
- package/esm/hooks/useSettings/utils/setLegendMargin.d.ts +1 -1
- package/esm/icons/CircleLine.d.ts +1 -1
- package/esm/index.css +5 -5
- package/esm/index.js +11 -11
- package/{tslib.es6-e232afa5.d.ts → esm/tslib.es6-efd85325.d.ts} +8 -4
- package/esm/{tslib.es6-f1220da2.js → tslib.es6-efd85325.js} +1 -1
- package/esm/types/chart.types.d.ts +1 -1
- package/esm/types/options.types.d.ts +2 -2
- package/esm/types/seria.types.d.ts +2 -2
- package/esm/types/tooltip.types.d.ts +1 -1
- package/hooks/useSettings/index.d.ts +14 -11
- package/hooks/useSettings/index.js +1 -1
- package/hooks/useSettings/utils/setComposedChartsMargin.d.ts +2 -2
- package/hooks/useSettings/utils/setComposedChartsMargin.js +2 -2
- package/hooks/useSettings/utils/setDatas.d.ts +2 -3
- package/hooks/useSettings/utils/setDatas.js +2 -2
- package/hooks/useSettings/utils/setGradientCharts.js +1 -1
- package/hooks/useSettings/utils/setLegendMargin.d.ts +1 -1
- package/icons/CircleLine.d.ts +1 -1
- package/index.css +5 -5
- package/index.js +11 -11
- package/modern/Component.js +31 -35
- package/modern/components/Dot/index.css +8 -8
- package/modern/components/Dot/index.js +2 -2
- package/modern/components/Legends/index.css +8 -8
- package/modern/components/Legends/index.d.ts +1 -1
- package/modern/components/Legends/index.js +1 -1
- package/modern/components/LinearGradient.d.ts +1 -1
- package/modern/components/LinearGradient.js +1 -3
- package/modern/components/RectBar.js +3 -8
- package/modern/components/Tick/index.css +4 -4
- package/modern/components/Tick/index.js +2 -4
- package/modern/components/TooltipContent/index.css +7 -7
- package/modern/components/TooltipContent/index.js +1 -1
- package/modern/hooks/useSettings/index.d.ts +14 -11
- package/modern/hooks/useSettings/utils/setComposedChartsMargin.d.ts +2 -2
- package/modern/hooks/useSettings/utils/setComposedChartsMargin.js +10 -12
- package/modern/hooks/useSettings/utils/setDatas.d.ts +2 -3
- package/modern/hooks/useSettings/utils/setDatas.js +1 -1
- package/modern/hooks/useSettings/utils/setGradientCharts.js +1 -1
- package/modern/hooks/useSettings/utils/setLegendMargin.d.ts +1 -1
- package/modern/hooks/useSettings/utils/sortByIndex.js +6 -8
- package/modern/icons/Circle.js +2 -4
- package/modern/icons/CircleLine.d.ts +1 -1
- package/modern/icons/CircleLine.js +3 -5
- package/modern/icons/FilledCircle.js +6 -8
- package/modern/icons/StrokeCircle.js +2 -4
- package/modern/index.css +5 -5
- package/modern/index.js +10 -10
- package/modern/types/chart.types.d.ts +1 -1
- package/modern/types/options.types.d.ts +2 -2
- package/modern/types/seria.types.d.ts +2 -2
- package/modern/types/tooltip.types.d.ts +1 -1
- package/package.json +2 -2
- package/send-stats.js +1 -1
- package/{esm/tslib.es6-f1220da2.d.ts → tslib.es6-806ac05c.d.ts} +8 -4
- package/{cssm/tslib.es6-2be2aee7.js → tslib.es6-806ac05c.js} +1 -1
- package/types/chart.types.d.ts +1 -1
- package/types/options.types.d.ts +2 -2
- package/types/seria.types.d.ts +2 -2
- package/types/tooltip.types.d.ts +1 -1
package/Component.js
CHANGED
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-806ac05c.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var recharts = require('recharts');
|
|
9
|
-
|
|
9
|
+
require('./hooks/usePathBar/utils/getRadius.js');
|
|
10
|
+
require('./hooks/usePathBar/index.js');
|
|
11
|
+
var components_CustomizedLabel = require('./components/CustomizedLabel.js');
|
|
12
|
+
require('./icons/Point.js');
|
|
13
|
+
var components_Dot_index = require('./components/Dot/index.js');
|
|
10
14
|
require('@alfalab/core-components-typography');
|
|
11
15
|
require('./icons/Circle.js');
|
|
12
16
|
require('./icons/CircleLine.js');
|
|
13
17
|
require('./icons/FilledCircle.js');
|
|
14
18
|
require('./icons/StrokeCircle.js');
|
|
15
19
|
var components_Legends_index = require('./components/Legends/index.js');
|
|
16
|
-
require('./
|
|
17
|
-
var
|
|
20
|
+
var components_LinearGradient = require('./components/LinearGradient.js');
|
|
21
|
+
var components_RectBar = require('./components/RectBar.js');
|
|
22
|
+
var components_Tick_index = require('./components/Tick/index.js');
|
|
23
|
+
var components_TooltipContent_index = require('./components/TooltipContent/index.js');
|
|
18
24
|
require('./hooks/useSettings/utils/setComposedChartsMargin.js');
|
|
19
25
|
require('./hooks/useSettings/utils/setDatas.js');
|
|
20
26
|
require('./hooks/useSettings/utils/setGradientCharts.js');
|
|
21
27
|
require('./hooks/useSettings/utils/setLegendMargin.js');
|
|
22
28
|
require('./hooks/useSettings/utils/sortByIndex.js');
|
|
23
29
|
var hooks_useSettings_index = require('./hooks/useSettings/index.js');
|
|
24
|
-
require('./hooks/usePathBar/utils/getRadius.js');
|
|
25
|
-
require('./hooks/usePathBar/index.js');
|
|
26
|
-
var components_CustomizedLabel = require('./components/CustomizedLabel.js');
|
|
27
|
-
var components_RectBar = require('./components/RectBar.js');
|
|
28
|
-
var components_Tick_index = require('./components/Tick/index.js');
|
|
29
|
-
var components_TooltipContent_index = require('./components/TooltipContent/index.js');
|
|
30
30
|
|
|
31
31
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
32
32
|
|
|
@@ -34,13 +34,11 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
34
34
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
35
35
|
|
|
36
36
|
var CustomizedHOC = function (Component, options) {
|
|
37
|
-
var NewComponent = function (props) {
|
|
38
|
-
return React__default['default'].createElement(Component, tslib_es6.__assign({}, props, options));
|
|
39
|
-
};
|
|
37
|
+
var NewComponent = function (props) { return React__default['default'].createElement(Component, tslib_es6.__assign({}, props, options)); };
|
|
40
38
|
return NewComponent;
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
var styles = {"coreChart":"
|
|
41
|
+
var styles = {"coreChart":"chart__coreChart_tioz0","bar":"chart__bar_tioz0","unfocused":"chart__unfocused_tioz0"};
|
|
44
42
|
require('./index.css')
|
|
45
43
|
|
|
46
44
|
var Chart = function (props) {
|
|
@@ -177,7 +175,8 @@ var Chart = function (props) {
|
|
|
177
175
|
? CustomizedHOC(components_Dot_index.Dot, {
|
|
178
176
|
activeDot: activeDotsState.active,
|
|
179
177
|
dotSettings: properties.dotSettings,
|
|
180
|
-
inherit: (properties === null || properties === void 0 ? void 0 : properties.inheritStroke)
|
|
178
|
+
inherit: (properties === null || properties === void 0 ? void 0 : properties.inheritStroke)
|
|
179
|
+
? properties.inheritStroke
|
|
181
180
|
: false,
|
|
182
181
|
})
|
|
183
182
|
: false, activeDot: false }))) : null;
|
|
@@ -244,12 +243,10 @@ var Chart = function (props) {
|
|
|
244
243
|
});
|
|
245
244
|
}
|
|
246
245
|
if (typeof activeTooltipIndex === 'number' && typeof activeDotsState.prev === 'number') {
|
|
247
|
-
setActiveDotsState(function (prev) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
};
|
|
252
|
-
});
|
|
246
|
+
setActiveDotsState(function (prev) { return ({
|
|
247
|
+
prev: prev.active,
|
|
248
|
+
active: activeTooltipIndex,
|
|
249
|
+
}); });
|
|
253
250
|
}
|
|
254
251
|
};
|
|
255
252
|
var mouseMove = function (e) {
|
package/components/Dot/index.css
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
1
|
+
/* hash: c2x5b */
|
|
2
|
+
.chart__dotUnfocused_8wcu4 {
|
|
3
3
|
opacity: 0.3;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
6
|
+
.chart__dot_8wcu4,
|
|
7
|
+
.chart__dotItem_8wcu4,
|
|
8
|
+
.chart__dotWrap_8wcu4 {
|
|
9
9
|
transition: all 0.2s ease;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
13
|
-
animation:
|
|
12
|
+
.chart__dot_8wcu4 {
|
|
13
|
+
animation: chart__showDot_8wcu4 0.5s ease;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@keyframes
|
|
16
|
+
@keyframes chart__showDot_8wcu4 {
|
|
17
17
|
from {
|
|
18
18
|
opacity: 0;
|
|
19
19
|
}
|
package/components/Dot/index.js
CHANGED
|
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"dotUnfocused":"
|
|
14
|
+
var styles = {"dotUnfocused":"chart__dotUnfocused_8wcu4","dot":"chart__dot_8wcu4","dotItem":"chart__dotItem_8wcu4","dotWrap":"chart__dotWrap_8wcu4","showDot":"chart__showDot_8wcu4"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Dot = React__default['default'].forwardRef(function (_a, ref) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: fqqa1 */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -10,31 +10,31 @@
|
|
|
10
10
|
:root {
|
|
11
11
|
--gap-2xl: 32px;
|
|
12
12
|
}
|
|
13
|
-
.
|
|
13
|
+
.chart__legendContent_msguv {
|
|
14
14
|
display: flex;
|
|
15
15
|
align-items: center;
|
|
16
16
|
flex-wrap: wrap;
|
|
17
17
|
}
|
|
18
|
-
.
|
|
18
|
+
.chart__legendWrap_msguv {
|
|
19
19
|
width: 100%;
|
|
20
20
|
margin: 0;
|
|
21
21
|
padding: 0;
|
|
22
22
|
}
|
|
23
|
-
.
|
|
23
|
+
.chart__legendItem_msguv {
|
|
24
24
|
margin-right: var(--gap-2xl);
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
display: inline-block;
|
|
27
27
|
}
|
|
28
|
-
.
|
|
28
|
+
.chart__legendItem_msguv:last-child {
|
|
29
29
|
margin-right: 0;
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.chart__legendUnactive_msguv {
|
|
32
32
|
opacity: 0.3;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.chart__legendIcon_msguv {
|
|
35
35
|
margin-right: 13px;
|
|
36
36
|
display: flex;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.chart__legendValue_msguv {
|
|
39
39
|
text-transform: capitalize;
|
|
40
40
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { DataDynamicBooleanProps } from "../../types/utils/data.types";
|
|
4
3
|
import { LegendProps } from "../../types/legend.types";
|
|
5
4
|
import { SeriaProps } from "../../types/seria.types";
|
|
5
|
+
import { DataDynamicBooleanProps } from "../../types/utils/data.types";
|
|
6
6
|
interface Props {
|
|
7
7
|
legend: LegendProps;
|
|
8
8
|
series: SeriaProps[];
|
|
@@ -15,7 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"legendContent":"
|
|
18
|
+
var styles = {"legendContent":"chart__legendContent_msguv","legendWrap":"chart__legendWrap_msguv","legendItem":"chart__legendItem_msguv","legendUnactive":"chart__legendUnactive_msguv","legendIcon":"chart__legendIcon_msguv","legendValue":"chart__legendValue_msguv"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var icons = {
|
|
@@ -39,7 +39,8 @@ var Legends = React__default['default'].forwardRef(function (_a, ref) {
|
|
|
39
39
|
return (React__default['default'].createElement("li", { role: 'presentation', key: id + "-" + item.properties.dataKey, className: cn__default['default'](styles.legendItem, charts["" + item.properties.dataKey] ? '' : styles.legendUnactive), onClick: function () { return toggleChart(item); } },
|
|
40
40
|
React__default['default'].createElement("div", { className: cn__default['default'](styles.legendContent) },
|
|
41
41
|
Icon ? (React__default['default'].createElement("i", { className: cn__default['default'](styles.legendIcon) },
|
|
42
|
-
React__default['default'].createElement(Icon, { fill: ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.fill) ||
|
|
42
|
+
React__default['default'].createElement(Icon, { fill: ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.fill) ||
|
|
43
|
+
((_b = item.properties) === null || _b === void 0 ? void 0 : _b.stroke) ||
|
|
43
44
|
'', height: legend.iconHeight || 16 }))) : null,
|
|
44
45
|
React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', tag: 'span', className: cn__default['default'](styles.legendValue) }, item.properties.name))));
|
|
45
46
|
})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { LinearGradientProps } from "../types/utils/gradient.types";
|
|
4
|
-
declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement
|
|
4
|
+
declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement;
|
|
5
5
|
export { LinearGradient };
|
package/components/RectBar.js
CHANGED
|
@@ -12,11 +12,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line complexity
|
|
14
14
|
var getPath = function (x, width, height, initHeight, topRadius, bottomRadius, initY) {
|
|
15
|
-
return "\n M" + (x + ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight || 0) + "\n Q" + x + " " + (initY + initHeight) + " " + x + " " + (initY +
|
|
16
|
-
initHeight -
|
|
17
|
-
((height !== 0 && bottomRadius) || 0)) + "\n L" + x + " " + (initY + ((height !== 0 && topRadius) || 0)) + "\n Q" + x + " " + initY + " " + (x + ((height !== 0 && topRadius) || 0)) + " " + initY + "\n L" + (x + width - ((height !== 0 && topRadius) || 0)) + " " + initY + "\n Q" + (x + width) + " " + initY + " " + (x + width) + " " + (initY + (topRadius || 0)) + "\n L" + (x + width) + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n Q" + (x + width) + " " + (initY + initHeight) + " " + (x +
|
|
18
|
-
width -
|
|
19
|
-
((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight) + "\n Z\n ";
|
|
15
|
+
return "\n M" + (x + ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight || 0) + "\n Q" + x + " " + (initY + initHeight) + " " + x + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n L" + x + " " + (initY + ((height !== 0 && topRadius) || 0)) + "\n Q" + x + " " + initY + " " + (x + ((height !== 0 && topRadius) || 0)) + " " + initY + "\n L" + (x + width - ((height !== 0 && topRadius) || 0)) + " " + initY + "\n Q" + (x + width) + " " + initY + " " + (x + width) + " " + (initY + (topRadius || 0)) + "\n L" + (x + width) + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n Q" + (x + width) + " " + (initY + initHeight) + " " + (x + width - ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight) + "\n Z\n ";
|
|
20
16
|
};
|
|
21
17
|
var RectBar = function (_a) {
|
|
22
18
|
var fill = _a.fill, x = _a.x, y = _a.y, width = _a.width, height = _a.height, radius = _a.radius, background = _a.background;
|
|
@@ -26,8 +22,7 @@ var RectBar = function (_a) {
|
|
|
26
22
|
background: background,
|
|
27
23
|
y: y,
|
|
28
24
|
}), initHeight = _b[0], topRadius = _b[1], bottomRadius = _b[2], initY = _b[3];
|
|
29
|
-
|
|
30
|
-
return React__default['default'].createElement(React__default['default'].Fragment, null, path);
|
|
25
|
+
return React.useMemo(function () { return (React__default['default'].createElement("path", { d: getPath(x, width, height, initHeight, topRadius, bottomRadius, initY), stroke: 'none', fill: fill })); }, [x, width, height, initHeight, topRadius, bottomRadius, initY, fill]);
|
|
31
26
|
};
|
|
32
27
|
|
|
33
28
|
exports.RectBar = RectBar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ofx49 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-dark-bg-primary: #0b1f35;
|
|
4
4
|
--color-light-text-primary: #0b1f35;
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
|
|
12
12
|
/* Hard up */
|
|
13
13
|
}
|
|
14
|
-
.
|
|
14
|
+
.chart__tickText_wgwi3 {
|
|
15
15
|
fill: var(--color-light-text-primary);
|
|
16
16
|
font-size: 16px;
|
|
17
17
|
line-height: 24px;
|
|
18
18
|
font-weight: 400;
|
|
19
19
|
}
|
|
20
|
-
.
|
|
20
|
+
.chart__circle_wgwi3 {
|
|
21
21
|
opacity: 0.3;
|
|
22
22
|
fill: var(--color-dark-bg-primary);
|
|
23
23
|
}
|
|
24
|
-
.
|
|
24
|
+
.chart__circle_wgwi3 {
|
|
25
25
|
opacity: 0.3;
|
|
26
26
|
fill: var(--color-dark-bg-primary);
|
|
27
27
|
}
|
package/components/Tick/index.js
CHANGED
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
11
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
12
12
|
|
|
13
|
-
var styles = {"tickText":"
|
|
13
|
+
var styles = {"tickText":"chart__tickText_wgwi3","circle":"chart__circle_wgwi3"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var Tick = function (_a) {
|
|
@@ -20,9 +20,7 @@ var Tick = function (_a) {
|
|
|
20
20
|
(xAxis.tickMargin > 0 ? xAxis.tickMargin - radius / 2 : xAxis.tickMargin === 0)
|
|
21
21
|
? (radius / 2) * -1
|
|
22
22
|
: null;
|
|
23
|
-
return (React__default['default'].createElement("g", { className: cn__default['default'](styles.tick), opacity: '1', textAnchor: 'middle', transform: "translate(" + payload.coordinate + ", " + (y -
|
|
24
|
-
(typeof marginTick === 'number' ? marginTick : 0) -
|
|
25
|
-
radius * 2) + ")" },
|
|
23
|
+
return (React__default['default'].createElement("g", { className: cn__default['default'](styles.tick), opacity: '1', textAnchor: 'middle', transform: "translate(" + payload.coordinate + ", " + (y - (typeof marginTick === 'number' ? marginTick : 0) - radius * 2) + ")" },
|
|
26
24
|
React__default['default'].createElement("text", { className: cn__default['default'](styles.tickText), y: '30' }, tickFormatter ? tickFormatter(payload.value) : payload.value),
|
|
27
25
|
React__default['default'].createElement("circle", { r: radius, className: cn__default['default'](styles.circle) })));
|
|
28
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ofyh1 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:root {
|
|
20
20
|
--border-radius-m: 8px;
|
|
21
21
|
}
|
|
22
|
-
.
|
|
22
|
+
.chart__tooltip_1ogbv {
|
|
23
23
|
background-color: var(--color-light-bg-primary);
|
|
24
24
|
border: 1px solid var(--color-light-border-primary);
|
|
25
25
|
box-shadow: var(--shadow-l);
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
pointer-events: none;
|
|
29
29
|
position: relative;
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.chart__tooltipList_1ogbv {
|
|
32
32
|
position: relative;
|
|
33
33
|
z-index: 5;
|
|
34
34
|
list-style-type: none;
|
|
35
35
|
padding: 0;
|
|
36
36
|
margin: 0;
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.chart__tooltipItem_1ogbv {
|
|
39
39
|
margin-bottom: 10px;
|
|
40
40
|
}
|
|
41
|
-
.
|
|
41
|
+
.chart__tooltipArrow_1ogbv {
|
|
42
42
|
position: absolute;
|
|
43
43
|
left: 0;
|
|
44
44
|
top: 50%;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
border: 1px solid var(--color-light-border-primary);
|
|
49
49
|
background-color: var(--color-light-bg-primary);
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
.chart__tooltipArrow_1ogbv:before {
|
|
52
52
|
content: '';
|
|
53
53
|
position: absolute;
|
|
54
54
|
left: -2px;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
border-width: 0 24px 24px 0;
|
|
60
60
|
border-color: transparent var(--color-light-bg-primary) transparent transparent;
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.chart__tooltipArrowRight_1ogbv {
|
|
63
63
|
left: 100%;
|
|
64
64
|
transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
|
|
65
65
|
}
|
|
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"tooltip":"
|
|
14
|
+
var styles = {"tooltip":"chart__tooltip_1ogbv","tooltipList":"chart__tooltipList_1ogbv","tooltipItem":"chart__tooltipItem_1ogbv","tooltipArrow":"chart__tooltipArrow_1ogbv","tooltipArrowRight":"chart__tooltipArrowRight_1ogbv"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var TooltipContent = function (_a) {
|
package/cssm/Component.js
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('./tslib.es6-
|
|
5
|
+
var tslib_es6 = require('./tslib.es6-0de342ae.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var recharts = require('recharts');
|
|
9
|
-
|
|
9
|
+
require('./hooks/usePathBar/utils/getRadius.js');
|
|
10
|
+
require('./hooks/usePathBar/index.js');
|
|
11
|
+
var components_CustomizedLabel = require('./components/CustomizedLabel.js');
|
|
12
|
+
require('./icons/Point.js');
|
|
13
|
+
require('./components/Dot/index.module.css');
|
|
14
|
+
var components_Dot_index = require('./components/Dot/index.js');
|
|
10
15
|
require('@alfalab/core-components-typography/cssm');
|
|
11
16
|
require('./icons/Circle.js');
|
|
12
17
|
require('./icons/CircleLine.js');
|
|
@@ -14,23 +19,18 @@ require('./icons/FilledCircle.js');
|
|
|
14
19
|
require('./icons/StrokeCircle.js');
|
|
15
20
|
require('./components/Legends/index.module.css');
|
|
16
21
|
var components_Legends_index = require('./components/Legends/index.js');
|
|
17
|
-
require('./
|
|
18
|
-
require('./components/
|
|
19
|
-
|
|
22
|
+
var components_LinearGradient = require('./components/LinearGradient.js');
|
|
23
|
+
var components_RectBar = require('./components/RectBar.js');
|
|
24
|
+
require('./components/Tick/index.module.css');
|
|
25
|
+
var components_Tick_index = require('./components/Tick/index.js');
|
|
26
|
+
require('./components/TooltipContent/index.module.css');
|
|
27
|
+
var components_TooltipContent_index = require('./components/TooltipContent/index.js');
|
|
20
28
|
require('./hooks/useSettings/utils/setComposedChartsMargin.js');
|
|
21
29
|
require('./hooks/useSettings/utils/setDatas.js');
|
|
22
30
|
require('./hooks/useSettings/utils/setGradientCharts.js');
|
|
23
31
|
require('./hooks/useSettings/utils/setLegendMargin.js');
|
|
24
32
|
require('./hooks/useSettings/utils/sortByIndex.js');
|
|
25
33
|
var hooks_useSettings_index = require('./hooks/useSettings/index.js');
|
|
26
|
-
require('./hooks/usePathBar/utils/getRadius.js');
|
|
27
|
-
require('./hooks/usePathBar/index.js');
|
|
28
|
-
var components_CustomizedLabel = require('./components/CustomizedLabel.js');
|
|
29
|
-
var components_RectBar = require('./components/RectBar.js');
|
|
30
|
-
require('./components/Tick/index.module.css');
|
|
31
|
-
var components_Tick_index = require('./components/Tick/index.js');
|
|
32
|
-
require('./components/TooltipContent/index.module.css');
|
|
33
|
-
var components_TooltipContent_index = require('./components/TooltipContent/index.js');
|
|
34
34
|
var styles = require('./index.module.css');
|
|
35
35
|
|
|
36
36
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -40,9 +40,7 @@ var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
|
40
40
|
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
41
41
|
|
|
42
42
|
var CustomizedHOC = function (Component, options) {
|
|
43
|
-
var NewComponent = function (props) {
|
|
44
|
-
return React__default['default'].createElement(Component, tslib_es6.__assign({}, props, options));
|
|
45
|
-
};
|
|
43
|
+
var NewComponent = function (props) { return React__default['default'].createElement(Component, tslib_es6.__assign({}, props, options)); };
|
|
46
44
|
return NewComponent;
|
|
47
45
|
};
|
|
48
46
|
|
|
@@ -180,7 +178,8 @@ var Chart = function (props) {
|
|
|
180
178
|
? CustomizedHOC(components_Dot_index.Dot, {
|
|
181
179
|
activeDot: activeDotsState.active,
|
|
182
180
|
dotSettings: properties.dotSettings,
|
|
183
|
-
inherit: (properties === null || properties === void 0 ? void 0 : properties.inheritStroke)
|
|
181
|
+
inherit: (properties === null || properties === void 0 ? void 0 : properties.inheritStroke)
|
|
182
|
+
? properties.inheritStroke
|
|
184
183
|
: false,
|
|
185
184
|
})
|
|
186
185
|
: false, activeDot: false }))) : null;
|
|
@@ -247,12 +246,10 @@ var Chart = function (props) {
|
|
|
247
246
|
});
|
|
248
247
|
}
|
|
249
248
|
if (typeof activeTooltipIndex === 'number' && typeof activeDotsState.prev === 'number') {
|
|
250
|
-
setActiveDotsState(function (prev) {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
};
|
|
255
|
-
});
|
|
249
|
+
setActiveDotsState(function (prev) { return ({
|
|
250
|
+
prev: prev.active,
|
|
251
|
+
active: activeTooltipIndex,
|
|
252
|
+
}); });
|
|
256
253
|
}
|
|
257
254
|
};
|
|
258
255
|
var mouseMove = function (e) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { DataDynamicBooleanProps } from "../../types/utils/data.types";
|
|
4
3
|
import { LegendProps } from "../../types/legend.types";
|
|
5
4
|
import { SeriaProps } from "../../types/seria.types";
|
|
5
|
+
import { DataDynamicBooleanProps } from "../../types/utils/data.types";
|
|
6
6
|
interface Props {
|
|
7
7
|
legend: LegendProps;
|
|
8
8
|
series: SeriaProps[];
|
|
@@ -38,7 +38,8 @@ var Legends = React__default['default'].forwardRef(function (_a, ref) {
|
|
|
38
38
|
return (React__default['default'].createElement("li", { role: 'presentation', key: id + "-" + item.properties.dataKey, className: cn__default['default'](styles__default['default'].legendItem, charts["" + item.properties.dataKey] ? '' : styles__default['default'].legendUnactive), onClick: function () { return toggleChart(item); } },
|
|
39
39
|
React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].legendContent) },
|
|
40
40
|
Icon ? (React__default['default'].createElement("i", { className: cn__default['default'](styles__default['default'].legendIcon) },
|
|
41
|
-
React__default['default'].createElement(Icon, { fill: ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.fill) ||
|
|
41
|
+
React__default['default'].createElement(Icon, { fill: ((_a = item.properties) === null || _a === void 0 ? void 0 : _a.fill) ||
|
|
42
|
+
((_b = item.properties) === null || _b === void 0 ? void 0 : _b.stroke) ||
|
|
42
43
|
'', height: legend.iconHeight || 16 }))) : null,
|
|
43
44
|
React__default['default'].createElement(coreComponentsTypography.Typography.Text, { view: 'primary-medium', tag: 'span', className: cn__default['default'](styles__default['default'].legendValue) }, item.properties.name))));
|
|
44
45
|
})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { LinearGradientProps } from "../types/utils/gradient.types";
|
|
4
|
-
declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement
|
|
4
|
+
declare const LinearGradient: ({ id, gid, points }: LinearGradientProps) => React.ReactElement;
|
|
5
5
|
export { LinearGradient };
|
|
@@ -12,11 +12,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line complexity
|
|
14
14
|
var getPath = function (x, width, height, initHeight, topRadius, bottomRadius, initY) {
|
|
15
|
-
return "\n M" + (x + ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight || 0) + "\n Q" + x + " " + (initY + initHeight) + " " + x + " " + (initY +
|
|
16
|
-
initHeight -
|
|
17
|
-
((height !== 0 && bottomRadius) || 0)) + "\n L" + x + " " + (initY + ((height !== 0 && topRadius) || 0)) + "\n Q" + x + " " + initY + " " + (x + ((height !== 0 && topRadius) || 0)) + " " + initY + "\n L" + (x + width - ((height !== 0 && topRadius) || 0)) + " " + initY + "\n Q" + (x + width) + " " + initY + " " + (x + width) + " " + (initY + (topRadius || 0)) + "\n L" + (x + width) + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n Q" + (x + width) + " " + (initY + initHeight) + " " + (x +
|
|
18
|
-
width -
|
|
19
|
-
((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight) + "\n Z\n ";
|
|
15
|
+
return "\n M" + (x + ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight || 0) + "\n Q" + x + " " + (initY + initHeight) + " " + x + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n L" + x + " " + (initY + ((height !== 0 && topRadius) || 0)) + "\n Q" + x + " " + initY + " " + (x + ((height !== 0 && topRadius) || 0)) + " " + initY + "\n L" + (x + width - ((height !== 0 && topRadius) || 0)) + " " + initY + "\n Q" + (x + width) + " " + initY + " " + (x + width) + " " + (initY + (topRadius || 0)) + "\n L" + (x + width) + " " + (initY + initHeight - ((height !== 0 && bottomRadius) || 0)) + "\n Q" + (x + width) + " " + (initY + initHeight) + " " + (x + width - ((height !== 0 && bottomRadius) || 0)) + " " + (initY + initHeight) + "\n Z\n ";
|
|
20
16
|
};
|
|
21
17
|
var RectBar = function (_a) {
|
|
22
18
|
var fill = _a.fill, x = _a.x, y = _a.y, width = _a.width, height = _a.height, radius = _a.radius, background = _a.background;
|
|
@@ -26,8 +22,7 @@ var RectBar = function (_a) {
|
|
|
26
22
|
background: background,
|
|
27
23
|
y: y,
|
|
28
24
|
}), initHeight = _b[0], topRadius = _b[1], bottomRadius = _b[2], initY = _b[3];
|
|
29
|
-
|
|
30
|
-
return React__default['default'].createElement(React__default['default'].Fragment, null, path);
|
|
25
|
+
return React.useMemo(function () { return (React__default['default'].createElement("path", { d: getPath(x, width, height, initHeight, topRadius, bottomRadius, initY), stroke: 'none', fill: fill })); }, [x, width, height, initHeight, topRadius, bottomRadius, initY, fill]);
|
|
31
26
|
};
|
|
32
27
|
|
|
33
28
|
exports.RectBar = RectBar;
|
|
@@ -19,9 +19,7 @@ var Tick = function (_a) {
|
|
|
19
19
|
(xAxis.tickMargin > 0 ? xAxis.tickMargin - radius / 2 : xAxis.tickMargin === 0)
|
|
20
20
|
? (radius / 2) * -1
|
|
21
21
|
: null;
|
|
22
|
-
return (React__default['default'].createElement("g", { className: cn__default['default'](styles__default['default'].tick), opacity: '1', textAnchor: 'middle', transform: "translate(" + payload.coordinate + ", " + (y -
|
|
23
|
-
(typeof marginTick === 'number' ? marginTick : 0) -
|
|
24
|
-
radius * 2) + ")" },
|
|
22
|
+
return (React__default['default'].createElement("g", { className: cn__default['default'](styles__default['default'].tick), opacity: '1', textAnchor: 'middle', transform: "translate(" + payload.coordinate + ", " + (y - (typeof marginTick === 'number' ? marginTick : 0) - radius * 2) + ")" },
|
|
25
23
|
React__default['default'].createElement("text", { className: cn__default['default'](styles__default['default'].tickText), y: '30' }, tickFormatter ? tickFormatter(payload.value) : payload.value),
|
|
26
24
|
React__default['default'].createElement("circle", { r: radius, className: cn__default['default'](styles__default['default'].circle) })));
|
|
27
25
|
};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { OptionsProps } from "../../types/options.types";
|
|
3
3
|
import { DataDynamicBooleanProps, DataDynamicProps } from "../../types/utils/data.types";
|
|
4
|
-
type Settings = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
type Settings = [
|
|
5
|
+
{
|
|
6
|
+
state: OptionsProps | null;
|
|
7
|
+
data: DataDynamicProps[];
|
|
8
|
+
charts: DataDynamicBooleanProps;
|
|
9
|
+
filterCount: number;
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
setState: Dispatch<SetStateAction<OptionsProps | null>>;
|
|
13
|
+
setData: Dispatch<SetStateAction<DataDynamicProps[]>>;
|
|
14
|
+
setCharts: Dispatch<SetStateAction<DataDynamicBooleanProps>>;
|
|
15
|
+
setFilterCount: Dispatch<SetStateAction<number>>;
|
|
16
|
+
}
|
|
17
|
+
];
|
|
15
18
|
declare const useSettings: (options: OptionsProps) => Settings;
|
|
16
19
|
export { useSettings };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-0de342ae.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var hooks_useSettings_utils_setComposedChartsMargin = require('./utils/setComposedChartsMargin.js');
|
|
8
8
|
var hooks_useSettings_utils_setDatas = require('./utils/setDatas.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { XAxisProps } from "../../../types/xAxis.types";
|
|
2
1
|
import { BrushProps } from "../../../types/brush.types";
|
|
3
|
-
import { LegendProps } from "../../../types/legend.types";
|
|
4
2
|
import { ComposedChartProps } from "../../../types/composedChart.types";
|
|
3
|
+
import { LegendProps } from "../../../types/legend.types";
|
|
4
|
+
import { XAxisProps } from "../../../types/xAxis.types";
|
|
5
5
|
type ComposedChartsMarginResultProps = {
|
|
6
6
|
top: number;
|
|
7
7
|
bottom: number;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var setComposedChartsMargin = function (composeChart, legend, brush, xAxis) {
|
|
6
6
|
var _a, _b, _c, _d;
|
|
7
|
-
return {
|
|
7
|
+
return ({
|
|
8
8
|
top: (((_a = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _a === void 0 ? void 0 : _a.top) || 0) +
|
|
9
9
|
((legend === null || legend === void 0 ? void 0 : legend.verticalAlign) === 'top' && (legend === null || legend === void 0 ? void 0 : legend.marginTop) ? Math.abs(legend.marginTop) : 0),
|
|
10
10
|
bottom: (((_b = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _b === void 0 ? void 0 : _b.bottom) || 0) +
|
|
@@ -13,7 +13,7 @@ var setComposedChartsMargin = function (composeChart, legend, brush, xAxis) {
|
|
|
13
13
|
((legend === null || legend === void 0 ? void 0 : legend.verticalAlign) !== 'top' && (legend === null || legend === void 0 ? void 0 : legend.marginTop) ? legend.marginTop : 0),
|
|
14
14
|
left: ((_c = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _c === void 0 ? void 0 : _c.left) || 0,
|
|
15
15
|
right: ((_d = composeChart === null || composeChart === void 0 ? void 0 : composeChart.initMargin) === null || _d === void 0 ? void 0 : _d.right) || 0,
|
|
16
|
-
};
|
|
16
|
+
});
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
exports.setComposedChartsMargin = setComposedChartsMargin;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DataDynamicBooleanProps, DataDynamicProps } from "../../../types/utils/data.types";
|
|
3
1
|
import { SeriaProps } from "../../../types/seria.types";
|
|
2
|
+
import { DataDynamicBooleanProps, DataDynamicProps } from "../../../types/utils/data.types";
|
|
4
3
|
type DatasResultProps = [DataDynamicProps[], DataDynamicBooleanProps, number];
|
|
5
|
-
declare const setDatas: (series: SeriaProps[], labels:
|
|
4
|
+
declare const setDatas: (series: SeriaProps[], labels: Array<string | number>) => DatasResultProps;
|
|
6
5
|
export { setDatas };
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../../tslib.es6-0de342ae.js');
|
|
6
6
|
|
|
7
7
|
var setDatas = function (series, labels) {
|
|
8
8
|
var initData = [];
|
|
9
9
|
var chartsNames = {};
|
|
10
10
|
var count = 0;
|
|
11
11
|
var _loop_1 = function (i) {
|
|
12
|
-
var _a = series[i], _b = _a.properties, _c =
|
|
12
|
+
var _a = series[i], _b = _a.properties, _c = _b === void 0 ? {} : _b, _d = _c.dataKey, dataKey = _d === void 0 ? '' : _d, _e = _a.data, seriaData = _e === void 0 ? [] : _e, hideLegend = _a.hideLegend, hide = _a.hide;
|
|
13
13
|
if (!hideLegend && !hide)
|
|
14
14
|
count += 1;
|
|
15
15
|
labels.map(function (label) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../../tslib.es6-0de342ae.js');
|
|
6
6
|
|
|
7
7
|
var setGradientCharts = function (series) {
|
|
8
8
|
var filterSeries = series.filter(function (item) { return item.chart !== 'gradient'; });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LegendProps } from "../../../types/legend.types";
|
|
2
1
|
import { BrushProps } from "../../../types/brush.types";
|
|
2
|
+
import { LegendProps } from "../../../types/legend.types";
|
|
3
3
|
declare const setLegendMargin: (brush: BrushProps, legend: LegendProps) => number;
|
|
4
4
|
export { setLegendMargin };
|