File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ defaults._set('global', {
53
53
var options = chart . options . legend || { } ;
54
54
var usePointStyle = options . labels && options . labels . usePointStyle ;
55
55
56
- return chart . _getSortedDatasetMetas ( ) . map ( function ( meta , i ) {
56
+ return chart . _getSortedDatasetMetas ( ) . map ( function ( meta ) {
57
57
var style = meta . controller . getStyle ( usePointStyle ? 0 : undefined ) ;
58
58
59
59
return {
60
60
text : datasets [ meta . index ] . label ,
61
61
fillStyle : style . backgroundColor ,
62
- hidden : ! chart . isDatasetVisible ( i ) ,
62
+ hidden : ! chart . isDatasetVisible ( meta . index ) ,
63
63
lineCap : style . borderCapStyle ,
64
64
lineDash : style . borderDash ,
65
65
lineDashOffset : style . borderDashOffset ,
@@ -70,7 +70,7 @@ defaults._set('global', {
70
70
rotation : style . rotation ,
71
71
72
72
// Below is extra data used for toggling the datasets
73
- datasetIndex : i
73
+ datasetIndex : meta . index
74
74
} ;
75
75
} , this ) ;
76
76
}
You can’t perform that action at this time.
0 commit comments