Skip to content

Commit 85edbdf

Browse files
committed
Define zindex in scatter attributes
1 parent e368849 commit 85edbdf

File tree

12 files changed

+21
-120
lines changed

12 files changed

+21
-120
lines changed

src/traces/box/attributes.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -452,14 +452,5 @@ module.exports = {
452452
'or sample points or both?'
453453
].join(' ')
454454
},
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(' ')
464-
}
455+
zindex: scatterAttrs.zindex
465456
};

src/traces/candlestick/attributes.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var extendFlat = require('../../lib').extendFlat;
44
var axisHoverFormat = require('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
55
var OHLCattrs = require('../ohlc/attributes');
66
var boxAttrs = require('../box/attributes');
7+
var scatterAttrs = require('../scatter/attributes');
78

89
function directionAttrs(lineColorDefault) {
910
return {
@@ -53,14 +54,5 @@ module.exports = {
5354
whiskerwidth: extendFlat({}, boxAttrs.whiskerwidth, { dflt: 0 }),
5455

5556
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-
}
57+
zindex: scatterAttrs.zindex
6658
};

src/traces/carpet/attributes.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ var carpetFont = fontAttrs({
88
editType: 'calc',
99
description: 'The default font used for axis & tick labels on this carpet'
1010
});
11+
12+
var scatterAttrs = require('../scatter/attributes');
13+
1114
// TODO: inherit from global font
1215
carpetFont.family.dflt = '"Open Sans", verdana, arial, sans-serif';
1316
carpetFont.size.dflt = 12;
@@ -113,14 +116,5 @@ module.exports = {
113116
].join(' ')
114117
},
115118
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-
}
119+
zindex: scatterAttrs.zindex
126120
};

src/traces/contour/attributes.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,7 @@ module.exports = extendFlat({
266266
}),
267267
editType: 'plot'
268268
},
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(' ')
278-
}
269+
zindex: scatterAttrs.zindex
279270
},
280271
colorScaleAttrs('', {
281272
cLetter: 'z',

src/traces/contourcarpet/attributes.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
var heatmapAttrs = require('../heatmap/attributes');
44
var contourAttrs = require('../contour/attributes');
5+
var scatterAttrs = require('../scatter/attributes');
56
var colorScaleAttrs = require('../../components/colorscale/attributes');
67

78
var extendFlat = require('../../lib/extend').extendFlat;
@@ -71,16 +72,7 @@ module.exports = extendFlat({
7172
},
7273

7374
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-
}
75+
zindex: scatterAttrs.zindex
8476
},
8577

8678
colorScaleAttrs('', {

src/traces/funnel/attributes.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
var barAttrs = require('../bar/attributes');
4+
var scatterAttrs = require('../scatter/attributes');
45
var lineAttrs = require('../scatter/attributes').line;
56
var baseAttrs = require('../../plots/attributes');
67
var axisHoverFormat = require('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
@@ -110,16 +111,7 @@ module.exports = {
110111

111112
offsetgroup: barAttrs.offsetgroup,
112113
alignmentgroup: barAttrs.alignmentgroup,
113-
zindex: {
114-
valType: 'integer',
115-
dflt: 0,
116-
editType: 'calc',
117-
description: [
118-
'Sets the layer on which this trace is displayed, relative to ',
119-
'other traces on the same axes. Traces with higher `zindex` ',
120-
'appear in front of those with lower `zindex`.'
121-
].join(' ')
122-
}
114+
zindex: scatterAttrs.zindex
123115
};
124116

125117
function funnelMarker() {

src/traces/heatmap/attributes.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,7 @@ module.exports = extendFlat({
133133
}),
134134

135135
showlegend: extendFlat({}, baseAttrs.showlegend, {dflt: false}),
136-
zindex: {
137-
valType: 'integer',
138-
dflt: 0,
139-
editType: 'calc',
140-
description: [
141-
'Sets the layer on which this trace is displayed, relative to ',
142-
'other traces on the same axes. Traces with higher `zindex` ',
143-
'appear in front of those with lower `zindex`.'
144-
].join(' ')
145-
}
136+
zindex: scatterAttrs.zindex
146137
}, {
147138
transforms: undefined
148139
},

src/traces/image/attributes.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
var baseAttrs = require('../../plots/attributes');
4+
var scatterAttrs = require('../scatter/attributes');
45
var hovertemplateAttrs = require('../../plots/template_attributes').hovertemplateAttrs;
56
var extendFlat = require('../../lib/extend').extendFlat;
67
var colormodel = require('./constants').colormodel;
@@ -134,14 +135,5 @@ module.exports = extendFlat({
134135
}),
135136

136137
transforms: undefined,
137-
zindex: {
138-
valType: 'integer',
139-
dflt: 0,
140-
editType: 'calc',
141-
description: [
142-
'Sets the layer on which this trace is displayed, relative to ',
143-
'other traces on the same axes. Traces with higher `zindex` ',
144-
'appear in front of those with lower `zindex`.'
145-
].join(' ')
146-
}
138+
zindex: scatterAttrs.zindex
147139
});

src/traces/ohlc/attributes.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,5 @@ module.exports = {
134134
}
135135
}),
136136

