@easyv/charts 1.7.22 → 1.7.24
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/lib/components/CartesianChart.js +3 -4
- package/lib/components/Chart.js +3 -5
- package/lib/components/Label.js +1 -1
- package/lib/components/PieChart.js +3 -4
- package/package.json +2 -2
- package/src/components/CartesianChart.js +1 -3
- package/src/components/Chart.js +1 -3
- package/src/components/Label.js +1 -1
- package/src/components/PieChart.js +1 -3
|
@@ -24,13 +24,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
24
24
|
* 轴类图表
|
|
25
25
|
*/
|
|
26
26
|
var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
27
|
-
var
|
|
27
|
+
var width = _ref.width,
|
|
28
|
+
height = _ref.height,
|
|
29
|
+
_ref$config = _ref.config,
|
|
28
30
|
axesConfig = _ref$config.axes,
|
|
29
31
|
background = _ref$config.background,
|
|
30
32
|
_ref$config$chart = _ref$config.chart,
|
|
31
|
-
_ref$config$chart$dim = _ref$config$chart.dimension.chartDimension,
|
|
32
|
-
height = _ref$config$chart$dim.height,
|
|
33
|
-
width = _ref$config$chart$dim.width,
|
|
34
33
|
_ref$config$chart$mar = _ref$config$chart.margin,
|
|
35
34
|
marginLeft = _ref$config$chart$mar.marginLeft,
|
|
36
35
|
marginTop = _ref$config$chart$mar.marginTop,
|
package/lib/components/Chart.js
CHANGED
|
@@ -39,11 +39,7 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
|
|
|
39
39
|
config = _ref2.config,
|
|
40
40
|
_ref2$config = _ref2.config,
|
|
41
41
|
axes = _ref2$config.axes,
|
|
42
|
-
_ref2$config$chart = _ref2$config.chart,
|
|
43
|
-
_ref2$config$chart$di = _ref2$config$chart.dimension.chartDimension,
|
|
44
|
-
height = _ref2$config$chart$di.height,
|
|
45
|
-
width = _ref2$config$chart$di.width,
|
|
46
|
-
_ref2$config$chart$ma = _ref2$config$chart.margin,
|
|
42
|
+
_ref2$config$chart$ma = _ref2$config.chart.margin,
|
|
47
43
|
marginRight = _ref2$config$chart$ma.marginRight,
|
|
48
44
|
marginLeft = _ref2$config$chart$ma.marginLeft,
|
|
49
45
|
marginBottom = _ref2$config$chart$ma.marginBottom,
|
|
@@ -54,6 +50,8 @@ var Chart = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
|
|
|
54
50
|
emit = _ref2.emit,
|
|
55
51
|
emitEvent = _ref2.emitEvent,
|
|
56
52
|
props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
|
|
53
|
+
var width = props.width,
|
|
54
|
+
height = props.height;
|
|
57
55
|
var isIOS = (0, _react.useRef)(/iPad|iPhone|iPod|iOS|CriOS/i.test(navigator.userAgent));
|
|
58
56
|
var svg = /*#__PURE__*/(0, _react.createRef)();
|
|
59
57
|
var chartWidth = width - marginLeft - marginRight;
|
package/lib/components/Label.js
CHANGED
|
@@ -152,7 +152,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
152
152
|
"data-data": JSON.stringify(data)
|
|
153
153
|
}, showIcon && !isNaN(attr.y) && /*#__PURE__*/React.createElement(Icon, {
|
|
154
154
|
cx: attr.x,
|
|
155
|
-
cy:
|
|
155
|
+
cy: y2,
|
|
156
156
|
config: icon
|
|
157
157
|
}), showLabel && /*#__PURE__*/React.createElement(Label, (0, _extends2["default"])({
|
|
158
158
|
value: showY,
|
|
@@ -232,11 +232,10 @@ var getCircleScale = function getCircleScale() {
|
|
|
232
232
|
}));
|
|
233
233
|
};
|
|
234
234
|
var Component = /*#__PURE__*/(0, _react.memo)(function (_ref5) {
|
|
235
|
-
var
|
|
235
|
+
var width = _ref5.width,
|
|
236
|
+
height = _ref5.height,
|
|
237
|
+
_ref5$config = _ref5.config,
|
|
236
238
|
_ref5$config$chart = _ref5$config.chart,
|
|
237
|
-
_ref5$config$chart$di = _ref5$config$chart.dimension.chartDimension,
|
|
238
|
-
width = _ref5$config$chart$di.width,
|
|
239
|
-
height = _ref5$config$chart$di.height,
|
|
240
239
|
label = _ref5$config$chart.label,
|
|
241
240
|
_ref5$config$chart$le = _ref5$config$chart.legend,
|
|
242
241
|
_ref5$config$chart$le2 = _ref5$config$chart$le.formatter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyv/charts",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"standard-version": "^9.3.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@easyv/utils": "^0.0.
|
|
35
|
+
"@easyv/utils": "^0.0.50",
|
|
36
36
|
"d3v7": "npm:d3@^7.0.0",
|
|
37
37
|
"gitignore": "^0.7.0",
|
|
38
38
|
"mrm": "^4.0.0",
|
|
@@ -33,13 +33,11 @@ import {
|
|
|
33
33
|
|
|
34
34
|
const Chart = memo(
|
|
35
35
|
({
|
|
36
|
+
width, height,
|
|
36
37
|
config: {
|
|
37
38
|
axes: axesConfig,
|
|
38
39
|
background,
|
|
39
40
|
chart: {
|
|
40
|
-
dimension: {
|
|
41
|
-
chartDimension: { height, width },
|
|
42
|
-
},
|
|
43
41
|
margin: { marginLeft, marginTop, marginRight, marginBottom },
|
|
44
42
|
animation,
|
|
45
43
|
legend,
|
package/src/components/Chart.js
CHANGED
|
@@ -26,9 +26,6 @@ const Chart = memo(
|
|
|
26
26
|
config: {
|
|
27
27
|
axes,
|
|
28
28
|
chart: {
|
|
29
|
-
dimension: {
|
|
30
|
-
chartDimension: { height, width },
|
|
31
|
-
},
|
|
32
29
|
margin: { marginRight, marginLeft, marginBottom, marginTop },
|
|
33
30
|
},
|
|
34
31
|
interaction,
|
|
@@ -39,6 +36,7 @@ const Chart = memo(
|
|
|
39
36
|
emitEvent,
|
|
40
37
|
...props
|
|
41
38
|
}) => {
|
|
39
|
+
const { width, height } = props;
|
|
42
40
|
const isIOS = useRef(/iPad|iPhone|iPod|iOS|CriOS/i.test(navigator.userAgent));
|
|
43
41
|
const svg = createRef();
|
|
44
42
|
const chartWidth = width - marginLeft - marginRight;
|
package/src/components/Label.js
CHANGED
|
@@ -118,7 +118,7 @@ export default memo(
|
|
|
118
118
|
data-data={JSON.stringify(data)}
|
|
119
119
|
>
|
|
120
120
|
{showIcon && !isNaN(attr.y) && (
|
|
121
|
-
<Icon cx={attr.x} cy={
|
|
121
|
+
<Icon cx={attr.x} cy={y2} config={icon} />
|
|
122
122
|
)}
|
|
123
123
|
{showLabel && <Label value={showY} config={label} reverse={reverse} {...attr} />}
|
|
124
124
|
</g>
|
|
@@ -247,11 +247,9 @@ const getCircleScale = ({ count, color, width, length } = tick, radius) => {
|
|
|
247
247
|
|
|
248
248
|
const Component = memo(
|
|
249
249
|
({
|
|
250
|
+
width, height,
|
|
250
251
|
config: {
|
|
251
252
|
chart: {
|
|
252
|
-
dimension: {
|
|
253
|
-
chartDimension: { width, height },
|
|
254
|
-
},
|
|
255
253
|
label,
|
|
256
254
|
legend: { formatter = legendFormatter, ...legend },
|
|
257
255
|
animation: { ringDuration, labelDuration } = {},
|