Skip to content

Commit 3a9aa58

Browse files
committed
short-circuit spike properties when spikes are off
1 parent bd11567 commit 3a9aa58

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/plots/cartesian/layout_defaults.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,13 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
173173

174174
handleAxisDefaults(axLayoutIn, axLayoutOut, coerce, defaultOptions, layoutOut);
175175

176-
coerce('showspikes');
177-
coerce('spikecolor');
178-
coerce('spikethickness');
179-
coerce('spikedash');
180-
coerce('spikemode');
176+
var showSpikes = coerce('showspikes');
177+
if(showSpikes) {
178+
coerce('spikecolor');
179+
coerce('spikethickness');
180+
coerce('spikedash');
181+
coerce('spikemode');
182+
}
181183

182184
var positioningOptions = {
183185
letter: axLetter,

0 commit comments

Comments
 (0)