Skip to content

fix annotation category positioning #1155

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 3 commits into from
Nov 16, 2016
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
Next Next commit
annotation: assign dflt pos if category IS NOT present
  • Loading branch information
etpinard committed Nov 16, 2016
commit 9583cfaca0c4740ac5d12ff3e4a32744dc9c2f02
2 changes: 1 addition & 1 deletion src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ axes.coercePosition = function(containerOut, gd, coerce, axRef, attr, dflt) {
// if position is given as a category name, convert it to a number
if(typeof pos === 'string' && (ax._categories || []).length) {
newPos = ax._categories.indexOf(pos);
containerOut[attr] = (newPos !== -1) ? dflt : newPos;
containerOut[attr] = (newPos === -1) ? dflt : newPos;
return;
}
}
Expand Down