Skip to content

Commit a34dafa

Browse files
committed
Rename displayInd -> displayindex
1 parent d2c5ae8 commit a34dafa

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/traces/parcats/attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ module.exports = {
123123
'will be truncated). Each value must an element of `catValues`.'
124124
].join(' ')
125125
},
126-
displayInd: {
126+
displayindex: {
127127
valType: 'integer',
128128
role: 'info',
129129
editType: 'calc',

src/traces/parcats/calc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ module.exports = function calc(gd, trace) {
169169

170170
// Array of DimensionModel objects
171171
var dimensionModels = trace.dimensions.map(function(di, i) {
172-
return createDimensionModel(i, di.displayInd, di.label, totalCount);
172+
return createDimensionModel(i, di.displayindex, di.label, totalCount);
173173
});
174174

175175

@@ -464,10 +464,10 @@ function getUniqueInfo(values, uniqueValues) {
464464
* @param {Object} trace
465465
*/
466466
function validateDimensionDisplayInds(trace) {
467-
var displayInds = trace.dimensions.map(function(dim) {return dim.displayInd;});
467+
var displayInds = trace.dimensions.map(function(dim) {return dim.displayindex;});
468468
if(!isRangePermutation(displayInds)) {
469469
trace.dimensions.forEach(function(dim, i) {
470-
dim.displayInd = i;
470+
dim.displayindex = i;
471471
});
472472
}
473473
}

src/traces/parcats/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function dimensionsDefaults(traceIn, traceOut) {
5656
// Dimension level
5757
coerce('values');
5858
coerce('label');
59-
coerce('displayInd', i);
59+
coerce('displayindex', i);
6060

6161
// Category level
6262
coerce('catDisplayInds');

src/traces/parcats/parcats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ function dragDimensionEnd(d) {
10581058

10591059
if(anyDimsReordered) {
10601060
finalDragDimensionDisplayInds.forEach(function(finalDimDisplay, dimInd) {
1061-
restyleData['dimensions[' + dimInd + '].displayInd'] = finalDimDisplay;
1061+
restyleData['dimensions[' + dimInd + '].displayindex'] = finalDimDisplay;
10621062
});
10631063
}
10641064

test/image/mocks/parcats_reordered.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
{"type": "parcats",
44
"domain": {"x": [0.125, 0.625],"y": [0.25, 0.75]},
55
"dimensions": [
6-
{"label": "One", "values": [1, 1, 2, 1, 2, 1, 1, 2, 1], "displayInd": 0},
7-
{"label": "Two", "values": ["A", "B", "A", "B", "C", "C", "A", "B", "C"], "displayInd": 2,
6+
{"label": "One", "values": [1, 1, 2, 1, 2, 1, 1, 2, 1], "displayindex": 0},
7+
{"label": "Two", "values": ["A", "B", "A", "B", "C", "C", "A", "B", "C"], "displayindex": 2,
88
"catDisplayInds": [1, 2, 0], "CatValues": ["A", "B", "C"]},
9-
{"label": "Three", "values": [11, 11, 11, 11, 11, 11, 11, 11, 11], "displayInd": 1}]}
9+
{"label": "Three", "values": [11, 11, 11, 11, 11, 11, 11, 11, 11], "displayindex": 1}]}
1010
],
1111
"layout": {
1212
"height": 602,

0 commit comments

Comments
 (0)