fossasia/loklak_webclient

View on GitHub
app/js/components/ng-google-chart.js

Summary

Maintainability
F
3 days
Test Coverage

Function googleChartDirective has 149 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function googleChartDirective($timeout, $window, $rootScope, googleChartApiPromise) {

        GoogleChartController.$inject = ['$scope', '$element', '$attrs', '$injector', 'FormatManager'];

        function GoogleChartController($scope, $element, $attrs, $injector, FormatManager){
Severity: Major
Found in app/js/components/ng-google-chart.js - About 5 hrs to fix

    Function GoogleChartController has 141 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function GoogleChartController($scope, $element, $attrs, $injector, FormatManager){
                var self = this;
                var resizeHandler, wrapperListeners = {}, formatManager,
                    chartListeners = {}, innerVisualization = null;
                self.registerChartListener = registerChartListener;
    Severity: Major
    Found in app/js/components/ng-google-chart.js - About 5 hrs to fix

      File ng-google-chart.js has 391 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! angular-google-chart 2015-06-16 */
      /*
      * @description Google Chart Api Directive Module for AngularJS
      * @version 0.0.11
      * @author Nicolas Bouillon <nicolas@bouil.org>
      Severity: Minor
      Found in app/js/components/ng-google-chart.js - About 5 hrs to fix

        Function formatManagerFactory has 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function formatManagerFactory(){
                    // Handles the processing of Google Charts API Formats
                    function FormatManager(){
                        var self = this;
                        var oldFormatTemplates = {};
        Severity: Major
        Found in app/js/components/ng-google-chart.js - About 3 hrs to fix

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

                      function FormatManager(){
                          var self = this;
                          var oldFormatTemplates = {};
                          self.iFormats = {}; // Holds instances of formats (ie. self.iFormats.date[0] = new google.visualization.DateFormat(params))
                          self.applyFormats = applyFormats;
          Severity: Major
          Found in app/js/components/ng-google-chart.js - About 3 hrs to fix

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

                function googleChartApiPromiseFactory($rootScope, $q, apiConfig, googleJsapiUrl) {
                    var apiReady = $q.defer();
                    var onLoad = function () {
                        // override callback function
                        var settings = {
            Severity: Minor
            Found in app/js/components/ng-google-chart.js - About 1 hr to fix

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

                      function GoogleChartController($scope, $element, $attrs, $injector, FormatManager){
              Severity: Minor
              Found in app/js/components/ng-google-chart.js - About 35 mins to fix

                There are no issues that match your filters.

                Category
                Status