137-
zindex: {
138-
valType: 'integer',
139-
dflt: 0,
140-
editType: 'calc',
141-
description: [
142-
'Sets the layer on which this trace is displayed, relative to ',
143-
'other traces on the same axes. Traces with higher `zindex` ',
144-
'appear in front of those with lower `zindex`.'
145-
].join(' ')
146-
}
137+
zindex: scatterAttrs.zindex
147138
};

src/traces/scattercarpet/attributes.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,5 @@ module.exports = {
119119
}),
120120
hoveron: scatterAttrs.hoveron,
121121
hovertemplate: hovertemplateAttrs(),
122-
zindex: {
123-
valType: 'integer',
124-
dflt: 0,
125-
editType: 'calc',
126-
description: [
127-
'Sets the layer on which this trace is displayed, relative to ',
128-
'other traces on the same axes. Traces with higher `zindex` ',
129-
'appear in front of those with lower `zindex`.'
130-
].join(' ')
131-
}
122+
zindex: scatterAttrs.zindex
132123
};

src/traces/violin/attributes.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
var boxAttrs = require('../box/attributes');
4+
var scatterAttrs = require('../scatter/attributes');
45
var extendFlat = require('../../lib/extend').extendFlat;
56
var axisHoverFormat = require('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
67

@@ -255,14 +256,5 @@ module.exports = {
255256
'or sample points or the kernel density estimate or any combination of them?'
256257
].join(' ')
257258
},
258-
zindex: {
259-
valType: 'integer',
260-
dflt: 0,
261-
editType: 'calc',
262-
description: [
263-
'Sets the layer on which this trace is displayed, relative to ',
264-
'other traces on the same axes. Traces with higher `zindex` ',
265-
'appear in front of those with lower `zindex`.'
266-
].join(' ')
267-
}
259+
zindex: scatterAttrs.zindex
268260
};

src/traces/waterfall/attributes.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
var barAttrs = require('../bar/attributes');
4+
var scatterAttrs = require('../scatter/attributes');
45
var lineAttrs = require('../scatter/attributes').line;
56
var baseAttrs = require('../../plots/attributes');
67
var axisHoverFormat = require('../../plots/cartesian/axis_format_attributes').axisHoverFormat;
@@ -152,14 +153,5 @@ module.exports = {
152153

153154
offsetgroup: barAttrs.offsetgroup,
154155
alignmentgroup: barAttrs.alignmentgroup,
155-
zindex: {
156-
valType: 'integer',
157-
dflt: 0,
158-
editType: 'calc',
159-
description: [
160-
'Sets the layer on which this trace is displayed, relative to ',
161-
'other traces on the same axes. Traces with higher `zindex` ',
162-
'appear in front of those with lower `zindex`.'
163-
].join(' ')
164-
}
156+
zindex: scatterAttrs.zindex
165157
};

0 commit comments

Comments
 (0)