Showing 204 of 204 total issues
Function getTooltipText
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getTooltipText(circle): string {
const hasRadius = typeof circle.r !== 'undefined';
const hasTooltipLabel = circle.tooltipLabel && circle.tooltipLabel.length;
const hasSeriesName = circle.seriesName && circle.seriesName.length;
- 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
Consider simplifying this complex logical expression. Open
if (this.data.length > 2) {
const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());
const sortedLengths = this.data
.map(d => {
Function count
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function count(countFrom, countTo, countDecimals, countDuration, callback) {
Function getDomain
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function getDomain(values, scaleType, autoScale, minVal?, maxVal?): number[] {
Function getScaleType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getScaleType(values): string {
let date = true;
let num = true;
for (const value of values) {
if (!this.isDate(value)) {
- 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 onMouseLeave
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@HostListener('mouseleave', ['$event.target'])
onMouseLeave(target): void {
if(this.listensForHover && this.tooltipCloseOnMouseLeave) {
clearTimeout(this.timeout);
- 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 getValueDomain
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getValueDomain() {
const domain = [];
for (const group of this.results) {
for (const d of group.series) {
if (!domain.includes(d.value)) {
- 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 getValueDomain
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getValueDomain() {
const domain = [];
for (const group of this.results) {
for (const d of group.series) {
if (!domain.includes(d.value)) {
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
super.update();
if (!this.showAxis) {
if (!this.margin) {
- 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 getValueDomain
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getValueDomain(): any[] {
const domain = [];
for (const group of this.results) {
for (const d of group.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 update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
this.updateGradients();
const data = this.sortData(this.data.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 findClosestPointIndex
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
findClosestPointIndex(xPos) {
let minIndex = 0;
let maxIndex = this.xSet.length - 1;
let minDiff = Number.MAX_VALUE;
let closestIndex = 0;
- 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 getScaleType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getScaleType(values): string {
let date = true;
let num = true;
for (const value of values) {
- 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 getScaleType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getScaleType(values): string {
let date = true;
let num = true;
for (const value of values) {
- 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
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
if (bDate > aDate) return 1;
Avoid too many return
statements within this function. Open
return placement;
Function getInnerDomain
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getInnerDomain(): any[] {
const domain = [];
for (const group of this.results) {
for (const d of group.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 getInnerDomain
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getInnerDomain() {
const domain = [];
for (const group of this.results) {
for (const d of group.series) {
if (!domain.includes(d.label)) {
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
this.updateGradient();
let currentArea;
let startingArea;
- 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"