Skip to content

Commit 6d35c48

Browse files
committed
rename trace index 'i' -> traceIndex
1 parent ab1dcb3 commit 6d35c48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/plots/plots.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -642,22 +642,23 @@ function relinkPrivateKeys(toLayout, fromLayout) {
642642
}
643643
}
644644

645-
plots.supplyDataDefaults = function(traceIn, i, layout) {
645+
plots.supplyDataDefaults = function(traceIn, traceIndex, layout) {
646646
var traceOut = {},
647-
defaultColor = Color.defaults[i % Color.defaults.length];
647+
defaultColor = Color.defaults[traceIndex % Color.defaults.length];
648648

649649
function coerce(attr, dflt) {
650650
return Lib.coerce(traceIn, traceOut, plots.attributes, attr, dflt);
651651
}
652652

653653
function coerceSubplotAttr(subplotType, subplotAttr) {
654654
if(!plots.traceIs(traceOut, subplotType)) return;
655+
655656
return Lib.coerce(traceIn, traceOut,
656657
plots.subplotsRegistry[subplotType].attributes, subplotAttr);
657658
}
658659

659660
// module-independent attributes
660-
traceOut.index = i;
661+
traceOut.index = traceIndex;
661662
var visible = coerce('visible');
662663

663664
coerce('type');
@@ -684,7 +685,7 @@ plots.supplyDataDefaults = function(traceIn, i, layout) {
684685

685686
if(_module) _module.supplyDefaults(traceIn, traceOut, defaultColor, layout);
686687

687-
coerce('name', 'trace ' + i);
688+
coerce('name', 'trace ' + traceIndex);
688689

689690
if(!plots.traceIs(traceOut, 'noOpacity')) coerce('opacity');
690691

0 commit comments

Comments
 (0)