swimlane/ngx-charts

View on GitHub

Showing 208 of 208 total issues

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

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

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

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

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

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

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

        import {
          Component,
          Input,
          Output,
          EventEmitter,

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

          import {
            Component,
            Input,
            Output,
            EventEmitter,

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

            import {
              Component,
              Input,
              Output,
              EventEmitter,

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

              import {
                Component,
                Input,
                Output,
                EventEmitter,

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

                import {
                  Component,
                  Input,
                  Output,
                  EventEmitter,

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

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

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

                    import {
                      Component,
                      Input,
                      Output,
                      EventEmitter,

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

                      import {
                        Component,
                        Input,
                        Output,
                        EventEmitter,

                        Function updateData has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          updateData() {
                            if (!this.realTimeData) {
                              return;
                            }
                        
                        
                        Severity: Major
                        Found in src/app/app.component.ts - About 5 hrs to fix

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

                          import {
                            Component,
                            Input,
                            ViewEncapsulation,
                            Output,

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

                            import {
                              Component,
                              Input,
                              Output,
                              ViewEncapsulation,

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

                              import {
                                Component,
                                Input,
                                Output,
                                EventEmitter,

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

                                import {
                                  Component,
                                  Input,
                                  Output,
                                  EventEmitter,

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

                                    update(): void {
                                      this.updateTooltipSettings();
                                      let width;
                                      if (this.series.length) {
                                        width = this.xScale.bandwidth();

                                  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 355 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import {
                                    Component,
                                    Input,
                                    ViewEncapsulation,
                                    Output,
                                  Severity: Minor
                                  Found in src/app/custom-charts/combo-chart/combo-chart.component.ts - About 4 hrs to fix

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

                                      update(): void {
                                        this.updateTooltipSettings();
                                        const d0 = {
                                          [D0Types.positive]: 0,
                                          [D0Types.negative]: 0

                                    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 update has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      update(): void {
                                        this.updateTooltipSettings();
                                        let width;
                                        if (this.series.length) {
                                          width = this.xScale.bandwidth();
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language