Skip to content

Commit

Permalink
bail out if the inferred ordinal domain has more than 10k values
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Apr 29, 2022
1 parent 41a5f0d commit 9782575
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scales/ordinal.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function inferDomain(channels) {
if (value === undefined) continue;
for (const v of value) values.add(v);
}
if (values.size > 10e3) throw new Error("This ordinal domain would have more than 10,000 values. If this is intentional, set the domain explicitly.");
return sort(values, ascendingDefined);
}

Expand Down

0 comments on commit 9782575

Please sign in to comment.