jtblin/angular-chart.js

View on GitHub

Showing 7 of 29 total issues

File bubble.js has 784 lines of code (exceeds 250 allowed). Consider refactoring.
Open

angular.module('app', ['chart.js'])
  .config(['ChartJsProvider', function (ChartJsProvider) {
    'use strict';
    ChartJsProvider.setOptions({
      tooltips: { enabled: false }
Severity: Major
Found in test/fixtures/bubble.js - About 1 day to fix

    Function ChartJsFactory has 239 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function ChartJsFactory (ChartJs, $timeout) {
        return function chart (type) {
          return {
            restrict: 'CA',
            scope: {
    Severity: Major
    Found in angular-chart.js - About 1 day to fix

      File test.unit.js has 361 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*jshint mocha:true*/
      /*global module:true*/
      /*global inject:true*/
      /*global expect:true*/
      /*global sinon:true*/
      Severity: Minor
      Found in test/test.unit.js - About 4 hrs to fix

        File angular-chart.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        (function (factory) {
          'use strict';
          if (typeof exports === 'object') {
            // Node/CommonJS
            module.exports = factory(
        Severity: Minor
        Found in angular-chart.js - About 3 hrs to fix

          Function chart has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              return function chart (type) {
                return {
                  restrict: 'CA',
                  scope: {
                    chartGetColor: '=?',
          Severity: Major
          Found in angular-chart.js - About 2 hrs to fix

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

                    link: function (scope, elem/*, attrs */) {
                      if (useExcanvas) window.G_vmlCanvasManager.initElement(elem[0]);
            
                      // Order of setting "watch" matter
                      scope.$watch('chartData', watchData, true);
            Severity: Minor
            Found in angular-chart.js - About 1 hr to fix

              Function getDataSets has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function getDataSets (labels, data, series, colors, datasetOverride) {
              Severity: Minor
              Found in angular-chart.js - About 35 mins to fix
                Severity
                Category
                Status
                Source
                Language