Skip to content

Commit 5bf79c9

Browse files
committed
Follow alex advice
1 parent c54c815 commit 5bf79c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plots/cartesian/set_convert.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.exports = function setConvert(ax, fullLayout) {
180180
function getCategoryPosition(v) {
181181
// d2l/d2c variant that that won't add categories but will also
182182
// allow numbers to be mapped to the linearized axis positions
183-
var index = getRangePosition(v);
183+
var index = getCategoryIndex(v);
184184
if(index !== undefined) return index;
185185
if(isNumeric(v)) return +v;
186186
}
@@ -320,12 +320,12 @@ module.exports = function setConvert(ax, fullLayout) {
320320
ax.d2r = ax.d2l_noadd = getCategoryPosition;
321321

322322
ax.r2c = function(v) {
323-
var index = getCategoryPosition(v);
323+
var index = getRangePosition(v);
324324
return index !== undefined ? index : ax.fraction2r(0.5);
325325
};
326326

327327
ax.l2r = ax.c2r = ensureNumber;
328-
ax.r2l = getCategoryPosition;
328+
ax.r2l = getRangePosition;
329329

330330
ax.d2p = function(v) { return ax.l2p(ax.r2c(v)); };
331331
ax.p2d = function(px) { return getCategoryName(p2l(px)); };

0 commit comments

Comments
 (0)