onesight-charts 2.0.4 → 2.0.8

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.
@@ -13,29 +13,49 @@ function App() {
13
13
  height: 322
14
14
  }
15
15
  }, /*#__PURE__*/React.createElement(Gauge, {
16
- value: 12
16
+ value: 12,
17
+ tip: "积极-(12)"
17
18
  })), /*#__PURE__*/React.createElement("div", {
18
19
  style: {
19
20
  width: 360,
20
21
  height: 322
21
22
  }
22
23
  }, /*#__PURE__*/React.createElement(Gauge, {
23
- value: -68
24
+ value: -68,
25
+ tip: "\u6D88\u6781-(-68)"
24
26
  })), /*#__PURE__*/React.createElement("div", {
25
27
  style: {
26
28
  width: 360,
27
29
  height: 322
28
30
  }
29
31
  }, /*#__PURE__*/React.createElement(Gauge, {
30
- value: 85
32
+ value: 0,
33
+ showInfo: false
31
34
  })), /*#__PURE__*/React.createElement("div", {
32
35
  style: {
33
36
  width: 360,
34
37
  height: 322
35
38
  }
36
39
  }, /*#__PURE__*/React.createElement(Gauge, {
37
- value: 0,
38
- showInfo: false
40
+ value: 6 // -100 ~ 100
41
+ ,
42
+ min: -10,
43
+ max: 10,
44
+ label: "\u79EF\u6781" // 可选,不传时按阈值自动判定
45
+ ,
46
+ positiveThreshold: 0 // > 阈值 = 积极
47
+ ,
48
+ negativeThreshold: 0 // < 阈值 = 消极
49
+ ,
50
+ tip: "\u6D88\u6781-(6)",
51
+ showTag: true,
52
+ showInfo: true,
53
+ colors: {
54
+ negative: '#EF7B7B',
55
+ positive: '#4CBFA6',
56
+ neutral: '#9CA3AF'
57
+ },
58
+ onInfoClick: function onInfoClick() {}
39
59
  })));
40
60
  }
41
61
  export default App;
@@ -14,6 +14,8 @@ import "./style.scss";
14
14
  * 用半环形仪表盘 + 指针 + 底部标签展示情绪/得分。
15
15
  */
16
16
  function Gauge(props) {
17
+ // 渐变定义需要在每个实例中唯一,避免同页多个仪表盘互相覆盖。
18
+ var gradientId = "onesight-gauge-arc-".concat(React.useId().replace(/:/g, ''));
17
19
  var _props$width = props.width,
18
20
  width = _props$width === void 0 ? '100%' : _props$width,
19
21
  _props$height = props.height,
@@ -41,11 +43,10 @@ function Gauge(props) {
41
43
  negative: '#EF7B7B',
42
44
  positive: '#4CBFA6',
43
45
  neutral: '#9CA3AF',
44
- arcMiddle: '#ECECEC',
46
+ arcMiddle: '#E1E1E1',
45
47
  tick: '#D4D4D4',
46
48
  pointer: '#D2D3D7'
47
49
  }, colorProp || {});
48
-
49
50
  // 数值处理
50
51
  var clamped = Math.max(min, Math.min(max, Number(value) || 0));
51
52
  // 指针角度:min -> -90°,max -> +90°
