@semcore/d3-chart 2.2.2 → 2.2.3
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 +10 -1
- package/lib/cjs/Area.js +9 -9
- package/lib/cjs/Area.js.map +1 -1
- package/lib/cjs/Axis.js +19 -17
- package/lib/cjs/Axis.js.map +1 -1
- package/lib/cjs/Bar.js +11 -11
- package/lib/cjs/Bar.js.map +1 -1
- package/lib/cjs/Bubble.js +12 -12
- package/lib/cjs/Bubble.js.map +1 -1
- package/lib/cjs/ClipPath.js +1 -1
- package/lib/cjs/ClipPath.js.map +1 -1
- package/lib/cjs/Donut.js +8 -8
- package/lib/cjs/Donut.js.map +1 -1
- package/lib/cjs/Dots.js +9 -9
- package/lib/cjs/Dots.js.map +1 -1
- package/lib/cjs/GroupBar.js +8 -8
- package/lib/cjs/GroupBar.js.map +1 -1
- package/lib/cjs/HorizontalBar.js +11 -11
- package/lib/cjs/HorizontalBar.js.map +1 -1
- package/lib/cjs/Hover.js +4 -4
- package/lib/cjs/Hover.js.map +1 -1
- package/lib/cjs/Line.js +8 -8
- package/lib/cjs/Line.js.map +1 -1
- package/lib/cjs/Plot.js +4 -4
- package/lib/cjs/Plot.js.map +1 -1
- package/lib/cjs/RadialTree.js +99 -59
- package/lib/cjs/RadialTree.js.map +1 -1
- package/lib/cjs/ReferenceLine.js +10 -10
- package/lib/cjs/ReferenceLine.js.map +1 -1
- package/lib/cjs/ResponsiveContainer.js +1 -1
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/ScatterPlot.js.map +1 -1
- package/lib/cjs/StackBar.js +8 -8
- package/lib/cjs/StackBar.js.map +1 -1
- package/lib/cjs/StackedArea.js +8 -8
- package/lib/cjs/StackedArea.js.map +1 -1
- package/lib/cjs/Tooltip.js +15 -11
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +9 -9
- package/lib/cjs/Venn.js.map +1 -1
- package/lib/cjs/color.js.map +1 -1
- package/lib/cjs/createElement.js +1 -1
- package/lib/cjs/createElement.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/radial-tree.shadow.css +0 -1
- package/lib/cjs/utils.js.map +1 -1
- package/lib/es6/Area.js +9 -9
- package/lib/es6/Area.js.map +1 -1
- package/lib/es6/Axis.js +19 -17
- package/lib/es6/Axis.js.map +1 -1
- package/lib/es6/Bar.js +11 -11
- package/lib/es6/Bar.js.map +1 -1
- package/lib/es6/Bubble.js +12 -12
- package/lib/es6/Bubble.js.map +1 -1
- package/lib/es6/ClipPath.js +1 -1
- package/lib/es6/ClipPath.js.map +1 -1
- package/lib/es6/Donut.js +8 -8
- package/lib/es6/Donut.js.map +1 -1
- package/lib/es6/Dots.js +9 -9
- package/lib/es6/Dots.js.map +1 -1
- package/lib/es6/GroupBar.js +8 -8
- package/lib/es6/GroupBar.js.map +1 -1
- package/lib/es6/HorizontalBar.js +11 -11
- package/lib/es6/HorizontalBar.js.map +1 -1
- package/lib/es6/Hover.js +4 -4
- package/lib/es6/Hover.js.map +1 -1
- package/lib/es6/Line.js +8 -8
- package/lib/es6/Line.js.map +1 -1
- package/lib/es6/Plot.js +4 -4
- package/lib/es6/Plot.js.map +1 -1
- package/lib/es6/RadialTree.js +99 -59
- package/lib/es6/RadialTree.js.map +1 -1
- package/lib/es6/ReferenceLine.js +10 -10
- package/lib/es6/ReferenceLine.js.map +1 -1
- package/lib/es6/ResponsiveContainer.js +1 -1
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/ScatterPlot.js.map +1 -1
- package/lib/es6/StackBar.js +8 -8
- package/lib/es6/StackBar.js.map +1 -1
- package/lib/es6/StackedArea.js +8 -8
- package/lib/es6/StackedArea.js.map +1 -1
- package/lib/es6/Tooltip.js +15 -11
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +9 -9
- package/lib/es6/Venn.js.map +1 -1
- package/lib/es6/color.js.map +1 -1
- package/lib/es6/createElement.js +1 -1
- package/lib/es6/createElement.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/radial-tree.shadow.css +0 -1
- package/lib/es6/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/Area.jsx +0 -137
- package/src/Axis.jsx +0 -314
- package/src/Bar.jsx +0 -149
- package/src/Bubble.jsx +0 -165
- package/src/ClipPath.jsx +0 -47
- package/src/Donut.jsx +0 -319
- package/src/Dots.jsx +0 -97
- package/src/GroupBar.jsx +0 -76
- package/src/HorizontalBar.jsx +0 -135
- package/src/Hover.jsx +0 -153
- package/src/Line.jsx +0 -89
- package/src/Plot.jsx +0 -79
- package/src/RadialTree.tsx +0 -767
- package/src/ReferenceLine.jsx +0 -146
- package/src/ResponsiveContainer.jsx +0 -84
- package/src/ScatterPlot.jsx +0 -112
- package/src/StackBar.jsx +0 -105
- package/src/StackedArea.jsx +0 -65
- package/src/Tooltip.jsx +0 -145
- package/src/Venn.jsx +0 -114
- package/src/color.js +0 -21
- package/src/createElement.jsx +0 -135
- package/src/index.js +0 -27
- package/src/style/area.shadow.css +0 -37
- package/src/style/axis.shadow.css +0 -85
- package/src/style/bar.shadow.css +0 -21
- package/src/style/bubble.shadow.css +0 -45
- package/src/style/donut.shadow.css +0 -24
- package/src/style/dot.shadow.css +0 -29
- package/src/style/hover.shadow.css +0 -9
- package/src/style/line.shadow.css +0 -29
- package/src/style/plot.shadow.css +0 -6
- package/src/style/radial-tree.shadow.css +0 -34
- package/src/style/reference-line.shadow.css +0 -37
- package/src/style/scatterplot.shadow.css +0 -27
- package/src/style/tooltip.shadow.css +0 -36
- package/src/style/var.css +0 -125
- package/src/style/venn.shadow.css +0 -29
- package/src/types/Area.d.ts +0 -48
- package/src/types/Axis.d.ts +0 -64
- package/src/types/Bar.d.ts +0 -52
- package/src/types/Bubble.d.ts +0 -32
- package/src/types/ClipPath.d.ts +0 -26
- package/src/types/Donut.d.ts +0 -46
- package/src/types/GroupBar.d.ts +0 -20
- package/src/types/HorizontalBar.d.ts +0 -29
- package/src/types/Hover.d.ts +0 -15
- package/src/types/Line.d.ts +0 -50
- package/src/types/Plot.d.ts +0 -16
- package/src/types/ReferenceLine.d.ts +0 -31
- package/src/types/ResponsiveContainer.d.ts +0 -20
- package/src/types/ScatterPlot.d.ts +0 -27
- package/src/types/StackBar.d.ts +0 -26
- package/src/types/StackedArea.d.ts +0 -26
- package/src/types/Tooltip.d.ts +0 -33
- package/src/types/Venn.d.ts +0 -45
- package/src/types/context.d.ts +0 -6
- package/src/types/index.d.ts +0 -56
- package/src/utils.ts +0 -227
package/src/Venn.jsx
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { venn, normalizeSolution, scaleSolution, intersectionAreaPath } from '@upsetjs/venn.js';
|
|
3
|
-
import { Component, sstyled } from '@semcore/core';
|
|
4
|
-
import canUseDOM from '@semcore/utils/lib/canUseDOM';
|
|
5
|
-
import { FadeInOut } from '@semcore/animation';
|
|
6
|
-
|
|
7
|
-
import createElement from './createElement';
|
|
8
|
-
import { CONSTANT } from './utils';
|
|
9
|
-
|
|
10
|
-
import style from './style/venn.shadow.css';
|
|
11
|
-
|
|
12
|
-
class VennRoot extends Component {
|
|
13
|
-
static displayName = 'Venn';
|
|
14
|
-
static style = style;
|
|
15
|
-
|
|
16
|
-
static defaultProps = {
|
|
17
|
-
orientation: Math.PI / 2,
|
|
18
|
-
orientationOrder: (c1, c2) => c2.radius - c1.radius,
|
|
19
|
-
duration: 500,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
virtualElement = canUseDOM() ? document.createElement('div') : {};
|
|
23
|
-
|
|
24
|
-
generateGetBoundingClientRect(x = 0, y = 0) {
|
|
25
|
-
return () => ({ width: 0, height: 0, top: y, right: x, bottom: y, left: x });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
bindHandlerTooltip =
|
|
29
|
-
(visible, props) =>
|
|
30
|
-
({ clientX: x, clientY: y }) => {
|
|
31
|
-
const { eventEmitter } = this.asProps;
|
|
32
|
-
this.virtualElement.getBoundingClientRect = this.generateGetBoundingClientRect(x, y);
|
|
33
|
-
this.virtualElement[CONSTANT.VIRTUAL_ELEMENT] = true;
|
|
34
|
-
eventEmitter.emit('onTooltipVisible', visible, props, this.virtualElement);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
getVennData() {
|
|
38
|
-
const { data, orientation, orientationOrder, size } = this.asProps;
|
|
39
|
-
const [width, height] = size;
|
|
40
|
-
const vennData = Object.entries(data).map(([dataKey, size]) => ({
|
|
41
|
-
sets: dataKey.split('/'),
|
|
42
|
-
size,
|
|
43
|
-
}));
|
|
44
|
-
return scaleSolution(
|
|
45
|
-
normalizeSolution(venn(vennData), orientation, orientationOrder),
|
|
46
|
-
width,
|
|
47
|
-
height,
|
|
48
|
-
10,
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
getCircleProps(props) {
|
|
53
|
-
return {
|
|
54
|
-
duration: this.asProps.duration,
|
|
55
|
-
data: this.vennData[props.dataKey],
|
|
56
|
-
onMouseMove: this.bindHandlerTooltip(true, props),
|
|
57
|
-
onMouseLeave: this.bindHandlerTooltip(false, props),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
getIntersectionProps(props) {
|
|
62
|
-
const { duration } = this.asProps;
|
|
63
|
-
const dataKeys = props.dataKey.split('/');
|
|
64
|
-
return {
|
|
65
|
-
duration,
|
|
66
|
-
delay: duration,
|
|
67
|
-
data: Object.values(this.vennData).filter((d) => dataKeys.includes(d.setid)),
|
|
68
|
-
onMouseMove: this.bindHandlerTooltip(true, props),
|
|
69
|
-
onMouseLeave: this.bindHandlerTooltip(false, props),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
renderElement = React.forwardRef((props, ref) => {
|
|
74
|
-
return <FadeInOut ref={ref} tag="g" visible {...props} />;
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
render() {
|
|
78
|
-
const Element = this.Element;
|
|
79
|
-
this.vennData = this.getVennData();
|
|
80
|
-
return (
|
|
81
|
-
<Element render={this.renderElement} childrenPosition="inside" vennData={this.vennData} />
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function Circle({ Element: SCircle, styles, color, data, duration }) {
|
|
87
|
-
return sstyled(styles)(
|
|
88
|
-
<SCircle
|
|
89
|
-
render="circle"
|
|
90
|
-
color={color}
|
|
91
|
-
cx={data.x}
|
|
92
|
-
cy={data.y}
|
|
93
|
-
r={data.radius}
|
|
94
|
-
use:duration={`${duration}ms`}
|
|
95
|
-
/>,
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function Intersection(props) {
|
|
100
|
-
const { Element: SIntersection, styles, data } = props;
|
|
101
|
-
const renderIntersection = React.useCallback(
|
|
102
|
-
React.forwardRef((props, ref) => {
|
|
103
|
-
return <FadeInOut ref={ref} tag="path" visible {...props} />;
|
|
104
|
-
}),
|
|
105
|
-
[props],
|
|
106
|
-
);
|
|
107
|
-
return sstyled(styles)(
|
|
108
|
-
<SIntersection render={renderIntersection} d={intersectionAreaPath(data)} />,
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const Venn = createElement(VennRoot, { Circle, Intersection });
|
|
113
|
-
|
|
114
|
-
export default Venn;
|
package/src/color.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*__semcore-vars__:"./style/var.css"*/
|
|
2
|
-
const colors = preval`
|
|
3
|
-
const path = require('path');
|
|
4
|
-
module.exports = require('@semcore/babel-plugin-react-semcore').getColorVars(path.resolve(__dirname, './style/var.css'));
|
|
5
|
-
`;
|
|
6
|
-
|
|
7
|
-
let componentRenderIndex = 0;
|
|
8
|
-
const cache = {};
|
|
9
|
-
const colorValues = Object.keys(colors).sort((a, b) => {
|
|
10
|
-
return parseInt(a.match(/[0-9]/g).join(''), 10) - parseInt(b.match(/[0-9]/g).join(''), 10);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export { colors };
|
|
14
|
-
export default function getColor(key) {
|
|
15
|
-
if (cache[key]) {
|
|
16
|
-
return cache[key];
|
|
17
|
-
}
|
|
18
|
-
const color = colors[colorValues[componentRenderIndex++]];
|
|
19
|
-
cache[key] = color;
|
|
20
|
-
return color;
|
|
21
|
-
}
|
package/src/createElement.jsx
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import createComponent, { createBaseComponent, CONTEXT_COMPONENT } from '@semcore/core';
|
|
3
|
-
import Plot from './Plot';
|
|
4
|
-
import assignProps from '@semcore/utils/lib/assignProps';
|
|
5
|
-
import { useForkRef } from '@semcore/utils/lib/ref';
|
|
6
|
-
import propsForElement from '@semcore/utils/lib/propsForElement';
|
|
7
|
-
import getOriginChildren from '@semcore/utils/lib/getOriginChildren';
|
|
8
|
-
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
9
|
-
|
|
10
|
-
const EXCLUDE_PROPS = ['data', 'scale'];
|
|
11
|
-
|
|
12
|
-
function createElementRender() {
|
|
13
|
-
const Element = React.forwardRef(function (
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
-
{ render, childrenPosition = 'below', x: xS, y: yS, ...source },
|
|
16
|
-
ref,
|
|
17
|
-
) {
|
|
18
|
-
const {
|
|
19
|
-
forwardRef = null,
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
children: _children,
|
|
22
|
-
Children,
|
|
23
|
-
x = xS,
|
|
24
|
-
y = yS,
|
|
25
|
-
...props
|
|
26
|
-
} = Element.props;
|
|
27
|
-
let children = getOriginChildren(Children);
|
|
28
|
-
|
|
29
|
-
let mergedProps = assignProps(
|
|
30
|
-
{
|
|
31
|
-
x: xS,
|
|
32
|
-
y: yS,
|
|
33
|
-
...props,
|
|
34
|
-
ref: useForkRef(forwardRef, ref),
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
x,
|
|
38
|
-
y,
|
|
39
|
-
...source,
|
|
40
|
-
},
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
if (typeof children === 'function') {
|
|
44
|
-
const _child = mergedProps.children;
|
|
45
|
-
mergedProps = assignProps(children(mergedProps), mergedProps);
|
|
46
|
-
children = mergedProps.children;
|
|
47
|
-
mergedProps.children = _child;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const Tag = typeof render === 'string' ? mergedProps.tag || render : render;
|
|
51
|
-
|
|
52
|
-
if (childrenPosition === 'inside') {
|
|
53
|
-
mergedProps.children = children === undefined ? mergedProps.children : children;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (!Tag) {
|
|
57
|
-
throw new Error('Element expected render prop to be passed');
|
|
58
|
-
}
|
|
59
|
-
return [
|
|
60
|
-
<React.Fragment key="child-above">
|
|
61
|
-
{childrenPosition === 'above' ? children : null}
|
|
62
|
-
</React.Fragment>,
|
|
63
|
-
<Tag
|
|
64
|
-
{...propsForElement(
|
|
65
|
-
{
|
|
66
|
-
__excludeProps: EXCLUDE_PROPS,
|
|
67
|
-
...mergedProps,
|
|
68
|
-
},
|
|
69
|
-
Tag,
|
|
70
|
-
)}
|
|
71
|
-
key="element"
|
|
72
|
-
/>,
|
|
73
|
-
<React.Fragment key="child-below">
|
|
74
|
-
{childrenPosition === 'below' ? children : null}
|
|
75
|
-
</React.Fragment>,
|
|
76
|
-
];
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
Element.props = {};
|
|
80
|
-
return Element;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function elementEnhancement() {
|
|
84
|
-
return {
|
|
85
|
-
init: function () {
|
|
86
|
-
this.Element = createElementRender();
|
|
87
|
-
},
|
|
88
|
-
asProps: function ({ $rootProps, ...props }, WrapperComponent, isFunction) {
|
|
89
|
-
if (isFunction) {
|
|
90
|
-
return {
|
|
91
|
-
...$rootProps,
|
|
92
|
-
...props,
|
|
93
|
-
Element: this.Element,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
...$rootProps,
|
|
98
|
-
...props,
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
render: function (render, props) {
|
|
102
|
-
this.Element.props = props;
|
|
103
|
-
return render;
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function WrapComponent(Element) {
|
|
109
|
-
function ElementWithContext(props, ref) {
|
|
110
|
-
const { $rootProps } = useContext(Plot[CONTEXT_COMPONENT]);
|
|
111
|
-
return <Element ref={ref} $rootProps={$rootProps} {...props} />;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
ElementWithContext.displayName = Element.displayName;
|
|
115
|
-
|
|
116
|
-
const WrapperComponent = createBaseComponent(ElementWithContext);
|
|
117
|
-
WrapperComponent.displayName = Element.displayName;
|
|
118
|
-
|
|
119
|
-
return hoistNonReactStatics(WrapperComponent, Element);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function createElement(ElementRoot, child = {}, options = {}) {
|
|
123
|
-
const Element = createComponent(ElementRoot, child, {
|
|
124
|
-
...options,
|
|
125
|
-
enhancements: [elementEnhancement],
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
Object.keys(child).forEach((n) => {
|
|
129
|
-
Element[n] = WrapComponent(Element[n]);
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
return WrapComponent(Element);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export default createElement;
|
package/src/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export { default as Plot } from './Plot';
|
|
2
|
-
|
|
3
|
-
export { XAxis, YAxis } from './Axis';
|
|
4
|
-
|
|
5
|
-
export { default as Line } from './Line';
|
|
6
|
-
|
|
7
|
-
export { default as Bar } from './Bar';
|
|
8
|
-
export { default as HorizontalBar } from './HorizontalBar';
|
|
9
|
-
export { default as GroupBar } from './GroupBar';
|
|
10
|
-
export { default as StackBar } from './StackBar';
|
|
11
|
-
export { default as Area } from './Area';
|
|
12
|
-
export { default as StackedArea } from './StackedArea';
|
|
13
|
-
export { default as ScatterPlot } from './ScatterPlot';
|
|
14
|
-
export { default as Bubble } from './Bubble';
|
|
15
|
-
export { default as RadialTree } from './RadialTree';
|
|
16
|
-
export { default as Donut } from './Donut';
|
|
17
|
-
export { default as Venn } from './Venn';
|
|
18
|
-
|
|
19
|
-
export { default as Tooltip } from './Tooltip';
|
|
20
|
-
|
|
21
|
-
export { default as ResponsiveContainer } from './ResponsiveContainer';
|
|
22
|
-
export { default as ReferenceLine } from './ReferenceLine';
|
|
23
|
-
|
|
24
|
-
export { HoverLine, HoverRect } from './Hover';
|
|
25
|
-
|
|
26
|
-
export { minMax } from './utils';
|
|
27
|
-
export { colors } from './color';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
2
|
-
|
|
3
|
-
SArea {
|
|
4
|
-
fill: var(--blue-03);
|
|
5
|
-
fill-opacity: 0.2;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
SArea[color] {
|
|
9
|
-
fill: var(--color);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
SAreaLine {
|
|
13
|
-
stroke: var(--blue-03);
|
|
14
|
-
stroke-width: 3;
|
|
15
|
-
fill: transparent;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
SAreaLine[color] {
|
|
19
|
-
stroke: var(--color);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
SArea,
|
|
23
|
-
SAreaLine {
|
|
24
|
-
transition-property: d;
|
|
25
|
-
transition-duration: var(--duration);
|
|
26
|
-
transition-timing-function: ease-in-out;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
SNull {
|
|
30
|
-
fill: transparent;
|
|
31
|
-
stroke: var(--gray-400);
|
|
32
|
-
stroke-dasharray: 4;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
SNull[hide] {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
|
|
3
|
-
SAxis {
|
|
4
|
-
stroke: var(--gray-200);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
SAxis[hide] {
|
|
8
|
-
display: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
STick {
|
|
12
|
-
font-size: 12px;
|
|
13
|
-
fill: var(--gray-500);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
STick[hide] {
|
|
17
|
-
display: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
SGrid {
|
|
21
|
-
fill: transparent;
|
|
22
|
-
stroke: var(--gray-100);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
STitle {
|
|
26
|
-
font-size: 12px;
|
|
27
|
-
fill: var(--gray-500);
|
|
28
|
-
transform-origin: var(--transform-origin);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
STitle[position='top'] {
|
|
32
|
-
text-anchor: middle;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
STitle[position='bottom'] {
|
|
36
|
-
text-anchor: middle;
|
|
37
|
-
alignment-baseline: hanging;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
STitle[position='right'] {
|
|
41
|
-
transform: rotate(-90deg);
|
|
42
|
-
alignment-baseline: middle;
|
|
43
|
-
text-anchor: middle;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
STitle[position='left'] {
|
|
47
|
-
transform: rotate(-90deg);
|
|
48
|
-
text-anchor: middle;
|
|
49
|
-
alignment-baseline: middle;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
STick[position='top'] {
|
|
53
|
-
transform: translateY(-12px);
|
|
54
|
-
text-anchor: middle;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
STick[position='bottom'] {
|
|
58
|
-
transform: translateY(12px);
|
|
59
|
-
text-anchor: middle;
|
|
60
|
-
alignment-baseline: hanging;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
STick[position='right'] {
|
|
64
|
-
transform: translateX(16px);
|
|
65
|
-
text-anchor: start;
|
|
66
|
-
alignment-baseline: middle;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
STick[position='left'] {
|
|
70
|
-
transform: translateX(-16px);
|
|
71
|
-
text-anchor: end;
|
|
72
|
-
alignment-baseline: middle;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
STick[position='custom_0'] {
|
|
76
|
-
transform: translateY(12px);
|
|
77
|
-
text-anchor: middle;
|
|
78
|
-
alignment-baseline: hanging;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
STick[position='custom_1'] {
|
|
82
|
-
transform: translateX(-16px);
|
|
83
|
-
text-anchor: end;
|
|
84
|
-
alignment-baseline: middle;
|
|
85
|
-
}
|
package/src/style/bar.shadow.css
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SBar {
|
|
5
|
-
fill: var(--blue-03);
|
|
6
|
-
transition-property: height, width, y;
|
|
7
|
-
transition-duration: var(--duration);
|
|
8
|
-
transition-timing-function: ease-in-out;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
SBar[color] {
|
|
12
|
-
fill: var(--color);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
SBar[hide] {
|
|
16
|
-
display: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
SBackground {
|
|
20
|
-
fill: var(--gray-200);
|
|
21
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SBubble {
|
|
5
|
-
fill: var(--blue-03);
|
|
6
|
-
stroke: #fff;
|
|
7
|
-
stroke-width: 2px;
|
|
8
|
-
transition-property: cx, cy;
|
|
9
|
-
transition-duration: var(--duration);
|
|
10
|
-
transition-timing-function: ease-in-out;
|
|
11
|
-
opacity: 0.5;
|
|
12
|
-
&:hover {
|
|
13
|
-
opacity: 0.8;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
SBubble[color] {
|
|
18
|
-
fill: var(--color);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
SCenter {
|
|
22
|
-
text-anchor: middle;
|
|
23
|
-
font-size: 11px;
|
|
24
|
-
stroke: var(--blue-03);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
SCenter[color] {
|
|
28
|
-
stroke: var(--color);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
SLabel {
|
|
32
|
-
fill: var(--blue-03);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
SLabel[position='right'] {
|
|
36
|
-
text-anchor: end;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
SLabel[position='left'] {
|
|
40
|
-
text-anchor: start;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
SLabel[color] {
|
|
44
|
-
fill: var(--color);
|
|
45
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SPie {
|
|
5
|
-
stroke: #ffffff;
|
|
6
|
-
fill: var(--blue-03);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
SPie[color] {
|
|
10
|
-
fill: var(--color);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
SEmptyData {
|
|
14
|
-
fill: var(--gray-100);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
SEmptyData[color] {
|
|
18
|
-
fill: var(--color);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
SLabel {
|
|
22
|
-
text-anchor: middle;
|
|
23
|
-
vertical-anchor: middle;
|
|
24
|
-
}
|
package/src/style/dot.shadow.css
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SDots {
|
|
5
|
-
& SDot {
|
|
6
|
-
transition-duration: var(--duration);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
SDot {
|
|
11
|
-
stroke-width: 2px;
|
|
12
|
-
stroke: #fff;
|
|
13
|
-
r: 6px;
|
|
14
|
-
fill: var(--blue-03);
|
|
15
|
-
transition-property: cx, cy;
|
|
16
|
-
transition-timing-function: ease-in-out;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
SDot[hide] {
|
|
20
|
-
display: none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
SDot[active] {
|
|
24
|
-
r: 8px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
SDot[color] {
|
|
28
|
-
fill: var(--color);
|
|
29
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SLine {
|
|
5
|
-
fill: transparent;
|
|
6
|
-
stroke-width: 3;
|
|
7
|
-
stroke: var(--blue-03);
|
|
8
|
-
transition-property: d;
|
|
9
|
-
transition-duration: var(--duration);
|
|
10
|
-
transition-timing-function: ease-in-out;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
SLine[color] {
|
|
14
|
-
stroke: var(--color);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
SLine[hide] {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
SNull {
|
|
22
|
-
fill: transparent;
|
|
23
|
-
stroke: var(--gray-200);
|
|
24
|
-
stroke-dasharray: 4;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
SNull[hide] {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SRadian {
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
fill: var(--blue-04);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
SLine {
|
|
10
|
-
stroke: var(--blue-04);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
SLine[color] {
|
|
14
|
-
stroke: var(--color);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
SCap {
|
|
18
|
-
transition: r 0.1s;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
SLabel {
|
|
22
|
-
fill: var(--color);
|
|
23
|
-
cursor: var(--text-cursor);
|
|
24
|
-
transform-origin: var(--transform-origin);
|
|
25
|
-
}
|
|
26
|
-
SRadian:hover SLabel {
|
|
27
|
-
fill: var(--color-hovered);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@media (prefers-reduced-motion) {
|
|
31
|
-
SLineCap {
|
|
32
|
-
transition: none;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
|
|
3
|
-
SReferenceLine {
|
|
4
|
-
fill: none;
|
|
5
|
-
stroke: var(--gray-300);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
STitle {
|
|
9
|
-
font-size: var(--fs-100);
|
|
10
|
-
fill: var(--gray-500);
|
|
11
|
-
transform-origin: var(--transform-origin);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
STitle[position='top'] {
|
|
15
|
-
text-anchor: middle;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
STitle[position='bottom'] {
|
|
19
|
-
text-anchor: middle;
|
|
20
|
-
alignment-baseline: hanging;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
STitle[position='right'] {
|
|
24
|
-
transform: rotate(-90deg);
|
|
25
|
-
alignment-baseline: middle;
|
|
26
|
-
text-anchor: middle;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
STitle[position='left'] {
|
|
30
|
-
transform: rotate(-90deg);
|
|
31
|
-
text-anchor: middle;
|
|
32
|
-
alignment-baseline: middle;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
SBackground {
|
|
36
|
-
fill: color-mod(var(--gray-200) a(20%));
|
|
37
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@import '@semcore/utils/style/var.css';
|
|
2
|
-
@import '@semcore/d3-chart/src/style/var.css';
|
|
3
|
-
|
|
4
|
-
SScatterPlot {
|
|
5
|
-
fill: var(--blue-03);
|
|
6
|
-
transition-property: cx, cy;
|
|
7
|
-
transition-duration: var(--duration);
|
|
8
|
-
transition-timing-function: ease-in-out;
|
|
9
|
-
opacity: 0.5;
|
|
10
|
-
&:hover {
|
|
11
|
-
opacity: 0.8;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
SScatterPlot[color] {
|
|
16
|
-
fill: var(--color);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
SValue {
|
|
20
|
-
text-anchor: middle;
|
|
21
|
-
font-size: 10px;
|
|
22
|
-
stroke: var(--blue-04);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
SValue[color] {
|
|
26
|
-
stroke: var(--color);
|
|
27
|
-
}
|