@alfalab/core-components-chart 3.1.9 → 3.1.11
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.d.ts +1 -1
- package/Component.js +3 -1
- package/components/CustomizedLabel.js +3 -0
- package/components/Dot/index.css +8 -8
- package/components/Dot/index.js +3 -1
- package/components/Legends/index.css +10 -10
- package/components/Legends/index.js +3 -1
- package/components/LinearGradient.js +2 -0
- package/components/RectBar.js +3 -0
- package/components/Tick/index.css +7 -7
- package/components/Tick/index.js +3 -1
- package/components/TooltipContent/index.css +11 -10
- package/components/TooltipContent/index.js +3 -1
- package/cssm/Component.d.ts +1 -1
- package/cssm/Component.js +2 -0
- package/cssm/components/CustomizedLabel.js +3 -0
- package/cssm/components/Dot/index.js +2 -0
- package/cssm/components/Legends/index.js +2 -0
- package/cssm/components/Legends/index.module.css +2 -2
- package/cssm/components/LinearGradient.js +2 -0
- package/cssm/components/RectBar.js +3 -0
- package/cssm/components/Tick/index.js +2 -0
- package/cssm/components/Tick/index.module.css +3 -3
- package/cssm/components/TooltipContent/index.js +2 -0
- package/cssm/components/TooltipContent/index.module.css +4 -3
- package/cssm/hooks/usePathBar/index.js +2 -0
- package/cssm/hooks/usePathBar/utils/getRadius.js +2 -0
- package/cssm/hooks/useSettings/index.js +2 -0
- package/cssm/hooks/useSettings/utils/setComposedChartsMargin.js +2 -0
- package/cssm/hooks/useSettings/utils/setDatas.js +2 -0
- package/cssm/hooks/useSettings/utils/setGradientCharts.js +2 -0
- package/cssm/hooks/useSettings/utils/setLegendMargin.js +2 -0
- package/cssm/hooks/useSettings/utils/sortByIndex.js +2 -0
- package/cssm/icons/Circle.js +2 -0
- package/cssm/icons/CircleLine.js +2 -0
- package/cssm/icons/FilledCircle.js +2 -0
- package/cssm/icons/Point.js +2 -0
- package/cssm/icons/StrokeCircle.js +2 -0
- package/cssm/index.js +2 -0
- package/cssm/index.module.css +2 -2
- package/cssm/types/cartesianGrid.types.d.ts +1 -1
- package/esm/Component.d.ts +1 -1
- package/esm/Component.js +1 -1
- package/esm/components/CustomizedLabel.js +1 -0
- package/esm/components/Dot/index.css +8 -8
- package/esm/components/Dot/index.js +1 -1
- package/esm/components/Legends/index.css +10 -10
- package/esm/components/Legends/index.js +1 -1
- package/esm/components/RectBar.js +1 -0
- package/esm/components/Tick/index.css +7 -7
- package/esm/components/Tick/index.js +1 -1
- package/esm/components/TooltipContent/index.css +11 -10
- package/esm/components/TooltipContent/index.js +1 -1
- package/esm/index.css +7 -7
- package/esm/types/cartesianGrid.types.d.ts +1 -1
- package/hooks/usePathBar/index.js +2 -0
- package/hooks/usePathBar/utils/getRadius.js +2 -0
- package/hooks/useSettings/index.js +2 -0
- package/hooks/useSettings/utils/setComposedChartsMargin.js +2 -0
- package/hooks/useSettings/utils/setDatas.js +2 -0
- package/hooks/useSettings/utils/setGradientCharts.js +2 -0
- package/hooks/useSettings/utils/setLegendMargin.js +2 -0
- package/hooks/useSettings/utils/sortByIndex.js +2 -0
- package/icons/Circle.js +2 -0
- package/icons/CircleLine.js +2 -0
- package/icons/FilledCircle.js +2 -0
- package/icons/Point.js +2 -0
- package/icons/StrokeCircle.js +2 -0
- package/index.css +7 -7
- package/index.js +2 -0
- package/modern/Component.d.ts +1 -1
- package/modern/Component.js +2 -1
- package/modern/components/CustomizedLabel.js +1 -0
- package/modern/components/Dot/index.css +8 -8
- package/modern/components/Dot/index.js +1 -1
- package/modern/components/Legends/index.css +10 -10
- package/modern/components/Legends/index.js +1 -1
- package/modern/components/RectBar.js +1 -0
- package/modern/components/Tick/index.css +7 -7
- package/modern/components/Tick/index.js +1 -1
- package/modern/components/TooltipContent/index.css +11 -10
- package/modern/components/TooltipContent/index.js +1 -1
- package/modern/index.css +7 -7
- package/modern/types/cartesianGrid.types.d.ts +1 -1
- package/package.json +2 -2
- package/types/cartesianGrid.types.d.ts +1 -1
package/esm/Component.js
CHANGED
|
@@ -29,7 +29,7 @@ var CustomizedHOC = function (Component, options) {
|
|
|
29
29
|
return NewComponent;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
var styles = {"coreChart":"
|
|
32
|
+
var styles = {"coreChart":"chart__coreChart_1a8to","bar":"chart__bar_1a8to","unfocused":"chart__unfocused_1a8to"};
|
|
33
33
|
require('./index.css')
|
|
34
34
|
|
|
35
35
|
var Chart = function (props) {
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { usePathBar } from '../hooks/usePathBar/index.js';
|
|
3
3
|
import '../hooks/usePathBar/utils/getRadius.js';
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
6
|
var CustomizedLabel = function (_a) {
|
|
6
7
|
var x = _a.x, y = _a.y, value = _a.value, offset = _a.offset, radius = _a.radius, height = _a.height, width = _a.width, formatter = _a.formatter;
|
|
7
8
|
var initHeight = usePathBar({ radius: radius, height: height })[0];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
1
|
+
/* hash: 1ccab */
|
|
2
|
+
.chart__dotUnfocused_1bm1e {
|
|
3
3
|
opacity: 0.3;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
6
|
+
.chart__dot_1bm1e,
|
|
7
|
+
.chart__dotItem_1bm1e,
|
|
8
|
+
.chart__dotWrap_1bm1e {
|
|
9
9
|
transition: all 0.2s ease;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
13
|
-
animation:
|
|
12
|
+
.chart__dot_1bm1e {
|
|
13
|
+
animation: chart__showDot_1bm1e 0.5s ease;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@keyframes
|
|
16
|
+
@keyframes chart__showDot_1bm1e {
|
|
17
17
|
from {
|
|
18
18
|
opacity: 0;
|
|
19
19
|
}
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { PointIcon } from '../../icons/Point.js';
|
|
4
4
|
|
|
5
|
-
var styles = {"dotUnfocused":"
|
|
5
|
+
var styles = {"dotUnfocused":"chart__dotUnfocused_1bm1e","dot":"chart__dot_1bm1e","dotItem":"chart__dotItem_1bm1e","dotWrap":"chart__dotWrap_1bm1e","showDot":"chart__showDot_1bm1e"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Dot = React.forwardRef(function (_a, ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vaobp */
|
|
2
2
|
:root {
|
|
3
|
-
} /* deprecated */ :root {
|
|
4
|
-
} :root {
|
|
3
|
+
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
5
|
} :root {
|
|
6
6
|
} :root {
|
|
7
7
|
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
--gap-2xl: 32px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .chart__legendContent_1kzcr {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
flex-wrap: wrap;
|
|
22
|
-
} .
|
|
22
|
+
} .chart__legendWrap_1kzcr {
|
|
23
23
|
width: 100%;
|
|
24
24
|
margin: 0;
|
|
25
25
|
padding: 0;
|
|
26
|
-
} .
|
|
26
|
+
} .chart__legendItem_1kzcr {
|
|
27
27
|
margin-right: var(--gap-2xl);
|
|
28
28
|
cursor: pointer;
|
|
29
29
|
display: inline-block;
|
|
30
|
-
} .
|
|
30
|
+
} .chart__legendItem_1kzcr:last-child {
|
|
31
31
|
margin-right: 0;
|
|
32
|
-
} .
|
|
32
|
+
} .chart__legendUnactive_1kzcr {
|
|
33
33
|
opacity: 0.3;
|
|
34
|
-
} .
|
|
34
|
+
} .chart__legendIcon_1kzcr {
|
|
35
35
|
margin-right: 13px;
|
|
36
36
|
display: flex;
|
|
37
|
-
} .
|
|
37
|
+
} .chart__legendValue_1kzcr {
|
|
38
38
|
text-transform: capitalize;
|
|
39
39
|
}
|
|
@@ -6,7 +6,7 @@ import { CircleLineIcon } from '../../icons/CircleLine.js';
|
|
|
6
6
|
import { FilledCircleIcon } from '../../icons/FilledCircle.js';
|
|
7
7
|
import { StrokeCircleIcon } from '../../icons/StrokeCircle.js';
|
|
8
8
|
|
|
9
|
-
var styles = {"legendContent":"
|
|
9
|
+
var styles = {"legendContent":"chart__legendContent_1kzcr","legendWrap":"chart__legendWrap_1kzcr","legendItem":"chart__legendItem_1kzcr","legendUnactive":"chart__legendUnactive_1kzcr","legendIcon":"chart__legendIcon_1kzcr","legendValue":"chart__legendValue_1kzcr"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
var icons = {
|
|
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { usePathBar } from '../hooks/usePathBar/index.js';
|
|
3
3
|
import '../hooks/usePathBar/utils/getRadius.js';
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
6
|
// eslint-disable-next-line complexity
|
|
6
7
|
var getPath = function (x, width, height, initHeight, topRadius, bottomRadius, initY) {
|
|
7
8
|
return "\n M".concat(x + ((height !== 0 && bottomRadius) || 0), " ").concat(initY + initHeight || 0, "\n Q").concat(x, " ").concat(initY + initHeight, " ").concat(x, " ").concat(initY + initHeight - ((height !== 0 && bottomRadius) || 0), "\n L").concat(x, " ").concat(initY + ((height !== 0 && topRadius) || 0), "\n Q").concat(x, " ").concat(initY, " ").concat(x + ((height !== 0 && topRadius) || 0), " ").concat(initY, "\n L").concat(x + width - ((height !== 0 && topRadius) || 0), " ").concat(initY, "\n Q").concat(x + width, " ").concat(initY, " ").concat(x + width, " ").concat(initY + (topRadius || 0), "\n L").concat(x + width, " ").concat(initY + initHeight - ((height !== 0 && bottomRadius) || 0), "\n Q").concat(x + width, " ").concat(initY + initHeight, " ").concat(x + width - ((height !== 0 && bottomRadius) || 0), " ").concat(initY + initHeight, "\n Z\n ");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 13icr */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-dark-bg-primary: #
|
|
5
|
-
--color-light-text-primary: #
|
|
6
|
-
} :root {
|
|
4
|
+
--color-dark-bg-primary: #121212;
|
|
5
|
+
--color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
7
7
|
} :root {
|
|
8
8
|
} :root {
|
|
9
9
|
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .chart__tickText_m7nsj {
|
|
20
20
|
fill: var(--color-light-text-primary);
|
|
21
21
|
font-size: 16px;
|
|
22
22
|
line-height: 24px;
|
|
23
23
|
font-weight: 400;
|
|
24
|
-
} .
|
|
24
|
+
} .chart__circle_m7nsj {
|
|
25
25
|
opacity: 0.3;
|
|
26
26
|
fill: var(--color-dark-bg-primary);
|
|
27
|
-
} .
|
|
27
|
+
} .chart__circle_m7nsj {
|
|
28
28
|
opacity: 0.3;
|
|
29
29
|
fill: var(--color-dark-bg-primary);
|
|
30
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
var styles = {"tickText":"
|
|
4
|
+
var styles = {"tickText":"chart__tickText_m7nsj","circle":"chart__circle_m7nsj"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
var Tick = function (_a) {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: xadgo */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
5
|
-
--color-light-border-primary: #
|
|
5
|
+
--color-light-border-primary: #dcdcdd; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
7
|
} :root {
|
|
7
8
|
} :root {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
--shadow-l: 0 24px 32px rgba(0, 0, 0, 0.08), 0 20px 24px rgba(0, 0, 0, 0.08),
|
|
10
|
+
0 12px 16px rgba(0, 0, 0, 0.04), 0 4px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.04);
|
|
10
11
|
|
|
11
12
|
/* Hard */
|
|
12
13
|
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
--gap-m: 16px;
|
|
21
22
|
} :root {
|
|
22
23
|
} :root {
|
|
23
|
-
} .
|
|
24
|
+
} .chart__tooltip_t9vbe {
|
|
24
25
|
background-color: var(--color-light-bg-primary);
|
|
25
26
|
border: 1px solid var(--color-light-border-primary);
|
|
26
27
|
box-shadow: var(--shadow-l);
|
|
@@ -28,15 +29,15 @@
|
|
|
28
29
|
padding: var(--gap-s) var(--gap-m);
|
|
29
30
|
pointer-events: none;
|
|
30
31
|
position: relative;
|
|
31
|
-
} .
|
|
32
|
+
} .chart__tooltipList_t9vbe {
|
|
32
33
|
position: relative;
|
|
33
34
|
z-index: 5;
|
|
34
35
|
list-style-type: none;
|
|
35
36
|
padding: 0;
|
|
36
37
|
margin: 0;
|
|
37
|
-
} .
|
|
38
|
+
} .chart__tooltipItem_t9vbe {
|
|
38
39
|
margin-bottom: 10px;
|
|
39
|
-
} .
|
|
40
|
+
} .chart__tooltipArrow_t9vbe {
|
|
40
41
|
position: absolute;
|
|
41
42
|
left: 0;
|
|
42
43
|
top: 50%;
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
height: 10px;
|
|
46
47
|
border: 1px solid var(--color-light-border-primary);
|
|
47
48
|
background-color: var(--color-light-bg-primary);
|
|
48
|
-
} .
|
|
49
|
+
} .chart__tooltipArrow_t9vbe:before {
|
|
49
50
|
content: '';
|
|
50
51
|
position: absolute;
|
|
51
52
|
left: -2px;
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
border-style: solid;
|
|
56
57
|
border-width: 0 24px 24px 0;
|
|
57
58
|
border-color: transparent var(--color-light-bg-primary) transparent transparent;
|
|
58
|
-
} .
|
|
59
|
+
} .chart__tooltipArrowRight_t9vbe {
|
|
59
60
|
left: 100%;
|
|
60
61
|
transform: translate(-50%, -50%) scale(-1, 1) rotate(45deg);
|
|
61
62
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Typography } from '@alfalab/core-components-typography/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"tooltip":"
|
|
5
|
+
var styles = {"tooltip":"chart__tooltip_t9vbe","tooltipList":"chart__tooltipList_t9vbe","tooltipItem":"chart__tooltipItem_t9vbe","tooltipArrow":"chart__tooltipArrow_t9vbe","tooltipArrowRight":"chart__tooltipArrowRight_t9vbe"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var TooltipContent = function (_a) {
|
package/esm/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1w93y */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-text-primary: #
|
|
5
|
-
} :root {
|
|
4
|
+
--color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
6
|
} :root {
|
|
7
7
|
} :root {
|
|
8
8
|
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .chart__coreChart_1a8to .recharts-line path {
|
|
19
19
|
transition: d 0.2s ease-out;
|
|
20
|
-
} .
|
|
20
|
+
} .chart__coreChart_1a8to .recharts-text tspan {
|
|
21
21
|
fill: var(--color-light-text-primary);
|
|
22
22
|
font-size: 16px;
|
|
23
23
|
line-height: 22px;
|
|
24
|
-
} .
|
|
24
|
+
} .chart__bar_1a8to {
|
|
25
25
|
transition: opacity 0.2s ease-out, d 0.2s ease-out;
|
|
26
|
-
} .
|
|
26
|
+
} .chart__unfocused_1a8to {
|
|
27
27
|
opacity: 0.3;
|
|
28
28
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var setLegendMargin = function (brush, legend) {
|
|
4
6
|
var top = 0;
|
|
5
7
|
if (typeof (brush === null || brush === void 0 ? void 0 : brush.brushMargin) !== 'number' || !(legend === null || legend === void 0 ? void 0 : legend.verticalAlign))
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var sortByIndex = function (series) {
|
|
4
6
|
return series.sort(function (a, b) {
|
|
5
7
|
if ((a === null || a === void 0 ? void 0 : a.zIndex) && (b === null || b === void 0 ? void 0 : b.zIndex) && (a === null || a === void 0 ? void 0 : a.zIndex) > (b === null || b === void 0 ? void 0 : b.zIndex)) {
|
package/icons/Circle.js
CHANGED
package/icons/CircleLine.js
CHANGED
package/icons/FilledCircle.js
CHANGED
package/icons/Point.js
CHANGED
package/icons/StrokeCircle.js
CHANGED
package/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1w93y */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-text-primary: #
|
|
5
|
-
} :root {
|
|
4
|
+
--color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
6
|
} :root {
|
|
7
7
|
} :root {
|
|
8
8
|
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .chart__coreChart_1a8to .recharts-line path {
|
|
19
19
|
transition: d 0.2s ease-out;
|
|
20
|
-
} .
|
|
20
|
+
} .chart__coreChart_1a8to .recharts-text tspan {
|
|
21
21
|
fill: var(--color-light-text-primary);
|
|
22
22
|
font-size: 16px;
|
|
23
23
|
line-height: 22px;
|
|
24
|
-
} .
|
|
24
|
+
} .chart__bar_1a8to {
|
|
25
25
|
transition: opacity 0.2s ease-out, d 0.2s ease-out;
|
|
26
|
-
} .
|
|
26
|
+
} .chart__unfocused_1a8to {
|
|
27
27
|
opacity: 0.3;
|
|
28
28
|
}
|
package/index.js
CHANGED
package/modern/Component.d.ts
CHANGED
package/modern/Component.js
CHANGED
|
@@ -28,9 +28,10 @@ const CustomizedHOC = (Component, options) => {
|
|
|
28
28
|
return NewComponent;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const styles = {"coreChart":"
|
|
31
|
+
const styles = {"coreChart":"chart__coreChart_1a8to","bar":"chart__bar_1a8to","unfocused":"chart__unfocused_1a8to"};
|
|
32
32
|
require('./index.css')
|
|
33
33
|
|
|
34
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
34
35
|
const Chart = (props) => {
|
|
35
36
|
const [{ state, data, charts, filterCount }, { setCharts, setFilterCount }] = useSettings(props);
|
|
36
37
|
const [activeDotsState, setActiveDotsState] = useState({
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { usePathBar } from '../hooks/usePathBar/index.js';
|
|
3
3
|
import '../hooks/usePathBar/utils/getRadius.js';
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
6
|
const CustomizedLabel = ({ x, y, value, offset, radius, height, width, formatter, }) => {
|
|
6
7
|
const [initHeight] = usePathBar({ radius, height });
|
|
7
8
|
return (React.createElement("text", { x: x + width / 2, y: y + height - (initHeight + offset), width: width, height: initHeight, textAnchor: 'middle' },
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.
|
|
1
|
+
/* hash: 1ccab */
|
|
2
|
+
.chart__dotUnfocused_1bm1e {
|
|
3
3
|
opacity: 0.3;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
6
|
+
.chart__dot_1bm1e,
|
|
7
|
+
.chart__dotItem_1bm1e,
|
|
8
|
+
.chart__dotWrap_1bm1e {
|
|
9
9
|
transition: all 0.2s ease;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
13
|
-
animation:
|
|
12
|
+
.chart__dot_1bm1e {
|
|
13
|
+
animation: chart__showDot_1bm1e 0.5s ease;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@keyframes
|
|
16
|
+
@keyframes chart__showDot_1bm1e {
|
|
17
17
|
from {
|
|
18
18
|
opacity: 0;
|
|
19
19
|
}
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { PointIcon } from '../../icons/Point.js';
|
|
4
4
|
|
|
5
|
-
const styles = {"dotUnfocused":"
|
|
5
|
+
const styles = {"dotUnfocused":"chart__dotUnfocused_1bm1e","dot":"chart__dot_1bm1e","dotItem":"chart__dotItem_1bm1e","dotWrap":"chart__dotWrap_1bm1e","showDot":"chart__showDot_1bm1e"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Dot = React.forwardRef(({ cx, cy, index, activeDot, dataKey, dotSettings, value, stroke }, ref) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vaobp */
|
|
2
2
|
:root {
|
|
3
|
-
} /* deprecated */ :root {
|
|
4
|
-
} :root {
|
|
3
|
+
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
5
|
} :root {
|
|
6
6
|
} :root {
|
|
7
7
|
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
--gap-2xl: 32px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .chart__legendContent_1kzcr {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
flex-wrap: wrap;
|
|
22
|
-
} .
|
|
22
|
+
} .chart__legendWrap_1kzcr {
|
|
23
23
|
width: 100%;
|
|
24
24
|
margin: 0;
|
|
25
25
|
padding: 0;
|
|
26
|
-
} .
|
|
26
|
+
} .chart__legendItem_1kzcr {
|
|
27
27
|
margin-right: var(--gap-2xl);
|
|
28
28
|
cursor: pointer;
|
|
29
29
|
display: inline-block;
|
|
30
|
-
} .
|
|
30
|
+
} .chart__legendItem_1kzcr:last-child {
|
|
31
31
|
margin-right: 0;
|
|
32
|
-
} .
|
|
32
|
+
} .chart__legendUnactive_1kzcr {
|
|
33
33
|
opacity: 0.3;
|
|
34
|
-
} .
|
|
34
|
+
} .chart__legendIcon_1kzcr {
|
|
35
35
|
margin-right: 13px;
|
|
36
36
|
display: flex;
|
|
37
|
-
} .
|
|
37
|
+
} .chart__legendValue_1kzcr {
|
|
38
38
|
text-transform: capitalize;
|
|
39
39
|
}
|
|
@@ -6,7 +6,7 @@ import { CircleLineIcon } from '../../icons/CircleLine.js';
|
|
|
6
6
|
import { FilledCircleIcon } from '../../icons/FilledCircle.js';
|
|
7
7
|
import { StrokeCircleIcon } from '../../icons/StrokeCircle.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"legendContent":"
|
|
9
|
+
const styles = {"legendContent":"chart__legendContent_1kzcr","legendWrap":"chart__legendWrap_1kzcr","legendItem":"chart__legendItem_1kzcr","legendUnactive":"chart__legendUnactive_1kzcr","legendIcon":"chart__legendIcon_1kzcr","legendValue":"chart__legendValue_1kzcr"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const icons = {
|
|
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { usePathBar } from '../hooks/usePathBar/index.js';
|
|
3
3
|
import '../hooks/usePathBar/utils/getRadius.js';
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
6
|
// eslint-disable-next-line complexity
|
|
6
7
|
const getPath = (x, width, height, initHeight, topRadius, bottomRadius, initY) => `
|
|
7
8
|
M${x + ((height !== 0 && bottomRadius) || 0)} ${initY + initHeight || 0}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 13icr */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-dark-bg-primary: #
|
|
5
|
-
--color-light-text-primary: #
|
|
6
|
-
} :root {
|
|
4
|
+
--color-dark-bg-primary: #121212;
|
|
5
|
+
--color-light-text-primary: #0e0e0e; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
6
|
+
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
7
7
|
} :root {
|
|
8
8
|
} :root {
|
|
9
9
|
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .chart__tickText_m7nsj {
|
|
20
20
|
fill: var(--color-light-text-primary);
|
|
21
21
|
font-size: 16px;
|
|
22
22
|
line-height: 24px;
|
|
23
23
|
font-weight: 400;
|
|
24
|
-
} .
|
|
24
|
+
} .chart__circle_m7nsj {
|
|
25
25
|
opacity: 0.3;
|
|
26
26
|
fill: var(--color-dark-bg-primary);
|
|
27
|
-
} .
|
|
27
|
+
} .chart__circle_m7nsj {
|
|
28
28
|
opacity: 0.3;
|
|
29
29
|
fill: var(--color-dark-bg-primary);
|
|
30
30
|
}
|