@semcore/d3-chart 1.5.2 → 1.5.6
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 +24 -0
- package/lib/cjs/Area.js +15 -13
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +12 -12
- package/lib/cjs/Bar.js +21 -17
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Donut.js +77 -64
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +8 -7
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +8 -7
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +21 -17
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +14 -12
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/StackBar.js +39 -14
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +11 -9
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +11 -11
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +8 -8
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/color.js +32 -30
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/style/area.shadow.css +12 -2
- package/lib/cjs/style/bar.shadow.css +7 -2
- package/lib/cjs/style/donut.shadow.css +15 -0
- package/lib/cjs/style/dot.shadow.css +6 -1
- package/lib/cjs/style/line.shadow.css +6 -1
- package/lib/cjs/style/tooltip.shadow.css +5 -0
- package/lib/cjs/style/var.css +32 -0
- package/lib/cjs/style/venn.shadow.css +7 -1
- package/lib/es6/Area.js +15 -13
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +12 -12
- package/lib/es6/Bar.js +21 -17
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Donut.js +77 -64
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +8 -7
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +8 -7
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +21 -17
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +14 -12
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/StackBar.js +39 -14
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +11 -9
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +10 -10
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +8 -8
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/color.js +33 -31
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/style/area.shadow.css +12 -2
- package/lib/es6/style/bar.shadow.css +7 -2
- package/lib/es6/style/donut.shadow.css +15 -0
- package/lib/es6/style/dot.shadow.css +6 -1
- package/lib/es6/style/line.shadow.css +6 -1
- package/lib/es6/style/tooltip.shadow.css +5 -0
- package/lib/es6/style/var.css +32 -0
- package/lib/es6/style/venn.shadow.css +7 -1
- package/lib/types/Bar.d.ts +1 -1
- package/lib/types/HorizontalBar.d.ts +1 -1
- package/package.json +1 -1
- package/src/Area.js +2 -3
- package/src/Bar.js +13 -10
- package/src/Donut.js +8 -7
- package/src/GroupBar.js +6 -2
- package/src/HorizontalBar.js +14 -10
- package/src/Line.js +2 -3
- package/src/StackBar.js +24 -7
- package/src/StackedArea.js +3 -2
- package/src/Tooltip.js +2 -2
- package/src/Venn.js +1 -1
- package/src/color.js +6 -32
- package/src/style/area.shadow.css +12 -2
- package/src/style/bar.shadow.css +7 -2
- package/src/style/donut.shadow.css +15 -0
- package/src/style/dot.shadow.css +6 -1
- package/src/style/line.shadow.css +6 -1
- package/src/style/tooltip.shadow.css +5 -0
- package/src/style/var.css +32 -0
- package/src/style/venn.shadow.css +7 -1
- package/src/types/Bar.d.ts +1 -1
- package/src/types/HorizontalBar.d.ts +1 -1
package/src/color.js
CHANGED
|
@@ -1,35 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
'
|
|
5
|
-
|
|
6
|
-
'blue-05': '#084c80',
|
|
7
|
-
'green-01': '#3ab011',
|
|
8
|
-
'green-02': '#91d27b',
|
|
9
|
-
'green-03': '#278707',
|
|
10
|
-
'green-04': '#d1edc8',
|
|
11
|
-
'green-05': '#1a6700',
|
|
12
|
-
'orange-01': '#ff8e29',
|
|
13
|
-
'orange-02': '#fec089',
|
|
14
|
-
'orange-03': '#da6905',
|
|
15
|
-
'orange-04': '#ffe5cd',
|
|
16
|
-
'orange-05': '#a14e03',
|
|
17
|
-
'violet-01': '#890c85',
|
|
18
|
-
'violet-02': '#c783c5',
|
|
19
|
-
'violet-03': '#6e026b',
|
|
20
|
-
'violet-04': '#e7cbe6',
|
|
21
|
-
'violet-05': '#4d024b',
|
|
22
|
-
'red-01': '#e91e25',
|
|
23
|
-
'red-02': '#f69498',
|
|
24
|
-
'red-03': '#bd0000',
|
|
25
|
-
'red-04': '#fbd2d3',
|
|
26
|
-
'red-05': '#830005',
|
|
27
|
-
'yellow-01': '#ffc83f',
|
|
28
|
-
'yellow-02': '#ffdb82',
|
|
29
|
-
'yellow-03': '#e4aa18',
|
|
30
|
-
'yellow-04': '#ffebb9',
|
|
31
|
-
'yellow-05': '#b3840c',
|
|
32
|
-
};
|
|
1
|
+
/*__semcore-vars__:"./style/var.css"*/
|
|
2
|
+
const colors = preval`
|
|
3
|
+
const path = require('path');
|
|
4
|
+
module.exports = require('@semcore/babel-plugin-react-semcore/utils/vars')(path.resolve(__dirname, './style/var.css'));
|
|
5
|
+
`;
|
|
33
6
|
|
|
34
7
|
let componentRenderIndex = 0;
|
|
35
8
|
const cache = {};
|
|
@@ -37,6 +10,7 @@ const colorValues = Object.keys(colors).sort((a, b) => {
|
|
|
37
10
|
return parseInt(a.match(/[0-9]/g).join(''), 10) - parseInt(b.match(/[0-9]/g).join(''), 10);
|
|
38
11
|
});
|
|
39
12
|
|
|
13
|
+
export { colors };
|
|
40
14
|
export default function getColor(key) {
|
|
41
15
|
if (cache[key]) {
|
|
42
16
|
return cache[key];
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
|
+
|
|
1
3
|
SArea {
|
|
2
|
-
fill: var(--
|
|
4
|
+
fill: var(--blue-01);
|
|
3
5
|
fill-opacity: 0.4;
|
|
4
6
|
}
|
|
5
7
|
|
|
8
|
+
SArea[color] {
|
|
9
|
+
fill: var(--color);
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
SAreaLine {
|
|
7
|
-
stroke: var(--
|
|
13
|
+
stroke: var(--blue-01);
|
|
8
14
|
stroke-width: 3;
|
|
9
15
|
fill: transparent;
|
|
10
16
|
}
|
|
11
17
|
|
|
18
|
+
SAreaLine[color] {
|
|
19
|
+
stroke: var(--color);
|
|
20
|
+
}
|
|
21
|
+
|
|
12
22
|
SArea,
|
|
13
23
|
SAreaLine {
|
|
14
24
|
transition-property: d;
|
package/src/style/bar.shadow.css
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
@import '@semcore/utils/style/var.css';
|
|
2
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
3
|
|
|
3
4
|
SBar {
|
|
4
|
-
fill: var(--
|
|
5
|
+
fill: var(--blue-01);
|
|
5
6
|
transition-property: height, width, y;
|
|
6
7
|
transition-duration: var(--duration);
|
|
7
8
|
transition-timing-function: ease-in-out;
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
SBar[color] {
|
|
12
|
+
fill: var(--color);
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
SBar[hide] {
|
|
11
16
|
display: none;
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
SBackground {
|
|
15
|
-
fill:
|
|
20
|
+
fill: var(--mystic);
|
|
16
21
|
}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
@import '@semcore/utils/style/var.css';
|
|
2
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
+
|
|
1
4
|
SPie {
|
|
2
5
|
stroke: #ffffff;
|
|
6
|
+
fill: var(--blue-01);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
SPie[color] {
|
|
10
|
+
fill: var(--color);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
SEmptyData {
|
|
14
|
+
fill: var(--mystic);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
SEmptyData[color] {
|
|
3
18
|
fill: var(--color);
|
|
4
19
|
}
|
|
5
20
|
|
package/src/style/dot.shadow.css
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
@import '@semcore/utils/style/var.css';
|
|
2
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
3
|
|
|
3
4
|
SDot {
|
|
4
5
|
stroke-width: 2px;
|
|
5
6
|
stroke: #fff;
|
|
6
7
|
r: 6px;
|
|
7
|
-
fill: var(--
|
|
8
|
+
fill: var(--blue-01);
|
|
8
9
|
transition-property: cx, cy;
|
|
9
10
|
transition-duration: var(--duration);
|
|
10
11
|
transition-timing-function: ease-in-out;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
SDot[color] {
|
|
15
|
+
fill: var(--color);
|
|
16
|
+
}
|
|
17
|
+
|
|
13
18
|
SDot[hide] {
|
|
14
19
|
display: none;
|
|
15
20
|
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
@import '@semcore/utils/style/var.css';
|
|
2
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
3
|
|
|
3
4
|
SLine {
|
|
4
5
|
fill: transparent;
|
|
5
6
|
stroke-width: 3;
|
|
6
|
-
stroke: var(--
|
|
7
|
+
stroke: var(--blue-01);
|
|
7
8
|
transition-property: d;
|
|
8
9
|
transition-duration: var(--duration);
|
|
9
10
|
transition-timing-function: ease-in-out;
|
|
10
11
|
}
|
|
11
12
|
|
|
13
|
+
SLine[color] {
|
|
14
|
+
stroke: var(--color);
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
SLine[hide] {
|
|
13
18
|
display: none;
|
|
14
19
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import '@semcore/utils/style/var.css';
|
|
2
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
3
|
|
|
3
4
|
STooltip {
|
|
4
5
|
position: relative;
|
|
@@ -27,5 +28,9 @@ SDot {
|
|
|
27
28
|
height: 8px;
|
|
28
29
|
border-radius: 50%;
|
|
29
30
|
margin-right: 8px;
|
|
31
|
+
background: var(--blue-01);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SDot[color] {
|
|
30
35
|
background: var(--color);
|
|
31
36
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--blue-01: #50aef4;
|
|
3
|
+
--blue-02: #91c7ef;
|
|
4
|
+
--blue-03: #0e75c2;
|
|
5
|
+
--blue-04: #d1e8f8;
|
|
6
|
+
--blue-05: #084c80;
|
|
7
|
+
--green-01: #3ab011;
|
|
8
|
+
--green-02: #91d27b;
|
|
9
|
+
--green-03: #278707;
|
|
10
|
+
--green-04: #d1edc8;
|
|
11
|
+
--green-05: #1a6700;
|
|
12
|
+
--orange-01: #ff8e29;
|
|
13
|
+
--orange-02: #fec089;
|
|
14
|
+
--orange-03: #da6905;
|
|
15
|
+
--orange-04: #ffe5cd;
|
|
16
|
+
--orange-05: #a14e03;
|
|
17
|
+
--violet-01: #890c85;
|
|
18
|
+
--violet-02: #c783c5;
|
|
19
|
+
--violet-03: #6e026b;
|
|
20
|
+
--violet-04: #e7cbe6;
|
|
21
|
+
--violet-05: #4d024b;
|
|
22
|
+
--red-01: #e91e25;
|
|
23
|
+
--red-02: #f69498;
|
|
24
|
+
--red-03: #bd0000;
|
|
25
|
+
--red-04: #fbd2d3;
|
|
26
|
+
--red-05: #830005;
|
|
27
|
+
--yellow-01: #ffc83f;
|
|
28
|
+
--yellow-02: #ffdb82;
|
|
29
|
+
--yellow-03: #e4aa18;
|
|
30
|
+
--yellow-04: #ffebb9;
|
|
31
|
+
--yellow-05: #b3840c;
|
|
32
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
|
+
|
|
1
3
|
SCircle {
|
|
2
|
-
fill: var(--
|
|
4
|
+
fill: var(--green-01);
|
|
3
5
|
stroke: #fff;
|
|
4
6
|
stroke-width: 2px;
|
|
5
7
|
fill-opacity: 0.5;
|
|
@@ -12,6 +14,10 @@ SCircle {
|
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
SCircle[color] {
|
|
18
|
+
fill: var(--color);
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
SIntersection {
|
|
16
22
|
stroke: #fff;
|
|
17
23
|
stroke-width: 2px;
|
package/src/types/Bar.d.ts
CHANGED