8000 Fix category init for non-matching axes on graphs with matching axes by etpinard · Pull Request #3565 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix category init for non-matching axes on graphs with matching axes #3565

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

Merged
merged 2 commits into from
Feb 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
improve ax.clearCalc:
- mv for-else call after for loop
- rename init() -> emptyCategories()
- break after finding group in which ax is in - as one ax can
  only be in a single match group at a time.
  • Loading branch information
etpinard committed Feb 21, 2019
commit 598a67bce659e737ecb4dfe11a645135b60f31a5
10 changes: 5 additions & 5 deletions src/plots/cartesian/set_convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ module.exports = function setConvert(ax, fullLayout) {

// should skip if not category nor multicategory
ax.clearCalc = function() {
var init = function() {
var emptyCategories = function() {
ax._categories = [];
ax._categoriesMap = {};
};
Expand Down Expand Up @@ -606,14 +606,14 @@ module.exports = function setConvert(ax, fullLayout) {
ax._categories = categories;
ax._categoriesMap = categoriesMap;
} else {
init();
emptyCategories();
}
break;
}

if(!found) init();
}
if(!found) emptyCategories();
} else {
init();
emptyCategories();
}

if(ax._initialCategories) {
Expand Down
0