@easyv/charts 1.1.4 → 1.1.5
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/StereoBar.js +56 -56
- package/package.json +1 -1
|
@@ -56,10 +56,10 @@ var getHighlightData = function getHighlightData(data, extent) {
|
|
|
56
56
|
|
|
57
57
|
var getAttr = function getAttr(_ref) {
|
|
58
58
|
var isVertical = _ref.isVertical,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
seriesWidth = _ref.seriesWidth,
|
|
60
|
+
length = _ref.length,
|
|
61
|
+
x = _ref.x,
|
|
62
|
+
y = _ref.y;
|
|
63
63
|
if (isVertical) return {
|
|
64
64
|
width: length,
|
|
65
65
|
height: seriesWidth,
|
|
@@ -76,36 +76,36 @@ var getAttr = function getAttr(_ref) {
|
|
|
76
76
|
|
|
77
77
|
var getBorderRadius = function getBorderRadius(_ref2) {
|
|
78
78
|
var isVertical = _ref2.isVertical,
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
positive = _ref2.positive,
|
|
80
|
+
seriesWidth = _ref2.seriesWidth;
|
|
81
81
|
return isVertical ? positive ? '0px ' + seriesWidth + 'px ' + seriesWidth + 'px 0' : seriesWidth + 'px 0 0 ' + seriesWidth + 'px' : positive ? seriesWidth / 2 + 'px ' + seriesWidth / 2 + 'px 0 0' : '0 0 ' + seriesWidth / 2 + 'px ' + seriesWidth / 2 + 'px';
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
85
85
|
var triggerClick = _ref3.triggerClick,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
86
|
+
_ref3$config = _ref3.config,
|
|
87
|
+
_ref3$config$pattern = _ref3$config.pattern,
|
|
88
|
+
pattern = _ref3$config$pattern === void 0 ? {} : _ref3$config$pattern,
|
|
89
|
+
_ref3$config$seriesIn = _ref3$config.seriesIntervalWidth,
|
|
90
|
+
paddingInner = _ref3$config$seriesIn === void 0 ? 0 : _ref3$config$seriesIn,
|
|
91
|
+
_ref3$config$paddingI = _ref3$config.paddingInner,
|
|
92
|
+
paddingOuter = _ref3$config$paddingI === void 0 ? 0 : _ref3$config$paddingI,
|
|
93
|
+
style = _ref3$config.style,
|
|
94
|
+
fill = _ref3$config.fill,
|
|
95
|
+
_ref3$config$highligh = _ref3$config.highlight,
|
|
96
|
+
showHighlight = _ref3$config$highligh.show,
|
|
97
|
+
extent = _ref3$config$highligh.extent,
|
|
98
|
+
highlightFill = _ref3$config$highligh.fill,
|
|
99
|
+
id = _ref3$config.id,
|
|
100
|
+
_ref3$bandLength = _ref3.bandLength,
|
|
101
|
+
bandLength = _ref3$bandLength === void 0 ? 0 : _ref3$bandLength,
|
|
102
|
+
data = _ref3.data,
|
|
103
|
+
_ref3$xAxis = _ref3.xAxis,
|
|
104
|
+
xScaler = _ref3$xAxis.scaler,
|
|
105
|
+
step = _ref3$xAxis.step,
|
|
106
|
+
direction = _ref3$xAxis.direction,
|
|
107
|
+
yScaler = _ref3.yAxis.scaler,
|
|
108
|
+
fieldName = _ref3.fieldName;
|
|
109
109
|
if (!data.length) return null;
|
|
110
110
|
var bandwidth = (0, _utils.getBandwidth)(step, paddingOuter);
|
|
111
111
|
|
|
@@ -114,8 +114,8 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
|
114
114
|
paddingInner: paddingInner,
|
|
115
115
|
bandLength: bandLength
|
|
116
116
|
}),
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
seriesStep = _getBandSeriesStepAnd.seriesStep,
|
|
118
|
+
seriesWidth = _getBandSeriesStepAnd.seriesWidth;
|
|
119
119
|
|
|
120
120
|
var _data = showHighlight ? getHighlightData(data, extent) : data;
|
|
121
121
|
|
|
@@ -149,15 +149,15 @@ var _default = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
|
149
149
|
slope: "0.7"
|
|
150
150
|
}))), highlightColor.def, color.def), _data.map(function (_ref4, i) {
|
|
151
151
|
var flag = _ref4.flag,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
index = _ref4.index,
|
|
153
|
+
_ref4$bound = (0, _slicedToArray2["default"])(_ref4.bound, 2),
|
|
154
|
+
start = _ref4$bound[0],
|
|
155
|
+
end = _ref4$bound[1],
|
|
156
|
+
data = _ref4.data,
|
|
157
|
+
_ref4$data = _ref4.data,
|
|
158
|
+
x = _ref4$data.x,
|
|
159
|
+
y = _ref4$data.y,
|
|
160
|
+
s = _ref4$data.s;
|
|
161
161
|
|
|
162
162
|
var y1 = yScaler(isVertical ? end : start);
|
|
163
163
|
var y2 = yScaler(isVertical ? start : end);
|
|
@@ -185,12 +185,12 @@ exports["default"] = _default;
|
|
|
185
185
|
|
|
186
186
|
var Column3DSkin = function Column3DSkin(props) {
|
|
187
187
|
var width = props.width,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
188
|
+
height = props.height,
|
|
189
|
+
x = props.x,
|
|
190
|
+
y = props.y,
|
|
191
|
+
color = props.color,
|
|
192
|
+
_props$opacity = props.opacity,
|
|
193
|
+
opacity = _props$opacity === void 0 ? 1 : _props$opacity;
|
|
194
194
|
return /*#__PURE__*/_react["default"].createElement("g", {
|
|
195
195
|
style: {
|
|
196
196
|
transform: "skew(0deg, 23deg)",
|
|
@@ -232,11 +232,11 @@ var Column3DSkin = function Column3DSkin(props) {
|
|
|
232
232
|
|
|
233
233
|
function pointRotate(point, center, angle) {
|
|
234
234
|
var x = point[0],
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
y = point[1],
|
|
236
|
+
rx = center[0],
|
|
237
|
+
ry = center[1],
|
|
238
|
+
cos = Math.cos(angle),
|
|
239
|
+
sin = Math.sin(angle);
|
|
240
240
|
var x0 = (x - rx) * cos - (y - ry) * sin + rx;
|
|
241
241
|
var y0 = (x - rx) * sin + (y - ry) * cos + ry;
|
|
242
242
|
return [x0, y0];
|
|
@@ -276,10 +276,10 @@ function deepCopy(obj) {
|
|
|
276
276
|
function parseMultiColorToSVG(config, id) {
|
|
277
277
|
if (config.type == "linear") {
|
|
278
278
|
var _config$linear = config.linear,
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
stops = _config$linear.stops,
|
|
280
|
+
opacity = _config$linear.opacity;
|
|
281
281
|
var start = [0, 0.5],
|
|
282
|
-
|
|
282
|
+
end = [1, 0.5];
|
|
283
283
|
var angle = config.linear.angle + 90;
|
|
284
284
|
|
|
285
285
|
if (angle) {
|
|
@@ -330,8 +330,8 @@ function getTopColor(stops, angle) {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
if (a >= 90 && a < 270) {
|
|
333
|
-
return stops[0].color;
|
|
334
|
-
} else {
|
|
335
333
|
return stops[stops.length - 1].color;
|
|
334
|
+
} else {
|
|
335
|
+
return stops[0].color;
|
|
336
336
|
}
|
|
337
337
|
}
|