Showing 208 of 208 total issues
Function getYDomainLine
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getYDomainLine(): any[] {
const domain = [];
for (const results of this.lineChart) {
for (const d of results.series) {
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Function update
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
if (this.valueFormatting) {
this.formatedValue = this.valueFormatting(this.value);
} else {
this.formatedValue = formatLabel(this.value);
Function getYDomain
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getYDomain(): [number, number] {
const domain = [];
for (const results of this.results) {
for (const d of results.series) {
if (domain.indexOf(d.value) < 0) {
Function getYDomain
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getYDomain(): any[] {
if (this.valueDomain) {
return this.valueDomain;
}
Function getCards
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
getCards(): CardModel[] {
const yPadding =
typeof this.innerPadding === 'number' ? this.innerPadding : this.innerPadding[0] + this.innerPadding[2];
const xPadding =
typeof this.innerPadding === 'number' ? this.innerPadding : this.innerPadding[1] + this.innerPadding[3];
Function loadAnimation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadAnimation(): void {
const node = select(this.element)
.selectAll('.arc')
.data([{ startAngle: this.startAngle, endAngle: this.endAngle }]);
Function calculateLabelPositions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculateLabelPositions(pieData): any {
const factor = 1.5;
const minDistance = 10;
const labelPositions = pieData;
Function setDims
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
setDims() {
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
margins: this.margin,
Function update
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
if (this.results) {
this.results = this.cloneData(this.results);
} else {
this.results = [];
Function getCalendarData
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getCalendarData(): any[] {
// today
const now = new Date();
const todaysDay = now.getDate();
const thisDay = new Date(now.getFullYear(), now.getMonth(), todaysDay);
- 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 getStartingPath
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getStartingPath(): string {
if (!this.animations) {
return this.getPath();
}
- 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 getXDomainLine
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getXDomainLine(): any[] {
let values = [];
for (const results of this.lineChart) {
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
Function getBubblePadding
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getBubblePadding(): number[] {
let yMin = 0;
let xMin = 0;
let yMax = this.dims.height;
let xMax = this.dims.width;
- 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 getBubblePadding
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getBubblePadding() {
let yMin = 0;
let xMin = 0;
let yMax = this.dims.height;
let xMax = this.dims.width;
- 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 9 (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 9 (exceeds 5 allowed). Consider refactoring. Open
getXDomain(): any[] {
let values = [];
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
Function mapDataPointToCircle
has a Cognitive Complexity of 9 (exceeds 5 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;
- 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 a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
if (this.results) {
this.results = this.cloneData(this.results);
} else {
this.results = [];
- 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 hideTooltip
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
hideTooltip(immediate: boolean = false): void {
if (!this.component) return;
const destroyFn = () => {
// remove events
- 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"