Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: domain should not be reset when min/max are set #1638

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion js/src/LinearScaleModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ export class LinearScaleModel extends ScaleModel {

update_domain() {
const that = this;
// if all domains are empty, we reset to the default domain of (0, 1)
// if all domains are empty, and min or max are not set, we reset to the default domain of (0, 1)
if (
(this.min_from_data || this.max_from_data) &&
_.every(this.domains, (d) => {
return d.length === 0;
})
Expand Down
2 changes: 1 addition & 1 deletion test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- jupyterlab=3.2
- notebook
- jupyter-packaging
- pytest
- pytest <8
- nbval
- pytest-cov
- selenium
Expand Down