leighquince/Chart.js

View on GitHub

Showing 84 of 98 total issues

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 Chart.js - About 3 hrs to fix

    Function calculateScaleRange has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                calculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly) {
                    if(valuesArray.length > 0)
                    {
                    //Set a minimum step of two - a point at the top of the graph, and a point at the base
                    var minSteps = 2,
    Severity: Major
    Found in Chart.js - About 2 hrs to fix

      Function calculateScaleRange has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  calculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly) {
                      if(valuesArray.length > 0)
                      {
                      //Set a minimum step of two - a point at the top of the graph, and a point at the base
                      var minSteps = 2,
      Severity: Major
      Found in src/Chart.Core.js - About 2 hrs to fix

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

                    draw: function(labelOffset, leftLabelsWidth, rightLabelsWidth, isMain) {
                        var ctx = this.ctx,
                            yLabelGap = (this.endPoint - this.startPoint) / this.steps,
                            xStart = Math.round(leftLabelsWidth),
                            xEnd = Math.round(this.width - rightLabelsWidth),
        Severity: Major
        Found in src/Chart.Core.js - About 2 hrs to fix

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

                      draw: function(labelOffset, leftLabelsWidth, rightLabelsWidth, isMain) {
                          var ctx = this.ctx,
                              yLabelGap = (this.endPoint - this.startPoint) / this.steps,
                              xStart = Math.round(leftLabelsWidth),
                              xEnd = Math.round(this.width - rightLabelsWidth),
          Severity: Major
          Found in Chart.js - About 2 hrs to fix

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

                    drawDatasets: function(datasets, easingDecimal) {
                        if (this.options.overlayBars && datasets[0]) {
            
                            //go through each data set and sort in order of value size
                            for (var index = 0; index < datasets[0].bars.length; index++) {
            Severity: Major
            Found in Chart.js - About 2 hrs to fix

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

                      drawDatasets: function(datasets, easingDecimal) {
                          if (this.options.overlayBars && datasets[0]) {
              
                              //go through each data set and sort in order of value size
                              for (var index = 0; index < datasets[0].bars.length; index++) {
              Severity: Major
              Found in src/Chart.Bar.js - About 2 hrs to fix

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

                            draw: function() {
                
                                var ctx = this.chart.ctx;
                
                                ctx.font = fontString(this.fontSize, this.fontStyle, this.fontFamily);
                Severity: Major
                Found in src/Chart.Core.js - About 2 hrs to fix

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

                              draw: function() {
                  
                                  var ctx = this.chart.ctx;
                  
                                  ctx.font = fontString(this.fontSize, this.fontStyle, this.fontFamily);
                  Severity: Major
                  Found in Chart.js - About 2 hrs to fix

                    Function setScaleSize has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                setScaleSize: function() {
                                    /*
                                     * Right, this is really confusing and there is a lot of maths going on here
                                     * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
                                     *
                    Severity: Major
                    Found in Chart.js - About 2 hrs to fix

                      Function setScaleSize has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  setScaleSize: function() {
                                      /*
                                       * Right, this is really confusing and there is a lot of maths going on here
                                       * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
                                       *
                      Severity: Major
                      Found in src/Chart.Core.js - About 2 hrs to fix

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

                                initialize: function(data){
                                    this.PointClass = Chart.Point.extend({
                                        strokeWidth : this.options.pointDotStrokeWidth,
                                        radius : this.options.pointDotRadius,
                                        display: this.options.pointDot,
                        Severity: Major
                        Found in Chart.js - About 2 hrs to fix

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

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

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

                                    initialize: function(data){
                                        this.PointClass = Chart.Point.extend({
                                            strokeWidth : this.options.pointDotStrokeWidth,
                                            radius : this.options.pointDotRadius,
                                            display: this.options.pointDot,
                            Severity: Major
                            Found in src/Chart.Radar.js - About 2 hrs to fix

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

                                      buildScale: function(labels) {
                                          var self = this;
                              
                                          var dataTotal = function() {
                                              var values = [];
                              Severity: Major
                              Found in src/Chart.Overlay.js - About 2 hrs to fix

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

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

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

                                          initialize:  function(data){
                                              this.segments = [];
                                              //Declare segment class as a chart instance specific class, so it can share props for this instance
                                              this.SegmentArc = Chart.Arc.extend({
                                                  showStroke : this.options.segmentShowStroke,
                                  Severity: Minor
                                  Found in Chart.js - About 2 hrs to fix

                                    Function buildScale has 50 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.Line.js - About 2 hrs to fix

                                      Function buildScale has 50 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 2 hrs to fix

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

                                                initialize:  function(data){
                                                    this.segments = [];
                                                    //Declare segment class as a chart instance specific class, so it can share props for this instance
                                                    this.SegmentArc = Chart.Arc.extend({
                                                        showStroke : this.options.segmentShowStroke,
                                        Severity: Minor
                                        Found in src/Chart.PolarArea.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language