microting/ngx-charts

View on GitHub

Showing 204 of 204 total issues

File data.ts has 1002 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { data as countries } from 'emoji-flags';
import { 
  SingleSeries, 
  MultiSeries, 
  BubbleChartMultiSeries, 
Severity: Major
Found in demo/data.ts - About 2 days to fix

    File chartTypes.ts has 946 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const chartGroups = [
      {
        name: 'Bar Charts',
        charts: [
          {
    Severity: Major
    Found in demo/chartTypes.ts - About 2 days to fix

      File app.component.ts has 635 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      declare var APP_VERSION: string;
      
      import { Component, OnInit, ViewEncapsulation } from '@angular/core';
      import { Location, LocationStrategy, HashLocationStrategy } from '@angular/common';
      import * as shape from 'd3-shape';
      Severity: Major
      Found in demo/app.component.ts - About 1 day to fix

        Function update has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
        Open

          update(): void {
            this.updateTooltipSettings();
            let width;
        
            if (this.series.length) {
        Severity: Minor
        Found in src/bar-chart/series-vertical.component.ts - About 7 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 combo-chart.component.ts has 479 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
          Component,
          Input,
          ViewEncapsulation,
          Output,
        Severity: Minor
        Found in demo/combo-chart/combo-chart.component.ts - About 7 hrs to fix

          File bar-vertical-2d-stacked.component.ts has 465 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import {
            Component,
            Input,
            Output,
            ViewEncapsulation,
          Severity: Minor
          Found in src/bar-chart/bar-vertical-2d-stacked.component.ts - About 7 hrs to fix

            File line-chart.component.ts has 457 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import {
              Component,
              Input,
              Output,
              EventEmitter,
            Severity: Minor
            Found in src/line-chart/line-chart.component.ts - About 7 hrs to fix

              File area-chart-stacked.component.ts has 449 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import {
                Component,
                Input,
                Output,
                EventEmitter,
              Severity: Minor
              Found in src/area-chart/area-chart-stacked.component.ts - About 6 hrs to fix

                File area-chart.component.ts has 444 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import {
                  Component,
                  Input,
                  Output,
                  EventEmitter,
                Severity: Minor
                Found in src/area-chart/area-chart.component.ts - About 6 hrs to fix

                  File area-chart-normalized.component.ts has 443 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import {
                    Component,
                    Input,
                    Output,
                    EventEmitter,
                  Severity: Minor
                  Found in src/area-chart/area-chart-normalized.component.ts - About 6 hrs to fix

                    Function update has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
                    Open

                      update(): void {
                        this.updateTooltipSettings();
                        const d0 = {
                          [D0Types.positive]: 0,
                          [D0Types.negative]: 0
                    Severity: Minor
                    Found in src/bar-chart/series-horizontal.component.ts - About 6 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 polar-chart.component.ts has 428 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import {
                      Component,
                      Input,
                      Output,
                      EventEmitter,
                    Severity: Minor
                    Found in src/polar-chart/polar-chart.component.ts - About 6 hrs to fix

                      AppComponent has 42 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      @Component({
                        selector: 'app',
                        providers: [Location, { provide: LocationStrategy, useClass: HashLocationStrategy }],
                        encapsulation: ViewEncapsulation.None,
                        styleUrls: ['../node_modules/@swimlane/ngx-ui/index.css', './app.component.scss'],
                      Severity: Minor
                      Found in demo/app.component.ts - About 5 hrs to fix

                        File bubble-chart.component.ts has 363 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import {
                          Component,
                          Input,
                          Output,
                          EventEmitter,
                        Severity: Minor
                        Found in src/bubble-chart/bubble-chart.component.ts - About 4 hrs to fix

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

                            update(): void {
                              this.updateTooltipSettings();
                              let width;
                          
                              if (this.series.length) {
                          Severity: Major
                          Found in src/bar-chart/series-vertical.component.ts - About 4 hrs to fix

                            File bubble-chart-interactive.component.ts has 354 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import {
                              Component,
                              Input,
                              Output,
                              EventEmitter,
                            Severity: Minor
                            Found in demo/bubble-chart-interactive/bubble-chart-interactive.component.ts - About 4 hrs to fix

                              File bar-horizontal-2d.component.ts has 350 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import {
                                Component,
                                Input,
                                ViewEncapsulation,
                                Output,
                              Severity: Minor
                              Found in src/bar-chart/bar-horizontal-2d.component.ts - About 4 hrs to fix

                                File bar-vertical-2d.component.ts has 343 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import {
                                  Component,
                                  Input,
                                  Output,
                                  ViewEncapsulation,
                                Severity: Minor
                                Found in src/bar-chart/bar-vertical-2d.component.ts - About 4 hrs to fix

                                  File bar-horizontal-stacked.component.ts has 341 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import {
                                    Component,
                                    Input,
                                    Output,
                                    EventEmitter,
                                  Severity: Minor
                                  Found in src/bar-chart/bar-horizontal-stacked.component.ts - About 4 hrs to fix

                                    Function update has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      update(): void {
                                        this.updateTooltipSettings();
                                        const d0 = {
                                          [D0Types.positive]: 0,
                                          [D0Types.negative]: 0
                                    Severity: Major
                                    Found in src/bar-chart/series-horizontal.component.ts - About 4 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language