Skip to content

Commit 76d760e

Browse files
auto: apply newest APITable commit
1 parent 12588f4 commit 76d760e

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.8.1",
2+
"version": "1.8.0",
33
"description": "my apitable widget chart",
44
"engines": {
55
"node": ">=8.x"

src/summary.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ function isNumeric(value) {
2828
!isNaN(parseFloat(value));
2929
}
3030

31-
function formatNumberWithCommas(value: number | string): string {
32-
if (value == null || value === '') {
33-
return '';
34-
}
35-
const num = typeof value === 'string' ? parseFloat(value) : value;
36-
if (isNaN(num)) {
37-
return value.toString();
38-
}
39-
return num.toLocaleString();
40-
}
41-
4231
const METRICS_TYPES = ['COUNT_RECORDS', 'AGGREGATION_BY_FIELD'];
4332
const METRICS_TYPES_NAMES = [t(Strings.count_records), t(Strings.select_y_axis_field)];
4433

@@ -122,7 +111,7 @@ const Summary = ({ openSetting, formData }) => {
122111
const { targetValue, note } = formData?.chartStyle || {};
123112
// When the statistical value and the target value can be calculated, the scale is displayed.
124113

125-
let targetText: string = `${formatNumberWithCommas(targetValue)} `;
114+
let targetText: string = `${targetValue} `;
126115
const resizeObserverRef = useResize(resizeHandler, [note, targetValue, targetText, currentValue.text]);
127116
let v = Number(currentValue.value.toString().replaceAll(",", ""))
128117
const showPercent = isNumeric(targetValue) && isNumeric(v);
@@ -138,7 +127,7 @@ const Summary = ({ openSetting, formData }) => {
138127
<CurrentValueWrapper color={color}>
139128
{currentValue.text}
140129
</CurrentValueWrapper>
141-
<Typography variant="h3">
130+
<Typography variant="body1">
142131
{targetValue && targetText}
143132
</Typography>
144133
</div>

0 commit comments

Comments
 (0)