ag-common 0.0.609 → 0.0.610

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.
@@ -9,23 +9,26 @@ const styled_1 = __importDefault(require("@emotion/styled"));
9
9
  const react_1 = __importDefault(require("react"));
10
10
  const common_1 = require("../../../common");
11
11
  const math_1 = require("../../../common/helpers/math");
12
+ const barWidth = 2;
12
13
  const Base = styled_1.default.div `
13
- width: calc(100% - 1rem - 2px);
14
- height: calc(100% - 1rem - 2px);
14
+ width: calc(100% - 1px);
15
+ height: calc(100% - 1px);
15
16
  border: solid 1px #666;
16
- border-radius: 0.5rem;
17
- padding: 0.5rem;
17
+ padding: 0;
18
+ display: flex;
19
+ justify-content: center;
20
+ align-items: flex-end;
21
+ overflow: hidden;
18
22
  `;
19
23
  const Points = styled_1.default.div `
20
24
  position: relative;
21
- width: 100%;
22
- height: 100%;
25
+ width: calc(100% - ${barWidth}px);
26
+ height: calc(100% - ${barWidth}px);
27
+ margin-left: ${barWidth}px;
23
28
  `;
24
29
  const Point = styled_1.default.div `
25
30
  position: absolute;
26
- border-width: 2px;
27
- border-style: solid;
28
- width: 1px;
31
+ width: ${barWidth}px;
29
32
  `;
30
33
  const SparkLine = (p) => {
31
34
  const { data: raw, pointColour = '#4d76ff' } = p;
@@ -52,9 +55,9 @@ const SparkLine = (p) => {
52
55
  return (react_1.default.createElement(Point, { title: (_b = (_a = p.pointTitleF) === null || _a === void 0 ? void 0 : _a.call(p, pt.orig)) !== null && _b !== void 0 ? _b : '', key: pt.x + ' ' + pt.y, style: {
53
56
  backgroundColor: pointColour,
54
57
  borderColor: pointColour,
55
- left: pt.x + '%',
58
+ left: `calc(${pt.x}% - ${barWidth}px)`,
56
59
  bottom: 0,
57
- height: pt.y + '%',
60
+ height: `calc(${pt.y}% + ${barWidth}px)`,
58
61
  } }));
59
62
  }))));
60
63
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.609",
2
+ "version": "0.0.610",
3
3
  "name": "ag-common",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",