Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9583cfa

Browse files
committed
annotation: assign dflt pos if category IS NOT present
1 parent e94b1d1 commit 9583cfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ axes.coercePosition = function(containerOut, gd, coerce, axRef, attr, dflt) {
116116
// if position is given as a category name, convert it to a number
117117
if(typeof pos === 'string' && (ax._categories || []).length) {
118118
newPos = ax._categories.indexOf(pos);
119-
containerOut[attr] = (newPos !== -1) ? dflt : newPos;
119+
containerOut[attr] = (newPos === -1) ? dflt : newPos;
120120
return;
121121
}
122122
}

0 commit comments

Comments
 (0)