We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfa8c92 commit 6319d56Copy full SHA for 6319d56
src/scale/Ordinal.ts
@@ -143,7 +143,7 @@ class OrdinalScale extends Scale<OrdinalScaleSetting> {
143
contain(rank: OrdinalRawValue | OrdinalNumber): boolean {
144
rank = this.parse(rank);
145
return scaleHelper.contain(rank, this._extent)
146
- && this._ordinalMeta.categories.hasOwnProperty(rank);
+ && rank >= 0 && rank < this._ordinalMeta.categories.length;
147
}
148
149
/**
0 commit comments