]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Removes unused context bindings
authorMathias Küsel <mathiask@hotmail.de>
Thu, 14 Jan 2016 17:17:14 +0000 (18:17 +0100)
committerMathias Küsel <mathiask@hotmail.de>
Thu, 14 Jan 2016 17:17:14 +0000 (18:17 +0100)
src/controllers/controller.bar.js
src/controllers/controller.bubble.js
src/controllers/controller.doughnut.js
src/controllers/controller.line.js
src/controllers/controller.polarArea.js
src/controllers/controller.radar.js
src/core/core.controller.js
src/core/core.tooltip.js

index 1aca0df2e2e5758f7678074c0089e4870c22cf00..12ccde603c4ab7805505f075846f82fe0f2c25c1 100644 (file)
@@ -44,7 +44,7 @@
                                if (helpers.isDatasetVisible(dataset) && dataset.bar) {
                                        ++barCount;
                                }
-                       }, this);
+                       });
                        return barCount;
                },
 
index bce235c2ae3ca4a7c16cd893bf516c91531a9696..74e38a962bfd9a2b9079a3530a1ee91b826e9932 100644 (file)
                        helpers.each(this.getDataset().metaData, function(point, index) {
                                point.transition(easingDecimal);
                                point.draw();
-                       }, this);
+                       });
 
                },
 
index a38c904d79a21371c1a6766b111f620e412cc0ab..de121242b40e67bb93dcb554e7a6675454cc1cd4 100644 (file)
                        var easingDecimal = ease || 1;
                        helpers.each(this.getDataset().metaData, function(arc, index) {
                                arc.transition(easingDecimal).draw();
-                       }, this);
+                       });
                },
 
                setHoverStyle: function(arc) {
index fcef8af47f8707f740f791d0a34e8143f2af0799..a87814eaf4946b2a530cd03bd93c09da56066e10 100644 (file)
                        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)
index 7dbd3ea287485e5dd52e4bd7e8cc8204318dd137..25b19de56bf0983d23b438faf377cacd6666cb4a 100644 (file)
                        var easingDecimal = ease || 1;
                        helpers.each(this.getDataset().metaData, function(arc, index) {
                                arc.transition(easingDecimal).draw();
-                       }, this);
+                       });
                },
 
                setHoverStyle: function(arc) {
index 6d808c67a7fd941f57888c3c030b92858bc3af43..2955cb32939f644e8e9daea412888d69e5ace271 100644 (file)
                        // 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();
index c741359c374ed85604d13a63b0d17f4fe1dafed1..e4da7af74b01cdaabd0cc894df6fd005bf2e5016 100644 (file)
                                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);
+                                       });
                                }
                        }
                },
                resetElements: function resetElements() {
                        helpers.each(this.data.datasets, function(dataset, datasetIndex) {
                                dataset.controller.reset();
-                       }, this);
+                       });
                },
 
                update: function update(animationDuration, lazy) {
                        // 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);
                },
 
                                if (helpers.isDatasetVisible(dataset)) {
                                        dataset.controller.draw(ease);
                                }
-                       }, this);
+                       });
 
                        // Finally draw the tooltip
                        this.tooltip.transition(easingDecimal).draw();
                                                        elementsArray.push(element);
                                                        return elementsArray;
                                                }
-                                       }, this);
+                                       });
                                }
-                       }, this);
+                       });
 
                        return elementsArray;
                },
                                if(helpers.isDatasetVisible(dataset)){
                                        elementsArray.push(dataset.metaData[found._index]);
                                }
-                       }, this);
+                       });
 
                        return elementsArray;
                },
index 96b1d80c3a0de880866d92498e10771505f12d8d..37a43e5d398f985a0e2db40f93c12c2f6be48e1e 100644 (file)
                                                        backgroundColor: active._view.backgroundColor
                                                  });
                                                }
-                                       }, this);
+                                       });
 
                                        tooltipPosition = this.getAveragePosition(this._active);
                                        tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5);
                        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);
                                        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) {
                                helpers.each(vm.footer, function(footer) {
                                        ctx.fillText(footer, pt.x, pt.y);
                                        pt.y += vm.footerFontSize + vm.footerSpacing;
-                               }, this);
+                               });
                        }
                },
                draw: function draw() {