TargetProcess/tauCharts

View on GitHub

Showing 269 of 3,565 total issues

File layer-labels.ts has 434 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import * as utilsDraw from '../../utils/utils-draw';
import * as utilsDom from '../../utils/utils-dom';
import * as utils from '../../utils/utils';
import {LayerLabelsModel} from './layer-labels-model';
import {LayerLabelsRules} from './layer-labels-rules';
Severity: Minor
Found in src/elements/decorators/layer-labels.ts - About 6 hrs to fix

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

        draw(fibers: any[][]) {
    
            var self = this;
    
            var model = this.model;
    Severity: Major
    Found in src/elements/decorators/layer-labels.ts - About 6 hrs to fix

      Function deepClone has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      var deepClone = (function () {
      
          // clone objects, skip other types.
          function clone(target) {
              if (typeof target == 'object') {
      Severity: Minor
      Found in src/utils/utils.ts - About 5 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function transform has 139 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          transform(chart: Plot) {
      
              var specRef = this.spec;
      
              if (!this.isApplicable) {
      Severity: Major
      Found in src/spec-transform-calc-size.ts - About 5 hrs to fix

        File element.path.base.js has 396 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {LayerLabels} from './decorators/layer-labels';
        import {CSS_PREFIX} from '../const';
        import {
            d3_animationInterceptor,
            d3_setAttrs as attrs,
        Severity: Minor
        Found in src/elements/element.path.base.js - About 5 hrs to fix

          Function deepClone has 136 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var deepClone = (function () {
          
              // clone objects, skip other types.
              function clone(target) {
                  if (typeof target == 'object') {
          Severity: Major
          Found in src/utils/utils.ts - About 5 hrs to fix

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

                draw() {
                    const node = this.node();
                    const config = node.config;
                    const guide = config.guide;
                    const options = config.options;
            Severity: Major
            Found in src/elements/element.path.base.js - About 5 hrs to fix

              Function calcXYGuide has 124 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function calcXYGuide(
                  guide: UnitGuide,
                  settings: ChartSettings,
                  xMeta,
                  yMeta,
              Severity: Major
              Found in src/spec-transform-auto-layout.ts - About 4 hrs to fix

                Function scalesPool has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    scalesPool(scaleType: string, dimName: string, guide: ScaleGuide, settings: ChartSettings) {
                
                        var k = `${scaleType}_${dimName}`;
                
                        if (this.dist.scales.hasOwnProperty(k)) {
                Severity: Major
                Found in src/spec-converter.ts - About 4 hrs to fix

                  Function _pickPlace has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                  Open

                      _pickPlace(target) {
                          if (!this.options.auto) {
                              return this.options.place;
                          }
                          const winBound = 0 | this.options.winBound;
                  Severity: Minor
                  Found in src/api/balloon.js - About 4 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

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

                      draw() {
                          const node = this.node();
                          const config = node.config;
                          const options = config.options;
                          // TODO: hide it somewhere
                  Severity: Major
                  Found in src/elements/element.interval.js - About 4 hrs to fix

                    Function _getBoundsInfo has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _getBoundsInfo(this: GrammarElement, dots: Element[]) {
                            if (dots.length === 0) {
                                return null;
                            }
                    
                    
                    Severity: Major
                    Found in src/elements/element.area.ts - About 4 hrs to fix

                      File spec-transform-calc-size.ts has 356 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import * as utils from './utils/utils';
                      import {SpecTransformOptimize} from './spec-transform-optimize';
                      import {DataFrame} from './data-frame';
                      import {
                          ChartSettings,
                      Severity: Minor
                      Found in src/spec-transform-calc-size.ts - About 4 hrs to fix

                        File d3-decorators.js has 351 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import * as utils from './utils';
                        import * as utilsDom from './utils-dom';
                        import * as utilsDraw from './utils-draw';
                        import * as d3Selection from 'd3-selection';
                        import * as d3Transition from 'd3-transition';
                        Severity: Minor
                        Found in src/utils/d3-decorators.js - About 4 hrs to fix

                          Function draw has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                          Open

                              draw(fibers: any[][]) {
                          
                                  var self = this;
                          
                                  var model = this.model;
                          Severity: Minor
                          Found in src/elements/decorators/layer-labels.ts - About 4 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          File element.point.ts has 341 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import {CSS_PREFIX} from '../const';
                          import {GrammarRegistry} from '../grammar-registry';
                          import {LayerLabels} from './decorators/layer-labels';
                          import * as utils from '../utils/utils';
                          import * as utilsDom from '../utils/utils-dom';
                          Severity: Minor
                          Found in src/elements/element.point.ts - About 4 hrs to fix

                            File utils-dom.ts has 338 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /**
                             * Internal method to return CSS value for given element and property
                             */
                            import * as d3 from 'd3-selection';
                            var tempDiv = document.createElement('div');
                            Severity: Minor
                            Found in src/utils/utils-dom.ts - About 4 hrs to fix

                              File element.area.ts has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import * as d3Color from 'd3-color';
                              import * as d3Selection from 'd3-selection';
                              const d3 = {
                                  ...d3Color,
                                  ...d3Selection,
                              Severity: Minor
                              Found in src/elements/element.area.ts - About 4 hrs to fix

                                Function getCubicInterpolator has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function getCubicInterpolator(pointsFrom: XPoint[], pointsTo: XPoint[]) {
                                
                                    for (var i = 2; i < pointsFrom.length - 1; i += 3) {
                                        pointsFrom[i - 1].isCubicControl = true;
                                        pointsFrom[i].isCubicControl = true;
                                Severity: Major
                                Found in src/utils/path/interpolators/path-points.ts - About 4 hrs to fix

                                  File spec-converter.ts has 335 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import * as utils from './utils/utils';
                                  import {UnitDomainPeriodGenerator} from './unit-domain-period-generator';
                                  import {
                                      ChartConfig,
                                      ChartSettings,
                                  Severity: Minor
                                  Found in src/spec-converter.ts - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language