Skip to content

Commit df0560c

Browse files
Don't coerce pixel, paper or domain references the same as range references
1 parent e458c86 commit df0560c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/plots/cartesian/axes.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ axes.addAxRefDomainCoerceRefExtra = function(container, axLetter, coerceRefExtra
173173
* - for other types: coerce them to numbers
174174
*/
175175
axes.coercePosition = function(containerOut, gd, coerce, axRef, attr, dflt) {
176-
var cleanPos, pos;
177-
178-
if(axRef === 'paper' || axRef === 'pixel') {
176+
var cleanPos, pos, axRefType;
177+
axRefType = axes.getRefType(axRef);
178+
if(axRefType === 'paper' || axRefType === 'pixel' || axRefType === 'domain') {
179179
cleanPos = Lib.ensureNumber;
180180
pos = coerce(attr, dflt);
181181
} else {
182-
// TODO: This doesn't seem to work for dates
182+
// if axRef is 'range' or undefined we will end up here
183183
var ax = axes.getFromId(gd, axRef);
184184
dflt = ax.fraction2r(dflt);
185185
pos = coerce(attr, dflt);

0 commit comments

Comments
 (0)