@easyv/charts 1.9.1 → 1.9.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.
@@ -159,6 +159,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
159
159
  height: loop.show ? height : "auto",
160
160
  overflowY: loop.show ? "scroll" : "auto"
161
161
  }) : _objectSpread(_objectSpread({
162
+ width: "100%",
162
163
  display: "flex",
163
164
  flexWrap: "wrap",
164
165
  alignContent: alignment.split(" ")[0] == "center" && (alignment.split(" ")[1] == "left" || alignment.split(" ")[1] == "right") ? alignment.split(" ")[1] == "left" ? "flex-start" : "flex-end" : alignment.split(" ")[0] == "left" ? "flex-start" : alignment.split(" ")[0] == "center" ? "center" : "flex-end",
@@ -284,28 +285,28 @@ var getPosition = function getPosition(position, alignment) {
284
285
  switch (position) {
285
286
  case "top":
286
287
  return {
287
- left: alignment == "left" ? 5 : alignment == "center" ? "50%" : "",
288
- right: alignment == "right" ? 10 : "",
288
+ left: alignment == "left" ? -5 : alignment == "center" ? "50%" : "",
289
+ right: alignment == "right" ? -10 : "",
289
290
  top: 5,
290
291
  transform: "translate3d(calc(".concat(alignment == "center" ? "-50%" : "0px", " + ").concat(x, "px), ").concat(y, "px, 0px)")
291
292
  };
292
293
  case "right":
293
294
  return {
294
295
  top: "50%",
295
- right: 10,
296
+ right: -10,
296
297
  transform: "translate3d(".concat(x, "px, calc(-50% + ").concat(y, "px), 0px)")
297
298
  };
298
299
  case "left":
299
300
  return {
300
301
  top: "50%",
301
- left: 5,
302
+ left: -5,
302
303
  transform: "translate3d(".concat(x, "px, calc(-50% + ").concat(y, "px), 0px)")
303
304
  };
304
305
  default:
305
306
  // bottom
306
307
  return {
307
- left: alignment == "left" ? 5 : alignment == "center" ? "50%" : "",
308
- right: alignment == "right" ? 10 : "",
308
+ left: alignment == "left" ? -5 : alignment == "center" ? "50%" : "",
309
+ right: alignment == "right" ? -10 : "",
309
310
  bottom: 5,
310
311
  transform: "translate3d(calc(".concat(alignment == "center" ? "-50%" : "0px", " + ").concat(x, "px), ").concat(y, "px, 0px)")
311
312
  };
@@ -38,9 +38,11 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(
38
38
  };
39
39
  case "break-word":
40
40
  return {
41
- wordBreak: "break-all",
42
- wordWrap: "break-word",
43
- whiteSpace: "pre-line"
41
+ wordBreak: "normal",
42
+ overflowWrap: "break-word",
43
+ hyphens: "auto",
44
+ whiteSpace: "normal",
45
+ wordWrap: "break-word"
44
46
  };
45
47
  case "marquee":
46
48
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -168,6 +168,7 @@ export default memo(
168
168
  overflowY: loop.show ? "scroll" : "auto",
169
169
  }
170
170
  : {
171
+ width:"100%",
171
172
  display: "flex",
172
173
  flexWrap: "wrap",
173
174
  alignContent:
@@ -344,8 +345,8 @@ const getPosition = (position, alignment, x = 0, y = 0) => {
344
345
  switch (position) {
345
346
  case "top":
346
347
  return {
347
- left: alignment == "left" ? 5 : alignment == "center" ? "50%" : "",
348
- right: alignment == "right" ? 10 : "",
348
+ left: alignment == "left" ? -5 : alignment == "center" ? "50%" : "",
349
+ right: alignment == "right" ? -10 : "",
349
350
  top: 5,
350
351
  transform: `translate3d(calc(${
351
352
  alignment == "center" ? "-50%" : "0px"
@@ -354,19 +355,19 @@ const getPosition = (position, alignment, x = 0, y = 0) => {
354
355
  case "right":
355
356
  return {
356
357
  top: "50%",
357
- right: 10,
358
+ right: -10,
358
359
  transform: `translate3d(${x}px, calc(-50% + ${y}px), 0px)`,
359
360
  };
360
361
  case "left":
361
362
  return {
362
363
  top: "50%",
363
- left: 5,
364
+ left: -5,
364
365
  transform: `translate3d(${x}px, calc(-50% + ${y}px), 0px)`,
365
366
  };
366
367
  default: // bottom
367
368
  return {
368
- left: alignment == "left" ? 5 : alignment == "center" ? "50%" : "",
369
- right: alignment == "right" ? 10 : "",
369
+ left: alignment == "left" ? -5 : alignment == "center" ? "50%" : "",
370
+ right: alignment == "right" ? -10 : "",
370
371
  bottom: 5,
371
372
  transform: `translate3d(calc(${
372
373
  alignment == "center" ? "-50%" : "0px"
@@ -34,12 +34,14 @@ export default memo(
34
34
  textOverflow: "ellipsis",
35
35
  whiteSpace: "nowrap",
36
36
  };
37
- case "break-word":
38
- return {
39
- wordBreak: "break-all",
40
- wordWrap: "break-word",
41
- whiteSpace: "pre-line",
42
- };
37
+ case "break-word":
38
+ return {
39
+ wordBreak: "normal",
40
+ overflowWrap: "break-word",
41
+ hyphens: "auto",
42
+ whiteSpace: "normal",
43
+ wordWrap: "break-word",
44
+ };
43
45
  case "marquee":
44
46
  return {
45
47
  whiteSpace: "nowrap",