@@ -64,7 +65,7 @@ function Gauge(props) {
64
65
  var CX = 200;
65
66
  var CY = 210;
66
67
  var OUTER_R = 180;
67
- var INNER_R = 152;
68
+ var INNER_R = 148;
68
69
  var EMOJI_R = (OUTER_R + INNER_R) / 2;
69
70
 
70
71
  // 极坐标 -> 直角坐标(0° 指向正上,顺时针为正)
@@ -84,25 +85,29 @@ function Gauge(props) {
84
85
  var arcPath = "M ".concat(so.x, " ").concat(so.y, " ") + "A ".concat(OUTER_R, " ").concat(OUTER_R, " 0 0 1 ").concat(eo.x, " ").concat(eo.y, " ") + "L ".concat(ei.x, " ").concat(ei.y, " ") + "A ".concat(INNER_R, " ").concat(INNER_R, " 0 0 0 ").concat(si.x, " ").concat(si.y, " Z");
85
86
 
86
87
  // 刻度
87
- var TICK_COUNT = 31;
88
- var EMOJI_ANGLES = [-60, 0, 60];
88
+ var TICK_COUNT = 23;
89
+ var EMOJI_ANGLES = [-2, 0, 2];
89
90
  var ticks = [];
90
91
  var _loop = function _loop() {
91
- var angle = -90 + i * 180 / (TICK_COUNT - 1);
92
- // 表情附近让出空间
93
- if (EMOJI_ANGLES.some(function (a) {
94
- return Math.abs(angle - a) < 7;
95
- })) return 1; // continue
96
- var p1 = pt(INNER_R - 4, angle);
97
- var p2 = pt(INNER_R - 14, angle);
98
- ticks.push({
99
- p1: p1,
100
- p2: p2,
101
- key: i
102
- });
103
- };
92
+ // 最大值和最小值位置不显示刻度线
93
+ if (i === 0 || i === TICK_COUNT - 1) return 0; // continue
94
+ var angle = -90 + i * 180 / (TICK_COUNT - 1);
95
+ // 表情附近让出空间
96
+ if (EMOJI_ANGLES.some(function (a) {
97
+ return Math.abs(angle - a) < 3;
98
+ })) return 0; // continue
99
+ var p1 = pt(INNER_R - 4, angle);
100
+ var p2 = pt(INNER_R - 10, angle);
101
+ ticks.push({
102
+ p1: p1,
103
+ p2: p2,
104
+ key: i
105
+ });
106
+ },
107
+ _ret;
104
108
  for (var i = 0; i < TICK_COUNT; i++) {
105
- if (_loop()) continue;
109
+ _ret = _loop();
110
+ if (_ret === 0) continue;
106
111
  }
107
112
 
108
113
  // 三个表情位置
@@ -117,8 +122,6 @@ function Gauge(props) {
117
122
  mood: 'happy'
118
123
  }];
119
124
  var label0Pos = pt(EMOJI_R - 28, 0);
