]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Remove duplicated function names 2800/head
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Sat, 18 Jun 2016 09:15:25 +0000 (11:15 +0200)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Sat, 18 Jun 2016 09:15:25 +0000 (11:15 +0200)
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.datasetController.js
src/core/core.scale.js
src/core/core.tooltip.js
src/scales/scale.time.js

index 509ff1b2a2a3db1b05cfcbc48748854e5c5ce829..29256cd30df2f1b0644c1eea93ae473c2b2c741e 100644 (file)
@@ -40,7 +40,7 @@ module.exports = function(Chart) {
                },
 
                // Get the number of datasets that display bars. We use this to correctly calculate the bar width
-               getBarCount: function getBarCount() {
+               getBarCount: function() {
                        var me = this;
                        var barCount = 0;
                        helpers.each(me.chart.data.datasets, function(dataset, datasetIndex) {
@@ -52,14 +52,14 @@ module.exports = function(Chart) {
                        return barCount;
                },
 
-               update: function update(reset) {
+               update: function(reset) {
                        var me = this;
                        helpers.each(me.getMeta().data, function(rectangle, index) {
                                me.updateElement(rectangle, index, reset);
                        }, me);
                },
 
-               updateElement: function updateElement(rectangle, index, reset) {
+               updateElement: function(rectangle, index, reset) {
                        var me = this;
                        var meta = me.getMeta();
                        var xScale = me.getScaleForId(meta.xAxisID);
@@ -338,7 +338,7 @@ module.exports = function(Chart) {
        };
 
        Chart.controllers.horizontalBar = Chart.controllers.bar.extend({
-               updateElement: function updateElement(rectangle, index, reset) {
+               updateElement: function(rectangle, index, reset) {
                        var me = this;
                        var meta = me.getMeta();
                        var xScale = me.getScaleForId(meta.xAxisID);
index ee717a3dc9b37277eea4c89ee9816a9da5b64eba..9d2d1f2c1b55d315f563e764511cc61a4c028e9d 100644 (file)
@@ -41,7 +41,7 @@ module.exports = function(Chart) {
 
                dataElementType: Chart.elements.Point,
 
-               update: function update(reset) {
+               update: function(reset) {
                        var me = this;
                        var meta = me.getMeta();
                        var points = meta.data;
index c039532b4a133a9080ef3d3e13c804bda0a55177..159f40b3d3a06115eb440bee670ec8e186148e54 100644 (file)
@@ -119,7 +119,7 @@ module.exports = function(Chart) {
                linkScales: helpers.noop,
 
                // Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly
-               getRingIndex: function getRingIndex(datasetIndex) {
+               getRingIndex: function(datasetIndex) {
                        var ringIndex = 0;
 
                        for (var j = 0; j < datasetIndex; ++j) {
@@ -131,7 +131,7 @@ module.exports = function(Chart) {
                        return ringIndex;
                },
 
-               update: function update(reset) {
+               update: function(reset) {
                        var me = this;
                        var chart = me.chart,
                                chartArea = chart.chartArea,
index b5c31e161207025faee1f86c45e0fb0ef5109748..48f92ed14fecd2aad870cdf2966196566d20a407 100644 (file)
@@ -46,7 +46,7 @@ module.exports = function(Chart) {
                        }
                },
 
-               update: function update(reset) {
+               update: function(reset) {
                        var me = this;
                        var meta = me.getMeta();
                        var line = meta.dataset;
index 23d0f4e19abfd3f57e286ea69d651919b6df7335..db36a24c1db689aec89e546b5eaadc05be42b165 100644 (file)
@@ -105,7 +105,7 @@ module.exports = function(Chart) {
 
                linkScales: helpers.noop,
 
-               update: function update(reset) {
+               update: function(reset) {
                        var me = this;
                        var chart = me.chart;
                        var chartArea = chart.chartArea;
index 4634add4367d6bacd0f209cecd23c5ef2bd1738c..bc963b86835e78c7dc5aaec187200f29983b8f67 100644 (file)
@@ -30,7 +30,7 @@ module.exports = function(Chart) {
                        this.updateBezierControlPoints();
                },
 
-               update: function update(reset) {
+               update: function(reset) {
                        var me = this;
                        var meta = me.getMeta();
                        var line = meta.dataset;
index 9b6693900e3d546a3da9d2b06cb3a1f3ad879246..bce768810abf05bd2f8ef6eea0f091224d7b92a6 100644 (file)
@@ -45,7 +45,7 @@ module.exports = function(Chart) {
 
        helpers.extend(Chart.Controller.prototype, /** @lends Chart.Controller */ {
 
-               initialize: function initialize() {
+               initialize: function() {
                        var me = this;
                        // Before init plugin notification
                        Chart.plugins.notify('beforeInit', [me]);
@@ -68,12 +68,12 @@ module.exports = function(Chart) {
                        return me;
                },
 
-               clear: function clear() {
+               clear: function() {
                        helpers.clear(this.chart);
                        return this;
                },
 
-               stop: function stop() {
+               stop: function() {
                        // Stops any current animation loop occuring
                        Chart.animationService.cancelAnimation(this);
                        return this;
@@ -115,7 +115,7 @@ module.exports = function(Chart) {
                        return me;
                },
 
-               ensureScalesHaveIDs: function ensureScalesHaveIDs() {
+               ensureScalesHaveIDs: function() {
                        var options = this.options;
                        var scalesOptions = options.scales || {};
                        var scaleOptions = options.scale;
@@ -136,7 +136,7 @@ module.exports = function(Chart) {
                /**
                 * Builds a map of scale ID to scale object for future lookup.
                 */
-               buildScales: function buildScales() {
+               buildScales: function() {
                        var me = this;
                        var options = me.options;
                        var scales = me.scales = {};
@@ -186,7 +186,7 @@ module.exports = function(Chart) {
                        Chart.layoutService.update(this, this.chart.width, this.chart.height);
                },
 
-               buildOrUpdateControllers: function buildOrUpdateControllers() {
+               buildOrUpdateControllers: function() {
                        var me = this;
                        var types = [];
                        var newControllers = [];
@@ -219,7 +219,7 @@ module.exports = function(Chart) {
                        return newControllers;
                },
 
-               resetElements: function resetElements() {
+               resetElements: function() {
                        var me = this;
                        helpers.each(me.data.datasets, function(dataset, datasetIndex) {
                                me.getDatasetMeta(datasetIndex).controller.reset();
@@ -486,11 +486,11 @@ module.exports = function(Chart) {
                        return typeof meta.hidden === 'boolean'? !meta.hidden : !this.data.datasets[datasetIndex].hidden;
                },
 
-               generateLegend: function generateLegend() {
+               generateLegend: function() {
                        return this.options.legendCallback(this);
                },
 
-               destroy: function destroy() {
+               destroy: function() {
                        var me = this;
                        me.stop();
                        me.clear();
@@ -516,11 +516,11 @@ module.exports = function(Chart) {
                        delete Chart.instances[me.id];
                },
 
-               toBase64Image: function toBase64Image() {
+               toBase64Image: function() {
                        return this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);
                },
 
-               initToolTip: function initToolTip() {
+               initToolTip: function() {
                        var me = this;
                        me.tooltip = new Chart.Tooltip({
                                _chart: me.chart,
@@ -530,7 +530,7 @@ module.exports = function(Chart) {
                        }, me);
                },
 
-               bindEvents: function bindEvents() {
+               bindEvents: function() {
                        var me = this;
                        helpers.bindEvents(me, me.options.events, function(evt) {
                                me.eventHandler(evt);
index 7ef414f7ddf335de060a7d9b1b84d98fcd20c13a..e9cda32a6b73495972403d0cf90b0bf01f8d0424 100644 (file)
@@ -105,7 +105,7 @@ module.exports = function(Chart) {
                        me.updateElement(element, index, true);
                },
 
-               buildOrUpdateElements: function buildOrUpdateElements() {
+               buildOrUpdateElements: function() {
                        // Handle the number of data points changing
                        var meta = this.getMeta(),
                                md = meta.data,
index 698d2fb5bc4f4056e6398b6dca894f548498f875..183630f8fc417c05806be76e037e235917f65ae4 100644 (file)
@@ -390,7 +390,7 @@ module.exports = function(Chart) {
                },
 
                // Get the correct value. NaN bad inputs, If the value type is object get the x or y based on whether we are horizontal or not
-               getRightValue: function getRightValue(rawValue) {
+               getRightValue: function(rawValue) {
                        // Null and undefined values first
                        if (rawValue === null || typeof(rawValue) === 'undefined') {
                                return NaN;
@@ -404,7 +404,7 @@ module.exports = function(Chart) {
                                if ((rawValue instanceof Date) || (rawValue.isValid)) {
                                        return rawValue;
                                } else {
-                                       return getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y);
+                                       return this.getRightValue(this.isHorizontal() ? rawValue.x : rawValue.y);
                                }
                        }
 
index bff3f2962fd0a7dad0856834597207b809008897..77575b6797f5c96bc7df877ed68f3eb22e943dea 100755 (executable)
@@ -328,7 +328,7 @@ module.exports = function(Chart) {
 
                        return me;
                },
-               getTooltipSize: function getTooltipSize(vm) {
+               getTooltipSize: function(vm) {
                        var ctx = this._chart.ctx;
 
                        var size = {
@@ -391,7 +391,7 @@ module.exports = function(Chart) {
 
                        return size;
                },
-               determineAlignment: function determineAlignment(size) {
+               determineAlignment: function(size) {
                        var me = this;
                        var model = me._model;
                        var chart = me._chart;
@@ -453,7 +453,7 @@ module.exports = function(Chart) {
                                }
                        }
                },
-               getBackgroundPoint: function getBackgroundPoint(vm, size) {
+               getBackgroundPoint: function(vm, size) {
                        // Background Position
                        var pt = {
                                x: vm.x,
@@ -498,7 +498,7 @@ module.exports = function(Chart) {
 
                        return pt;
                },
-               drawCaret: function drawCaret(tooltipPoint, size, opacity) {
+               drawCaret: function(tooltipPoint, size, opacity) {
                        var vm = this._view;
                        var ctx = this._chart.ctx;
                        var x1, x2, x3;
@@ -562,7 +562,7 @@ module.exports = function(Chart) {
                        ctx.closePath();
                        ctx.fill();
                },
-               drawTitle: function drawTitle(pt, vm, ctx, opacity) {
+               drawTitle: function(pt, vm, ctx, opacity) {
                        var title = vm.title;
 
                        if (title.length) {
@@ -587,7 +587,7 @@ module.exports = function(Chart) {
                                }
                        }
                },
-               drawBody: function drawBody(pt, vm, ctx, opacity) {
+               drawBody: function(pt, vm, ctx, opacity) {
                        var bodyFontSize = vm.bodyFontSize;
                        var bodySpacing = vm.bodySpacing;
                        var body = vm.body;
@@ -648,7 +648,7 @@ module.exports = function(Chart) {
                        helpers.each(vm.afterBody, fillLineOfText);
                        pt.y -= bodySpacing; // Remove last body spacing
                },
-               drawFooter: function drawFooter(pt, vm, ctx, opacity) {
+               drawFooter: function(pt, vm, ctx, opacity) {
                        var footer = vm.footer;
 
                        if (footer.length) {
@@ -667,7 +667,7 @@ module.exports = function(Chart) {
                                });
                        }
                },
-               draw: function draw() {
+               draw: function() {
                        var ctx = this._chart.ctx;
                        var vm = this._view;
 
index 0adbbf111b5ff2a4b904ae87d1e00f249f58ee7e..8a4fe2709c2a3f7895477c79311f9dd25477cfad 100644 (file)
@@ -309,7 +309,7 @@ module.exports = function(Chart) {
                        return label;
                },
                // Function to format an individual tick mark
-               tickFormatFunction: function tickFormatFunction(tick, index, ticks) {
+               tickFormatFunction: function(tick, index, ticks) {
                        var formattedTick = tick.format(this.displayFormat);
                        var tickOpts = this.options.ticks;
                        var callback = helpers.getValueOrDefault(tickOpts.callback, tickOpts.userCallback);