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

Skip to content

Commit 34c6fef

Browse files
committed
Move tickprefix/suffic coersion back into if block
1 parent 3cd0487 commit 34c6fef

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/plots/cartesian/tick_defaults.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,25 @@ module.exports = function handleTickDefaults(containerIn, containerOut, coerce,
3131

3232
var showAttrDflt = getShowAttrDflt(containerIn);
3333

34-
var showTickLabels = coerce('showticklabels'),
35-
tickFormat = coerce('tickformat'),
36-
tickPrefix = coerce('tickprefix'),
37-
tickSuffix = coerce('ticksuffix');
38-
39-
if(tickPrefix) coerce('showtickprefix', showAttrDflt);
40-
if(tickSuffix) coerce('showticksuffix', showAttrDflt);
41-
34+
var showTickLabels = coerce('showticklabels');
4235
if(showTickLabels) {
4336
Lib.coerceFont(coerce, 'tickfont', options.font || {});
4437
coerce('tickangle');
45-
}
4638

47-
if(axType !== 'category') {
48-
if(!options.noHover) coerce('hoverformat');
39+
var tickPrefix = coerce('tickprefix');
40+
if(tickPrefix) coerce('showtickprefix', showAttrDflt);
4941

42+
var tickSuffix = coerce('ticksuffix');
43+
if(tickSuffix) coerce('showticksuffix', showAttrDflt);
44+
45+
var tickFormat = coerce('tickformat');
5046
if(!tickFormat && axType !== 'date') {
5147
coerce('showexponent', showAttrDflt);
5248
coerce('exponentformat');
5349
}
5450
}
51+
52+
if(axType !== 'category' && !options.noHover) coerce('hoverformat');
5553
};
5654

5755
/*

0 commit comments

Comments
 (0)