leighquince/Chart.js

View on GitHub

Showing 84 of 98 total issues

File Chart.js has 3545 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 1.0.2
 *
Severity: Major
Found in Chart.js - About 1 wk to fix

    File Chart.Core.js has 1801 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * Chart.js
     * http://chartjs.org/
     * Version: {{ version }}
     *
    Severity: Major
    Found in src/Chart.Core.js - About 4 days to fix

      File Chart.Overlay.js has 463 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      (function() {
          "use strict";
      
          var root = this,
              Chart = root.Chart,
      Severity: Minor
      Found in src/Chart.Overlay.js - About 7 hrs to fix

        Function initialize has 140 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                initialize: function(data) {
                    //Expose options as a scope variable here so we can access it in the ScaleClass
                    var options = this.options;
                    //two new varibale to hold the different graph types
                    this.barDatasets = [];
        Severity: Major
        Found in Chart.js - About 5 hrs to fix

          Function initialize has 140 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  initialize: function(data) {
                      //Expose options as a scope variable here so we can access it in the ScaleClass
                      var options = this.options;
                      //two new varibale to hold the different graph types
                      this.barDatasets = [];
          Severity: Major
          Found in src/Chart.Overlay.js - About 5 hrs to fix

            Function showTooltip has 131 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    showTooltip: function(ChartElements, forceRedraw) {
                        // Only redraw the chart if we've actually changed what we're hovering on.
                        if (typeof this.activeElements === 'undefined') this.activeElements = [];
                        var isChanged = (function(Elements) {
                            var changed = false;
            Severity: Major
            Found in src/Chart.Overlay.js - About 5 hrs to fix

              Function showTooltip has 131 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      showTooltip: function(ChartElements, forceRedraw) {
                          // Only redraw the chart if we've actually changed what we're hovering on.
                          if (typeof this.activeElements === 'undefined') this.activeElements = [];
                          var isChanged = (function(Elements) {
                              var changed = false;
              Severity: Major
              Found in Chart.js - About 5 hrs to fix

                File Chart.Line.js has 379 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                (function() {
                    "use strict";
                
                    var root = this,
                        Chart = root.Chart,
                Severity: Minor
                Found in src/Chart.Line.js - About 5 hrs to fix

                  Function showTooltip has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              showTooltip: function(ChartElements, forceRedraw) {
                                  // Only redraw the chart if we've actually changed what we're hovering on.
                                  if (typeof this.activeElements === 'undefined') this.activeElements = [];
                  
                                  var isChanged = (function(Elements) {
                  Severity: Major
                  Found in src/Chart.Core.js - About 4 hrs to fix

                    Function showTooltip has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                showTooltip: function(ChartElements, forceRedraw) {
                                    // Only redraw the chart if we've actually changed what we're hovering on.
                                    if (typeof this.activeElements === 'undefined') this.activeElements = [];
                    
                                    var isChanged = (function(Elements) {
                    Severity: Major
                    Found in Chart.js - About 4 hrs to fix

                      Function drawDatasets has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              drawDatasets: function(datasets, easingDecimal) {
                                  var ctx = this.chart.ctx;
                      
                                  // Some helper methods for getting the next/prev points
                                  var hasValue = function(item) {
                      Severity: Major
                      Found in Chart.js - About 3 hrs to fix

                        Function drawDatasets has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                drawDatasets: function(datasets, easingDecimal) {
                                    var ctx = this.chart.ctx;
                        
                                    // Some helper methods for getting the next/prev points
                                    var hasValue = function(item) {
                        Severity: Major
                        Found in src/Chart.Line.js - About 3 hrs to fix

                          File Chart.Bar.js has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          (function() {
                              "use strict";
                          
                              var root = this,
                                  Chart = root.Chart,
                          Severity: Minor
                          Found in src/Chart.Bar.js - About 3 hrs to fix

                            Function initialize has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    initialize: function(data) {
                                        //Expose options as a scope variable here so we can access it in the ScaleClass
                                        var options = this.options;
                                        this.ScaleClass = Chart.Scale.extend({
                                            offsetGridLines: true,
                            Severity: Major
                            Found in src/Chart.Bar.js - About 3 hrs to fix

                              Function initialize has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      initialize: function(data) {
                                          //Expose options as a scope variable here so we can access it in the ScaleClass
                                          var options = this.options;
                                          this.ScaleClass = Chart.Scale.extend({
                                              offsetGridLines: true,
                              Severity: Major
                              Found in Chart.js - About 3 hrs to fix

                                Function draw has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            draw: function() {
                                                if (this.display) {
                                                    var ctx = this.ctx;
                                                    each(this.yLabels, function(label, index) {
                                                        // Don't draw a centre value
                                Severity: Major
                                Found in src/Chart.Core.js - About 3 hrs to fix

                                  Function draw has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              draw: function() {
                                                  if (this.display) {
                                                      var ctx = this.ctx;
                                                      each(this.yLabels, function(label, index) {
                                                          // Don't draw a centre value
                                  Severity: Major
                                  Found in Chart.js - About 3 hrs to fix

                                    Function initialize has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            initialize: function(data) {
                                                //Declare the extension of the default point, to cater for the options passed in to the constructor
                                                this.PointClass = Chart.Point.extend({
                                                    strokeWidth: this.options.pointDotStrokeWidth,
                                                    radius: this.options.pointDotRadius,
                                    Severity: Major
                                    Found in Chart.js - About 3 hrs to fix

                                      Function initialize has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              initialize: function(data) {
                                                  //Declare the extension of the default point, to cater for the options passed in to the constructor
                                                  this.PointClass = Chart.Point.extend({
                                                      strokeWidth: this.options.pointDotStrokeWidth,
                                                      radius: this.options.pointDotRadius,
                                      Severity: Major
                                      Found in src/Chart.Line.js - About 3 hrs to fix

                                        Function setUpYAxes has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    setUpYAxes: function() {
                                                        var defaultConfig = {
                                                            positionLeft: this.positionLeft,
                                                            fontSize: this.fontSize,
                                                            beginAtZero: this.beginAtZero,
                                        Severity: Major
                                        Found in src/Chart.Core.js - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language