Skip to content

Commit

Permalink
fix(axis):null value item on category axis should be able to show too…
Browse files Browse the repository at this point in the history
…ltip
  • Loading branch information
Justin-ZS committed Mar 10, 2025
1 parent b5c4a66 commit bfa8c92
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/scale/Ordinal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class OrdinalScale extends Scale<OrdinalScaleSetting> {
contain(rank: OrdinalRawValue | OrdinalNumber): boolean {
rank = this.parse(rank);
return scaleHelper.contain(rank, this._extent)
&& this._ordinalMeta.categories[rank] != null;
&& this._ordinalMeta.categories.hasOwnProperty(rank);
}

/**
Expand Down
86 changes: 86 additions & 0 deletions test/axis-dataset-null.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/runTest/actions/__meta__.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/runTest/actions/axis-dataset-null.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bfa8c92

Please sign in to comment.