Skip to content

Commit 33dda89

Browse files
committed
don't try to style grid lines either
1 parent 2ceede1 commit 33dda89

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/plot_api/subroutines.js

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -255,27 +255,29 @@ exports.lsInner = function(gd) {
255255
rightpos += xa._offset - gs.l;
256256
}
257257

258-
plotinfo.xlines
259-
.attr('transform', originx)
260-
.attr('d', (
261-
(showbottom ? (xpathPrefix + bottompos + xpathSuffix) : '') +
262-
(showtop ? (xpathPrefix + toppos + xpathSuffix) : '') +
263-
(showfreex ? (xpathPrefix + freeposx + xpathSuffix) : '')) ||
264-
// so it doesn't barf with no lines shown
265-
'M0,0')
266-
.style('stroke-width', xlw + 'px')
267-
.call(Color.stroke, xa.showline ?
268-
xa.linecolor : 'rgba(0,0,0,0)');
269-
plotinfo.ylines
270-
.attr('transform', originy)
271-
.attr('d', (
272-
(showleft ? ('M' + leftpos + ypathSuffix) : '') +
273-
(showright ? ('M' + rightpos + ypathSuffix) : '') +
274-
(showfreey ? ('M' + freeposy + ypathSuffix) : '')) ||
275-
'M0,0')
276-
.attr('stroke-width', ylw + 'px')
277-
.call(Color.stroke, ya.showline ?
278-
ya.linecolor : 'rgba(0,0,0,0)');
258+
if(fullLayout._has('cartesian')) {
259+
plotinfo.xlines
260+
.attr('transform', originx)
261+
.attr('d', (
262+
(showbottom ? (xpathPrefix + bottompos + xpathSuffix) : '') +
263+
(showtop ? (xpathPrefix + toppos + xpathSuffix) : '') +
264+
(showfreex ? (xpathPrefix + freeposx + xpathSuffix) : '')) ||
265+
// so it doesn't barf with no lines shown
266+
'M0,0')
267+
.style('stroke-width', xlw + 'px')
268+
.call(Color.stroke, xa.showline ?
269+
xa.linecolor : 'rgba(0,0,0,0)');
270+
plotinfo.ylines
271+
.attr('transform', originy)
272+
.attr('d', (
273+
(showleft ? ('M' + leftpos + ypathSuffix) : '') +
274+
(showright ? ('M' + rightpos + ypathSuffix) : '') +
275+
(showfreey ? ('M' + freeposy + ypathSuffix) : '')) ||
276+
'M0,0')
277+
.attr('stroke-width', ylw + 'px')
278+
.call(Color.stroke, ya.showline ?
279+
ya.linecolor : 'rgba(0,0,0,0)');
280+
}
279281

280282
plotinfo.xaxislayer.attr('transform', originx);
281283
plotinfo.yaxislayer.attr('transform', originy);

0 commit comments

Comments
 (0)