Skip to content

Commit e17739e

Browse files
committed
Add zindex to all cartesian traces
1 parent 5dcf623 commit e17739e

File tree

24 files changed

+129
-6
lines changed

24 files changed

+129
-6
lines changed

src/traces/box/attributes.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,5 +451,15 @@ module.exports = {
451451
'Do the hover effects highlight individual boxes ',
452452
'or sample points or both?'
453453
].join(' ')
454+
},
455+
zindex: {
456+
valType: 'integer',
457+
dflt: 0,
458+
editType: 'calc',
459+
description: [
460+
'Sets the layer on which this trace is displayed, relative to ',
461+
'other traces on the same axes. Traces with higher `zindex` ',
462+
'appear in front of those with lower `zindex`.'
463+
].join(' ')
454464
}
455465
};

src/traces/box/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
6767
if(notched) coerce('notchwidth');
6868

6969
handlePointsDefaults(traceIn, traceOut, coerce, {prefix: 'box'});
70+
coerce('zindex');
7071
}
7172

7273
function handleSampleDefaults(traceIn, traceOut, coerce, layout) {

src/traces/candlestick/attributes.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,14 @@ module.exports = {
5353
whiskerwidth: extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }),
5454

5555
hoverlabel: OHLCattrs.hoverlabel,
56+
zindex: {
57+
valType: 'integer',
58+
dflt: 0,
59+
editType: 'calc',
60+
description: [
61+
'Sets the layer on which this trace is displayed, relative to ',
62+
'other traces on the same axes. Traces with higher `zindex` ',
63+
'appear in front of those with lower `zindex`.'
64+
].join(' ')
65+
}
5666
};

src/traces/candlestick/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3131
coerce('whiskerwidth');
3232

3333
layout._requestRangeslider[traceOut.xaxis] = true;
34+
coerce('zindex');
3435
};
3536

3637
function handleDirection(traceIn, traceOut, coerce, direction) {

src/traces/carpet/attributes.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,15 @@ module.exports = {
112112
'Individual pieces can override this.'
113113
].join(' ')
114114
},
115-
transforms: undefined
115+
transforms: undefined,
116+
zindex: {
117+
valType: 'integer',
118+
dflt: 0,
119+
editType: 'calc',
120+
description: [
121+
'Sets the layer on which this trace is displayed, relative to ',
122+
'other traces on the same axes. Traces with higher `zindex` ',
123+
'appear in front of those with lower `zindex`.'
124+
].join(' ')
125+
}
116126
};

src/traces/carpet/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ module.exports = function supplyDefaults(traceIn, traceOut, dfltColor, fullLayou
4545
if(traceOut._cheater) {
4646
coerce('cheaterslope');
4747
}
48+
coerce('zindex');
4849
};

src/traces/contour/attributes.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,16 @@ module.exports = extendFlat({
265265
].join(' ')
266266
}),
267267
editType: 'plot'
268+
},
269+
zindex: {
270+
valType: 'integer',
271+
dflt: 0,
272+
editType: 'calc',
273+
description: [
274+
'Sets the layer on which this trace is displayed, relative to ',
275+
'other traces on the same axes. Traces with higher `zindex` ',
276+
'appear in front of those with lower `zindex`.'
277+
].join(' ')
268278
}
269279
},
270280
colorScaleAttrs('', {

src/traces/contour/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
5151
) {
5252
handleHeatmapLabelDefaults(coerce, layout);
5353
}
54+
coerce('zindex');
5455
};

src/traces/contourcarpet/attributes.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ module.exports = extendFlat({
7070
editType: 'plot'
7171
},
7272

73-
transforms: undefined
73+
transforms: undefined,
74+
zindex: {
75+
valType: 'integer',
76+
dflt: 0,
77+
editType: 'calc',
78+
description: [
79+
'Sets the layer on which this trace is displayed, relative to ',
80+
'other traces on the same axes. Traces with higher `zindex` ',
81+
'appear in front of those with lower `zindex`.'
82+
].join(' ')
83+
}
7484
},
7585

7686
colorScaleAttrs('', {

src/traces/contourcarpet/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
5555
traceOut._defaultColor = defaultColor;
5656
traceOut._length = null;
5757
}
58+
coerce('zindex');
5859
};

0 commit comments

Comments
 (0)