leighquince/Chart.js

View on GitHub

Showing 84 of 98 total issues

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

            draw: function() {
                var ctx = this.ctx;
                if (this.display) {
                    this.yAxes.draw();

Severity: Minor
Found in src/Chart.Core.js - About 1 hr to fix

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

                draw: function() {
                    var ctx = this.ctx;
                    if (this.display) {
                        this.yAxes.draw();
    
    
    Severity: Minor
    Found in Chart.js - About 1 hr to fix

      Function buildScale has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              buildScale: function(labels) {
                  var self = this;
      
                  var dataTotal = function() {
                      var values = [];
      Severity: Minor
      Found in Chart.js - About 1 hr to fix

        Function buildScale has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                buildScale: function(labels) {
                    var self = this;
        
                    var dataTotal = function() {
                        var values = [];
        Severity: Minor
        Found in src/Chart.Bar.js - About 1 hr to fix

          Function medianPosition has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                                  medianPosition = (function(index) {
          
                                      // Get all the points at that particular index
                                      var Elements = [],
                                          dataCollection,
          Severity: Minor
          Found in src/Chart.Overlay.js - About 1 hr to fix

            Function medianPosition has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                    medianPosition = (function(index) {
            
                                        // Get all the points at that particular index
                                        var Elements = [],
                                            dataCollection,
            Severity: Minor
            Found in Chart.js - About 1 hr to fix

              Function addData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      addData: function(valuesArray, label) {
                          //Map the values array for each of the datasets
              
                          var lineDataSetIndex = 0;
                          var barDataSetIndex = 0;
              Severity: Minor
              Found in src/Chart.Overlay.js - About 1 hr to fix

                Function addData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        addData: function(valuesArray, label) {
                            //Map the values array for each of the datasets
                
                            var lineDataSetIndex = 0;
                            var barDataSetIndex = 0;
                Severity: Minor
                Found in Chart.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                                      if (this.datasets && this.datasets.length > 1) {
                                          var dataArray,
                                              dataIndex;
                  
                                          for (var i = this.datasets.length - 1; i >= 0; i--) {
                  Severity: Critical
                  Found in Chart.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                                        if (this.datasets && this.datasets.length > 1) {
                                            var dataArray,
                                                dataIndex;
                    
                                            for (var i = this.datasets.length - 1; i >= 0; i--) {
                    Severity: Critical
                    Found in src/Chart.Core.js - About 1 hr to fix

                      Function updateScaleRange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              updateScaleRange: function(datasets){
                                  var valuesArray = (function(){
                                      var totalDataArray = [];
                                      helpers.each(datasets,function(dataset){
                                          if (dataset.data){
                      Severity: Minor
                      Found in Chart.js - About 1 hr to fix

                        Function updateScaleRange has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                updateScaleRange: function(datasets){
                                    var valuesArray = (function(){
                                        var totalDataArray = [];
                                        helpers.each(datasets,function(dataset){
                                            if (dataset.data){
                        Severity: Minor
                        Found in src/Chart.Radar.js - About 1 hr to fix

                          Function buildScale has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  buildScale : function(data){
                                      this.scale = new Chart.RadialScale({
                                          display: this.options.showScale,
                                          fontStyle: this.options.scaleFontStyle,
                                          fontSize: this.options.scaleFontSize,
                          Severity: Minor
                          Found in src/Chart.Radar.js - About 1 hr to fix

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

                                        setUpYAxes: function() {
                                            this.yAxes = new Chart.YAxes({
                                                datasets: this.datasets,
                                                templateString: this.templateString,
                                                height: this.height,
                            Severity: Minor
                            Found in Chart.js - About 1 hr to fix

                              Function medianPosition has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                                          medianPosition = (function(index) {
                              
                                                              // Get all the points at that particular index
                                                              var Elements = [],
                                                                  dataCollection,
                              Severity: Minor
                              Found in src/Chart.Core.js - About 1 hr to fix

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

                                        draw : function(ease){
                                            var easeDecimal = ease || 1,
                                                ctx = this.chart.ctx;
                                            this.clear();
                                            this.scale.draw();
                                Severity: Minor
                                Found in src/Chart.Radar.js - About 1 hr to fix

                                  Function medianPosition has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                              medianPosition = (function(index) {
                                  
                                                                  // Get all the points at that particular index
                                                                  var Elements = [],
                                                                      dataCollection,
                                  Severity: Minor
                                  Found in Chart.js - About 1 hr to fix

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

                                            draw : function(ease){
                                                var easeDecimal = ease || 1,
                                                    ctx = this.chart.ctx;
                                                this.clear();
                                                this.scale.draw();
                                    Severity: Minor
                                    Found in Chart.js - About 1 hr to fix

                                      Function buildScale has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              buildScale : function(data){
                                                  this.scale = new Chart.RadialScale({
                                                      display: this.options.showScale,
                                                      fontStyle: this.options.scaleFontStyle,
                                                      fontSize: this.options.scaleFontSize,
                                      Severity: Minor
                                      Found in Chart.js - About 1 hr to fix

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

                                                    setUpYAxes: function() {
                                                        this.yAxes = new Chart.YAxes({
                                                            datasets: this.datasets,
                                                            templateString: this.templateString,
                                                            height: this.height,
                                        Severity: Minor
                                        Found in src/Chart.Core.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language