diff --git a/src/controllers/controller.bar.js b/src/controllers/controller.bar.js index 1aca0df2e..12ccde603 100644 --- a/src/controllers/controller.bar.js +++ b/src/controllers/controller.bar.js @@ -44,7 +44,7 @@ if (helpers.isDatasetVisible(dataset) && dataset.bar) { ++barCount; } - }, this); + }); return barCount; }, diff --git a/src/controllers/controller.bubble.js b/src/controllers/controller.bubble.js index bce235c2a..74e38a962 100644 --- a/src/controllers/controller.bubble.js +++ b/src/controllers/controller.bubble.js @@ -133,7 +133,7 @@ helpers.each(this.getDataset().metaData, function(point, index) { point.transition(easingDecimal); point.draw(); - }, this); + }); }, diff --git a/src/controllers/controller.doughnut.js b/src/controllers/controller.doughnut.js index a38c904d7..de121242b 100644 --- a/src/controllers/controller.doughnut.js +++ b/src/controllers/controller.doughnut.js @@ -219,7 +219,7 @@ var easingDecimal = ease || 1; helpers.each(this.getDataset().metaData, function(arc, index) { arc.transition(easingDecimal).draw(); - }, this); + }); }, setHoverStyle: function(arc) { diff --git a/src/controllers/controller.line.js b/src/controllers/controller.line.js index fcef8af47..a87814eaf 100644 --- a/src/controllers/controller.line.js +++ b/src/controllers/controller.line.js @@ -259,9 +259,9 @@ var easingDecimal = ease || 1; // Transition Point Locations - helpers.each(this.getDataset().metaData, function(point, index) { + helpers.each(this.getDataset().metaData, function(point) { point.transition(easingDecimal); - }, this); + }); // Transition and Draw the line if (this.chart.options.showLines) diff --git a/src/controllers/controller.polarArea.js b/src/controllers/controller.polarArea.js index 7dbd3ea28..25b19de56 100644 --- a/src/controllers/controller.polarArea.js +++ b/src/controllers/controller.polarArea.js @@ -195,7 +195,7 @@ var easingDecimal = ease || 1; helpers.each(this.getDataset().metaData, function(arc, index) { arc.transition(easingDecimal).draw(); - }, this); + }); }, setHoverStyle: function(arc) { diff --git a/src/controllers/controller.radar.js b/src/controllers/controller.radar.js index 6d808c67a..2955cb329 100644 --- a/src/controllers/controller.radar.js +++ b/src/controllers/controller.radar.js @@ -167,7 +167,7 @@ // Transition Point Locations helpers.each(this.getDataset().metaData, function(point, index) { point.transition(easingDecimal); - }, this); + }); // Transition and Draw the line this.getDataset().metaDataset.transition(easingDecimal).draw(); diff --git a/src/core/core.controller.js b/src/core/core.controller.js index c741359c3..e4da7af74 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -110,14 +110,14 @@ if (this.options.scales.xAxes && this.options.scales.xAxes.length) { helpers.each(this.options.scales.xAxes, function(xAxisOptions, index) { xAxisOptions.id = xAxisOptions.id || (defaultXAxisID + index); - }, this); + }); } if (this.options.scales.yAxes && this.options.scales.yAxes.length) { // Build the y axes helpers.each(this.options.scales.yAxes, function(yAxisOptions, index) { yAxisOptions.id = yAxisOptions.id || (defaultYAxisID + index); - }, this); + }); } } }, @@ -239,7 +239,7 @@ resetElements: function resetElements() { helpers.each(this.data.datasets, function(dataset, datasetIndex) { dataset.controller.reset(); - }, this); + }); }, update: function update(animationDuration, lazy) { @@ -254,12 +254,12 @@ // Make sure all dataset controllers have correct meta data counts helpers.each(this.data.datasets, function(dataset, datasetIndex) { dataset.controller.buildOrUpdateElements(); - }, this); + }); // This will loop through any data and do the appropriate element update for the type helpers.each(this.data.datasets, function(dataset, datasetIndex) { dataset.controller.update(); - }, this); + }); this.render(animationDuration, lazy); }, @@ -310,7 +310,7 @@ if (helpers.isDatasetVisible(dataset)) { dataset.controller.draw(ease); } - }, this); + }); // Finally draw the tooltip this.tooltip.transition(easingDecimal).draw(); @@ -330,9 +330,9 @@ elementsArray.push(element); return elementsArray; } - }, this); + }); } - }, this); + }); return elementsArray; }, @@ -361,7 +361,7 @@ if(helpers.isDatasetVisible(dataset)){ elementsArray.push(dataset.metaData[found._index]); } - }, this); + }); return elementsArray; }, diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 96b1d80c3..37a43e5d3 100644 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -265,7 +265,7 @@ backgroundColor: active._view.backgroundColor }); } - }, this); + }); tooltipPosition = this.getAveragePosition(this._active); tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5); @@ -330,7 +330,7 @@ ctx.font = helpers.fontString(vm.bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily); helpers.each(vm.beforeBody.concat(vm.afterBody), function(line) { size.width = Math.max(size.width, ctx.measureText(line).width); - }, this); + }); helpers.each(vm.body, function(line) { size.width = Math.max(size.width, ctx.measureText(line).width + (this._options.tooltips.mode !== 'single' ? (vm.bodyFontSize + 2) : 0)); }, this); @@ -495,7 +495,7 @@ if (i + 1 === vm.title.length) { pt.y += vm.titleMarginBottom - vm.titleSpacing; // If Last, add margin, remove spacing } - }, this); + }); } }, drawBody: function drawBody(pt, vm, ctx, opacity) { @@ -554,7 +554,7 @@ helpers.each(vm.footer, function(footer) { ctx.fillText(footer, pt.x, pt.y); pt.y += vm.footerFontSize + vm.footerSpacing; - }, this); + }); } }, draw: function draw() {