@@ -203,7 +203,7 @@ drawing.symbolNumber = function(v) {
203203 return Math . floor ( Math . max ( v , 0 ) ) ;
204204} ;
205205
206- function singlePointStyle ( d , sel , trace , markerScale , lineScale , marker , markerLine , gd , i ) {
206+ function singlePointStyle ( d , sel , trace , markerScale , lineScale , marker , markerLine , gd ) {
207207 // only scatter & box plots get marker path and opacity
208208 // bars, histograms don't
209209 if ( Registry . traceIs ( trace , 'symbols' ) ) {
@@ -292,7 +292,7 @@ function singlePointStyle(d, sel, trace, markerScale, lineScale, marker, markerL
292292 else gradientColor = markerGradient . color ;
293293
294294 var gradientID = 'g' + gd . _fullLayout . _uid + '-' + trace . uid ;
295- if ( perPointGradient ) gradientID += '-' + i ;
295+ if ( perPointGradient ) gradientID += '-' + d . i ;
296296
297297 sel . call ( drawing . gradient , gd , gradientID , gradientType , fillColor , gradientColor ) ;
298298 }
@@ -361,10 +361,10 @@ drawing.initGradients = function(gd) {
361361 gradientsGroup . selectAll ( 'linearGradient,radialGradient' ) . remove ( ) ;
362362} ;
363363
364- drawing . singlePointStyle = function ( d , sel , trace , markerScale , lineScale , gd , i ) {
364+ drawing . singlePointStyle = function ( d , sel , trace , markerScale , lineScale , gd ) {
365365 var marker = trace . marker ;
366366
367- singlePointStyle ( d , sel , trace , markerScale , lineScale , marker , marker . line , gd , i ) ;
367+ singlePointStyle ( d , sel , trace , markerScale , lineScale , marker , marker . line , gd ) ;
368368
369369} ;
370370
@@ -378,8 +378,8 @@ drawing.pointStyle = function(s, trace) {
378378 var lineScale = drawing . tryColorscale ( marker , 'line' ) ;
379379 var gd = Lib . getPlotDiv ( s . node ( ) ) ;
380380
381- s . each ( function ( d , i ) {
382- drawing . singlePointStyle ( d , d3 . select ( this ) , trace , markerScale , lineScale , gd , i ) ;
381+ s . each ( function ( d ) {
382+ drawing . singlePointStyle ( d , d3 . select ( this ) , trace , markerScale , lineScale , gd ) ;
383383 } ) ;
384384} ;
385385
0 commit comments