@easyv/charts 1.6.21 → 1.6.22

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.
@@ -96,8 +96,11 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
96
96
  label = _ref3.label;
97
97
  var showIcon = icon && icon.show;
98
98
  var showLabel = label && label.show;
99
- var _position = label.position,
100
- reverse = label.reverse;
99
+ var _ref4 = label || {},
100
+ _ref4$position = _ref4.position,
101
+ _position = _ref4$position === void 0 ? "outerStart" : _ref4$position,
102
+ _ref4$reverse = _ref4.reverse,
103
+ reverse = _ref4$reverse === void 0 ? true : _ref4$reverse;
101
104
  if (isClipAxis) {
102
105
  if (end > +clipValue) {
103
106
  y1 = yScaler[1](start);
@@ -158,28 +161,28 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
158
161
  }, attr)));
159
162
  }));
160
163
  });
161
- var Label = function Label(_ref4) {
162
- var x = _ref4.x,
163
- y = _ref4.y,
164
- value = _ref4.value,
165
- _ref4$config = _ref4.config,
166
- font = _ref4$config.font,
167
- _ref4$config$translat = _ref4$config.translate,
168
- _ref4$config$translat2 = _ref4$config$translat.x,
169
- translateX = _ref4$config$translat2 === void 0 ? 0 : _ref4$config$translat2,
170
- _ref4$config$translat3 = _ref4$config$translat.y,
171
- translateY = _ref4$config$translat3 === void 0 ? 0 : _ref4$config$translat3,
172
- _ref4$config$suffix = _ref4$config.suffix,
173
- content = _ref4$config$suffix.content,
174
- suffixFont = _ref4$config$suffix.font,
175
- _ref4$config$suffix$t = _ref4$config$suffix.translate,
176
- suffixX = _ref4$config$suffix$t.x,
177
- suffixY = _ref4$config$suffix$t.y,
178
- _ref4$textAnchor = _ref4.textAnchor,
179
- textAnchor = _ref4$textAnchor === void 0 ? "middle" : _ref4$textAnchor,
180
- _ref4$dominantBaselin = _ref4.dominantBaseline,
181
- dominantBaseline = _ref4$dominantBaselin === void 0 ? "middle" : _ref4$dominantBaselin,
182
- reverse = _ref4.reverse;
164
+ var Label = function Label(_ref5) {
165
+ var x = _ref5.x,
166
+ y = _ref5.y,
167
+ value = _ref5.value,
168
+ _ref5$config = _ref5.config,
169
+ font = _ref5$config.font,
170
+ _ref5$config$translat = _ref5$config.translate,
171
+ _ref5$config$translat2 = _ref5$config$translat.x,
172
+ translateX = _ref5$config$translat2 === void 0 ? 0 : _ref5$config$translat2,
173
+ _ref5$config$translat3 = _ref5$config$translat.y,
174
+ translateY = _ref5$config$translat3 === void 0 ? 0 : _ref5$config$translat3,
175
+ _ref5$config$suffix = _ref5$config.suffix,
176
+ content = _ref5$config$suffix.content,
177
+ suffixFont = _ref5$config$suffix.font,
178
+ _ref5$config$suffix$t = _ref5$config$suffix.translate,
179
+ suffixX = _ref5$config$suffix$t.x,
180
+ suffixY = _ref5$config$suffix$t.y,
181
+ _ref5$textAnchor = _ref5.textAnchor,
182
+ textAnchor = _ref5$textAnchor === void 0 ? "middle" : _ref5$textAnchor,
183
+ _ref5$dominantBaselin = _ref5.dominantBaseline,
184
+ dominantBaseline = _ref5$dominantBaselin === void 0 ? "middle" : _ref5$dominantBaselin,
185
+ reverse = _ref5.reverse;
183
186
  return /*#__PURE__*/React.createElement("text", {
184
187
  x: x,
185
188
  y: y,
@@ -196,19 +199,19 @@ var Label = function Label(_ref4) {
196
199
  style: _objectSpread({}, (0, _utils.getFontStyle)(suffixFont, "svg"))
197
200
  }, content));
198
201
  };
199
- var Icon = function Icon(_ref5) {
200
- var cx = _ref5.cx,
201
- cy = _ref5.cy,
202
- _ref5$config = _ref5.config,
203
- mode = _ref5$config.mode,
204
- inner = _ref5$config.inner,
205
- outer = _ref5$config.outer,
206
- color = _ref5$config.color,
207
- radius = _ref5$config.radius,
208
- image = _ref5$config.image,
209
- _ref5$config$size = _ref5$config.size,
210
- width = _ref5$config$size.width,
211
- height = _ref5$config$size.height;
202
+ var Icon = function Icon(_ref6) {
203
+ var cx = _ref6.cx,
204
+ cy = _ref6.cy,
205
+ _ref6$config = _ref6.config,
206
+ mode = _ref6$config.mode,
207
+ inner = _ref6$config.inner,
208
+ outer = _ref6$config.outer,
209
+ color = _ref6$config.color,
210
+ radius = _ref6$config.radius,
211
+ image = _ref6$config.image,
212
+ _ref6$config$size = _ref6$config.size,
213
+ width = _ref6$config$size.width,
214
+ height = _ref6$config$size.height;
212
215
  return mode == "single" ? /*#__PURE__*/React.createElement(Circle, {
213
216
  cx: cx,
214
217
  cy: cy,
@@ -228,11 +231,11 @@ var Icon = function Icon(_ref5) {
228
231
  xlinkHref: window.appConfig.ASSETS_URL + image
229
232
  }));
230
233
  };
231
- var Circle = function Circle(_ref6) {
232
- var cx = _ref6.cx,
233
- cy = _ref6.cy,
234
- color = _ref6.color,
235
- radius = _ref6.radius;
234
+ var Circle = function Circle(_ref7) {
235
+ var cx = _ref7.cx,
236
+ cy = _ref7.cy,
237
+ color = _ref7.color,
238
+ radius = _ref7.radius;
236
239
  return /*#__PURE__*/React.createElement("circle", {
237
240
  cx: cx,
238
241
  cy: cy,
@@ -241,15 +244,15 @@ var Circle = function Circle(_ref6) {
241
244
  stroke: "none"
242
245
  });
243
246
  };
244
- var getVerticalLabel = function getVerticalLabel(_ref7) {
245
- var _ref7$position = _ref7.position,
246
- position = _ref7$position === void 0 ? "outerStart" : _ref7$position,
247
- width = _ref7.width,
248
- y = _ref7.y,
249
- y1 = _ref7.y1,
250
- y2 = _ref7.y2,
251
- _ref7$reverse = _ref7.reverse,
252
- reverse = _ref7$reverse === void 0 ? true : _ref7$reverse;
247
+ var getVerticalLabel = function getVerticalLabel(_ref8) {
248
+ var _ref8$position = _ref8.position,
249
+ position = _ref8$position === void 0 ? "outerStart" : _ref8$position,
250
+ width = _ref8.width,
251
+ y = _ref8.y,
252
+ y1 = _ref8.y1,
253
+ y2 = _ref8.y2,
254
+ _ref8$reverse = _ref8.reverse,
255
+ reverse = _ref8$reverse === void 0 ? true : _ref8$reverse;
253
256
  var needReverse = reverse && y < 0;
254
257
  switch (position) {
255
258
  case "start":
@@ -279,15 +282,15 @@ var getVerticalLabel = function getVerticalLabel(_ref7) {
279
282
  };
280
283
  }
281
284
  };
282
- var getHorizontalLabel = function getHorizontalLabel(_ref8) {
283
- var _ref8$position = _ref8.position,
284
- position = _ref8$position === void 0 ? "outerStart" : _ref8$position,
285
- height = _ref8.height,
286
- y = _ref8.y,
287
- y1 = _ref8.y1,
288
- y2 = _ref8.y2,
289
- _ref8$reverse = _ref8.reverse,
290
- reverse = _ref8$reverse === void 0 ? true : _ref8$reverse;
285
+ var getHorizontalLabel = function getHorizontalLabel(_ref9) {
286
+ var _ref9$position = _ref9.position,
287
+ position = _ref9$position === void 0 ? "outerStart" : _ref9$position,
288
+ height = _ref9.height,
289
+ y = _ref9.y,
290
+ y1 = _ref9.y1,
291
+ y2 = _ref9.y2,
292
+ _ref9$reverse = _ref9.reverse,
293
+ reverse = _ref9$reverse === void 0 ? true : _ref9$reverse;
291
294
  var needReverse = reverse && y < 0;
292
295
  switch (position) {
293
296
  case "start":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.6.21",
3
+ "version": "1.6.22",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -57,7 +57,7 @@ export default memo(
57
57
  const { icon, label } = x==curXLabel?selectConfig:other;
58
58
  const showIcon = icon && icon.show;
59
59
  const showLabel = label && label.show;
60
- const { position:_position, reverse } = label;
60
+ const { position:_position="outerStart", reverse=true } = label || {};
61
61
  if (isClipAxis) {
62
62
  if (end > +clipValue) {
63
63
  y1 = yScaler[1](start);