120
- var labelMinPos = pt(OUTER_R, -90);
121
- var labelMaxPos = pt(OUTER_R, 90);
122
125
  return /*#__PURE__*/React.createElement("div", {
123
126
  className: "onesight-gauge",
124
127
  style: {
@@ -133,7 +136,7 @@ function Gauge(props) {
133
136
  xmlns: "http://www.w3.org/2000/svg",
134
137
  className: "onesight-gauge__svg"
135
138
  }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
136
- id: "onesight-gauge-arc",
139
+ id: gradientId,
137
140
  x1: "0",
138
141
  y1: "0",
139
142
  x2: "1",
@@ -146,13 +149,13 @@ function Gauge(props) {
146
149
  stopColor: colors.negative
147
150
  }), /*#__PURE__*/React.createElement("stop", {
148
151
  offset: "38%",
149
- stopColor: "#F5C7C7"
152
+ stopColor: "#F5D7D7"
150
153
  }), /*#__PURE__*/React.createElement("stop", {
151
154
  offset: "50%",
152
155
  stopColor: colors.arcMiddle
153
156
  }), /*#__PURE__*/React.createElement("stop", {
154
157
  offset: "62%",
155
- stopColor: "#BFE3D8"
158
+ stopColor: "#CAE3DB"
156
159
  }), /*#__PURE__*/React.createElement("stop", {
157
160
  offset: "82%",
158
161
  stopColor: colors.positive
@@ -161,7 +164,7 @@ function Gauge(props) {
161
164
  stopColor: colors.positive
162
165
  }))), /*#__PURE__*/React.createElement("path", {
163
166
  d: arcPath,
164
- fill: "url(#onesight-gauge-arc)"
167
+ fill: "url(#".concat(gradientId, ")")
165
168
  }), ticks.map(function (t) {
166
169
  return /*#__PURE__*/React.createElement("line", {
167
170
  key: t.key,
@@ -185,10 +188,10 @@ function Gauge(props) {
185
188
  });
186
189
  }), /*#__PURE__*/React.createElement("text", {
187
190
  // x={labelMinPos.x + 16}
188
- x: 72
191
+ x: 70
189
192
  // y={labelMinPos.y + 20}
190
193
  ,
191
- y: 214,
194
+ y: 212,
192
195
  fill: colors.negative,
193
196
  fontSize: "14",
194
197
  fontWeight: "500",
@@ -200,8 +203,8 @@ function Gauge(props) {
200
203
  fontSize: "14",
201
204
  textAnchor: "middle"
202
205
  }, "0"), /*#__PURE__*/React.createElement("text", {
203
- x: 322,
204
- y: 214,
206
+ x: 334,
207
+ y: 212,
205
208
  fill: colors.positive,
206
209
  fontSize: "14",
207
210
  fontWeight: "500",
@@ -209,7 +212,7 @@ function Gauge(props) {
209
212
  }, max), /*#__PURE__*/React.createElement("g", {
210
213
  transform: "rotate(".concat(pointerAngle, " ").concat(CX, " ").concat(CY, ")")
211
214
  }, /*#__PURE__*/React.createElement("path", {
212
- d: "M ".concat(CX - 4, " ").concat(CY - 79, " ") + "A 4 4 0 0 1 ".concat(CX + 4, " ").concat(CY - 79, " ") + "L ".concat(CX + 11, " ").concat(CY, " ") + "L ".concat(CX - 11, " ").concat(CY, " Z"),
215
+ d: "M ".concat(CX - 4, " ").concat(CY - 92, " ") + "A 4 4 0 0 1 ".concat(CX + 4, " ").concat(CY - 92, " ") + "L ".concat(CX + 11, " ").concat(CY, " ") + "L ".concat(CX - 11, " ").concat(CY, " Z"),
213
216
  fill: colors.pointer
214
217
  }), /*#__PURE__*/React.createElement("circle", {
215
218
  cx: 200,
@@ -219,7 +222,7 @@ function Gauge(props) {
219
222
  }), /*#__PURE__*/React.createElement("circle", {
220
223
  cx: CX,
221
224
  cy: 208,
222
- r: 5.5,
225
+ r: 8,
223
226
  fill: "#ffffff"
224
227
  }))), /*#__PURE__*/React.createElement("div", {
225
228
  className: "onesight-gauge__value",
@@ -230,8 +233,7 @@ function Gauge(props) {
230
233
  className: "onesight-gauge__tag",
231
234
  style: {
232
235
  borderColor: mood.color,
233
- color: mood.color,
234
- backgroundColor: withAlpha(mood.color, 0.08)
236
+ color: mood.color
235
237
  }
236
238
  }, /*#__PURE__*/React.createElement("span", {
237
239
  className: "onesight-gauge__tag-icon"
@@ -241,13 +243,13 @@ function Gauge(props) {
241
243
  })), /*#__PURE__*/React.createElement("span", {
242
244
  className: "onesight-gauge__tag-label"
243
245
  }, displayLabel), showInfo && /*#__PURE__*/React.createElement(Tooltip, {
244
- title: tip
246
+ title: tip ? tip : ''
245
247
  }, /*#__PURE__*/React.createElement("span", {
246
248
  className: "onesight-gauge__tag-info",
247
249
  onClick: onInfoClick,
248
250
  role: onInfoClick ? 'button' : undefined
249
251
  }, /*#__PURE__*/React.createElement(InfoIcon, {
250
- color: mood.color
252
+ color: '#666666'
251
253
  }))))));
252
254
  }
253
255
 
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  &__value {
23
- margin-top: 4px;
23
+ // margin-top: 4px;
24
24
  font-size: 28px;
25
25
  font-weight: 700;
26
26
  line-height: 1;
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  &__tag {
31
- margin-top: 12px;
31
+ margin-top: 4px;
32
32
  display: inline-flex;
33
33
  align-items: center;
34
34
  gap: 6px;
@@ -35,6 +35,22 @@ module.exports = __toCommonJS(base_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import__ = __toESM(require("../index"));
37
37
  function App() {
38
- return /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", gap: 24, flexWrap: "wrap" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: 12 })), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: -68 })), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: 85 })), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: 0, showInfo: false })));
38
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", gap: 24, flexWrap: "wrap" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: 12, tip: "积极-(12)" })), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: -68, tip: "消极-(-68)" })), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(import__.default, { value: 0, showInfo: false })), /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 360, height: 322 } }, /* @__PURE__ */ import_react.default.createElement(
39
+ import__.default,
40
+ {
41
+ value: 6,
42
+ min: -10,
43
+ max: 10,
44
+ label: "积极",
45
+ positiveThreshold: 0,
46
+ negativeThreshold: 0,
47
+ tip: "消极-(6)",
48
+ showTag: true,
49
+ showInfo: true,
50
+ colors: { negative: "#EF7B7B", positive: "#4CBFA6", neutral: "#9CA3AF" },
51
+ onInfoClick: () => {
52
+ }
53
+ }
54
+ )));
39
55
  }
40
56
  var base_default = App;
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_style = require("./style.scss");
38
38
  function Gauge(props) {
39
+ const gradientId = `onesight-gauge-arc-${import_react.default.useId().replace(/:/g, "")}`;
39
40
  const {
40
41
  width = "100%",
41
42
  height = "100%",
@@ -64,7 +65,7 @@ function Gauge(props) {
64
65
  negative: "#EF7B7B",
65
66
  positive: "#4CBFA6",
66
67
  neutral: "#9CA3AF",
67
- arcMiddle: "#ECECEC",
68
+ arcMiddle: "#E1E1E1",
68
69
  tick: "#D4D4D4",
69
70
  pointer: "#D2D3D7",
70
71
  ...colorProp || {}
@@ -79,7 +80,7 @@ function Gauge(props) {
79
80
  const CX = 200;
80
81
  const CY = 210;
81
82
  const OUTER_R = 180;
82
- const INNER_R = 152;
83
+ const INNER_R = 148;
83
84
  const EMOJI_R = (OUTER_R + INNER_R) / 2;
84
85
  const pt = (r, deg) => {
85
86
  const rad = deg * Math.PI / 180;
@@ -90,15 +91,17 @@ function Gauge(props) {
90
91
  const si = pt(INNER_R, -90);
91
92
  const ei = pt(INNER_R, 90);
92
93
  const arcPath = `M ${so.x} ${so.y} A ${OUTER_R} ${OUTER_R} 0 0 1 ${eo.x} ${eo.y} L ${ei.x} ${ei.y} A ${INNER_R} ${INNER_R} 0 0 0 ${si.x} ${si.y} Z`;
93
- const TICK_COUNT = 31;
94
- const EMOJI_ANGLES = [-60, 0, 60];
94
+ const TICK_COUNT = 23;
95
+ const EMOJI_ANGLES = [-2, 0, 2];
95
96
  const ticks = [];
96
97
  for (let i = 0; i < TICK_COUNT; i++) {
98
+ if (i === 0 || i === TICK_COUNT - 1)
99
+ continue;
97
100
  const angle = -90 + i * 180 / (TICK_COUNT - 1);
98
- if (EMOJI_ANGLES.some((a) => Math.abs(angle - a) < 7))
101
+ if (EMOJI_ANGLES.some((a) => Math.abs(angle - a) < 3))
99
102
  continue;
100
103
  const p1 = pt(INNER_R - 4, angle);
101
- const p2 = pt(INNER_R - 14, angle);
104
+ const p2 = pt(INNER_R - 10, angle);
102
105
  ticks.push({ p1, p2, key: i });
103
106
  }
104
107
  const emojis = [
@@ -107,8 +110,6 @@ function Gauge(props) {
107
110
  { angle: 60, mood: "happy" }
108
111
  ];
109
112
  const label0Pos = pt(EMOJI_R - 28, 0);
110
- const labelMinPos = pt(OUTER_R, -90);
111
- const labelMaxPos = pt(OUTER_R, 90);
112
113
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "onesight-gauge", style: { width, height } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "onesight-gauge__inner" }, /* @__PURE__ */ import_react.default.createElement(
113
114
  "svg",
114
115
  {
@@ -117,8 +118,8 @@ function Gauge(props) {
117
118
  xmlns: "http://www.w3.org/2000/svg",
118
119
  className: "onesight-gauge__svg"
119
120
  },
120
- /* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement("linearGradient", { id: "onesight-gauge-arc", x1: "0", y1: "0", x2: "1", y2: "0" }, /* @__PURE__ */ import_react.default.createElement("stop", { offset: "0%", stopColor: colors.negative }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "18%", stopColor: colors.negative }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "38%", stopColor: "#F5C7C7" }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "50%", stopColor: colors.arcMiddle }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "62%", stopColor: "#BFE3D8" }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "82%", stopColor: colors.positive }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "100%", stopColor: colors.positive }))),
121
- /* @__PURE__ */ import_react.default.createElement("path", { d: arcPath, fill: "url(#onesight-gauge-arc)" }),
121
+ /* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "1", y2: "0" }, /* @__PURE__ */ import_react.default.createElement("stop", { offset: "0%", stopColor: colors.negative }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "18%", stopColor: colors.negative }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "38%", stopColor: "#F5D7D7" }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "50%", stopColor: colors.arcMiddle }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "62%", stopColor: "#CAE3DB" }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "82%", stopColor: colors.positive }), /* @__PURE__ */ import_react.default.createElement("stop", { offset: "100%", stopColor: colors.positive }))),
122
+ /* @__PURE__ */ import_react.default.createElement("path", { d: arcPath, fill: `url(#${gradientId})` }),
122
123
  ticks.map((t) => /* @__PURE__ */ import_react.default.createElement(
123
124
  "line",
124
125
  {
@@ -149,8 +150,8 @@ function Gauge(props) {
149
150
  /* @__PURE__ */ import_react.default.createElement(
150
151
  "text",
151
152
  {
152
- x: 72,
153
- y: 214,
153
+ x: 70,
154
+ y: 212,
154
155
  fill: colors.negative,
155
156
  fontSize: "14",
156
157
  fontWeight: "500",
@@ -172,8 +173,8 @@ function Gauge(props) {
172
173
  /* @__PURE__ */ import_react.default.createElement(
173
174
  "text",
174
175
  {
175
- x: 322,
176
- y: 214,
176
+ x: 334,
177
+ y: 212,
177
178
  fill: colors.positive,
178
179
  fontSize: "14",
179
180
  fontWeight: "500",
@@ -184,30 +185,29 @@ function Gauge(props) {
184
185
  /* @__PURE__ */ import_react.default.createElement("g", { transform: `rotate(${pointerAngle} ${CX} ${CY})` }, /* @__PURE__ */ import_react.default.createElement(
185
186
  "path",
186
187
  {
187
- d: `M ${CX - 4} ${CY - 79} A 4 4 0 0 1 ${CX + 4} ${CY - 79} L ${CX + 11} ${CY} L ${CX - 11} ${CY} Z`,
188
+ d: `M ${CX - 4} ${CY - 92} A 4 4 0 0 1 ${CX + 4} ${CY - 92} L ${CX + 11} ${CY} L ${CX - 11} ${CY} Z`,
188
189
  fill: colors.pointer
189
190
  }
190
- ), /* @__PURE__ */ import_react.default.createElement("circle", { cx: 200, cy: 208, r: 11, fill: colors.pointer }), /* @__PURE__ */ import_react.default.createElement("circle", { cx: CX, cy: 208, r: 5.5, fill: "#ffffff" }))
191
+ ), /* @__PURE__ */ import_react.default.createElement("circle", { cx: 200, cy: 208, r: 11, fill: colors.pointer }), /* @__PURE__ */ import_react.default.createElement("circle", { cx: CX, cy: 208, r: 8, fill: "#ffffff" }))
191
192
  ), /* @__PURE__ */ import_react.default.createElement("div", { className: "onesight-gauge__value", style: { color: valueColor } }, clamped), showTag && /* @__PURE__ */ import_react.default.createElement(
192
193
  "div",
193
194
  {
194
195
  className: "onesight-gauge__tag",
195
196
  style: {
196
197
  borderColor: mood.color,
197
- color: mood.color,
198
- backgroundColor: withAlpha(mood.color, 0.08)
198
+ color: mood.color
199
199
  }
200
200
  },
201
201
  /* @__PURE__ */ import_react.default.createElement("span", { className: "onesight-gauge__tag-icon" }, /* @__PURE__ */ import_react.default.createElement(MoodFace, { mood: mood.face, size: 16 })),
202
202
  /* @__PURE__ */ import_react.default.createElement("span", { className: "onesight-gauge__tag-label" }, displayLabel),
203
- showInfo && /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: tip }, /* @__PURE__ */ import_react.default.createElement(
203
+ showInfo && /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: tip ? tip : "" }, /* @__PURE__ */ import_react.default.createElement(
204
204
  "span",
205
205
  {
206
206
  className: "onesight-gauge__tag-info",
207
207
  onClick: onInfoClick,
208
208
  role: onInfoClick ? "button" : void 0
209
209
  },
210
- /* @__PURE__ */ import_react.default.createElement(InfoIcon, { color: mood.color })
210
+ /* @__PURE__ */ import_react.default.createElement(InfoIcon, { color: "#666666" })
211
211
  ))
212
212
  )));
213
213
  }
@@ -250,15 +250,4 @@ function getMood(v, posT, negT, colors) {
250
250
  return { label: "消极", color: colors.negative, face: "sad" };
251
251
  return { label: "中性", color: colors.neutral, face: "neutral" };
252
252
  }
253
- function withAlpha(hex, alpha) {
254
- let h = String(hex || "").replace("#", "");
255
- if (h.length === 3)
256
- h = h.split("").map((c) => c + c).join("");
257
- if (h.length !== 6)
258
- return hex;
259
- const r = parseInt(h.substring(0, 2), 16);
260
- const g = parseInt(h.substring(2, 4), 16);
261
- const b = parseInt(h.substring(4, 6), 16);
262
- return `rgba(${r}, ${g}, ${b}, ${alpha})`;
263
- }
264
253
  var gauge_default = Gauge;
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  &__value {
23
- margin-top: 4px;
23
+ // margin-top: 4px;
24
24
  font-size: 28px;
25
25
  font-weight: 700;
26
26
  line-height: 1;
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  &__tag {
31
- margin-top: 12px;
31
+ margin-top: 4px;
32
32
  display: inline-flex;
33
33
  align-items: center;
34
34
  gap: 6px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onesight-charts",
3
- "version": "2.0.4",
3
+ "version": "2.0.8",
4
4
  "private": false,
5
5
  "description": "OneSight前端图表公共组件库",
6
6
  "license": "MIT",