Showing 208 of 208 total issues
File box.component.ts
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
File circle-series.component.ts
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
Function update
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
Function getYValues
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
getYValues(): any[] {
const domain = [];
for (const results of this.results) {
for (const d of results.series) {
- Read upRead up
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 bar-vertical.component.ts
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
ViewEncapsulation,
Output,
Function updateData
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
updateData() {
if (!this.realTimeData) {
return;
}
- Read upRead up
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 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
File bar-horizontal.component.ts
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
File color-sets.ts
has 263 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ScaleType } from '../common/types/scale-type.enum';
export interface Color {
name: string;
selectable: boolean;
Function getLinearGradientStops
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinearGradientStops(value: number | string, start?: number | string): Gradient[] {
if (start === undefined) {
start = this.domain[0];
}
const valueScale = scaleLinear()
File series-horizontal.component.ts
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
PolarChartComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'ngx-charts-polar-chart',
template: `
<ngx-charts-chart
[view]="[width, height]"
File timeline-filter-bar-chart.component.ts
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { scaleBand, scaleLinear, scaleTime } from 'd3-scale';
import { brushX } from 'd3-brush';
import { select } from 'd3-selection';
import {
Function getXDomain
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getXDomain(): any[] {
let values = getUniqueXDomainValues(this.results);
this.scaleType = getScaleType(values);
let domain = [];
- Read upRead up
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 getXDomain
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getXDomain(): any[] {
let values = getUniqueXDomainValues(this.results);
this.scaleType = getScaleType(values);
let domain = [];
- Read upRead up
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 getXDomain
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getXDomain(): any[] {
let values = getUniqueXDomainValues(this.results);
this.scaleType = getScaleType(values);
let domain = [];
- Read upRead up
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 getValues
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getValues(xVal): Tooltip[] {
const results = [];
for (const group of this.results) {
const item = group.series.find(d => d.name.toString() === xVal.toString());
- Read upRead up
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 getToolTipText
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getToolTipText(tooltipItem: Tooltip): string {
let result: string = '';
if (tooltipItem.series !== undefined) {
result += tooltipItem.series;
} else {
- Read upRead up
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 cloneData
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private cloneData(data): any {
const results = [];
for (const item of data) {
const copy = {};
- Read upRead up
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 mapDataPointToCircle
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
mapDataPointToCircle(d: any, i: number): Circle {
const seriesName = this.data.name as string;
const value = d.value;
const label = d.name;