Skip to content

Commit cca578a

Browse files
Filmbostock
andauthored
minimal support for bigint (#1279)
Co-authored-by: Mike Bostock <[email protected]>
1 parent d8378f0 commit cca578a

File tree

8 files changed

+413
-2
lines changed

8 files changed

+413
-2
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"plugins": ["@typescript-eslint"],
44
"parser": "@typescript-eslint/parser",
55
"env": {
6-
"es6": true,
6+
"es2020": true,
77
"node": true,
88
"browser": true
99
},

src/scales.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ export function coerceNumbers(values) {
512512
// since the result will be stored in a Float64Array and we don’t want null to
513513
// be coerced to zero.
514514
export function coerceNumber(x) {
515-
return x == null ? NaN : +x;
515+
return x == null ? NaN : Number(x);
516516
}
517517

518518
// When coercing strings to dates, we only want to allow the ISO 8601 format

test/output/bigint1.svg

Lines changed: 85 additions & 0 deletions
Loading

test/output/bigint2.svg

Lines changed: 68 additions & 0 deletions
Loading

test/output/bigintLog.svg

Lines changed: 120 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)