Skip to content

An open source alternative to Tableau. Embeddable visual analytic

fix: temporal type error

ObservedObserver63bf1e34bd0f
diff --git a/packages/graphic-walker/src/lib/inferMeta.ts b/packages/graphic-walker/src/lib/inferMeta.ts
index 42e9a88a..5a000c3b 100644
--- a/packages/graphic-walker/src/lib/inferMeta.ts
+++ b/packages/graphic-walker/src/lib/inferMeta.ts
@@ -53,7 +53,7 @@ function inferAnalyticTypeFromSemanticType(semanticType: ISemanticType): IAnalyt
export function inferSemanticType(data: IRow[], fid: string): ISemanticType {
let st = UnivariateSummary.getFieldType(data, fid);
if (st === 'nominal') {
- if (isDateTimeArray(data.map((row) => row[fid]))) st = 'temporal';
+ if (isDateTimeArray(data.map((row) => `${row[fid]}`))) st = 'temporal';
} else if (st === 'ordinal') {
const valueSet: Set<number> = new Set();
let _max = -Infinity;