Showing 204 of 204 total issues
Function getToolTipText
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
getToolTipText(tooltipItem: any): string {
let result: string = '';
if (tooltipItem.series !== undefined) {
result += tooltipItem.series;
} else {
Function calcStatusData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
calcStatusData(sales = this.statusData[0].value, dur = this.statusData[2].value) {
const ret = sales * this.salePrice;
const cost = ((sales * dur) / 60 / 60 / 1000) * this.personnelCost;
const ROI = (ret - cost) / cost;
return [
Function updateDataLabels
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateDataLabels() {
if (this.type === 'stacked') {
this.barsForDataLabels = [];
const section: any = {};
section.series = this.seriesName;
Function update
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
if (!this.showDataLabel) {
this.dataLabelMaxHeight = { negative: 0, positive: 0 };
Function updateDataLabels
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateDataLabels() {
if (this.type === 'stacked') {
this.barsForDataLabels = [];
const section: any = {};
section.series = this.seriesName;
Function update
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
if (!this.showDataLabel) {
this.dataLabelMaxWidth = { negative: 0, positive: 0 };
Function update
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
this.zone.run(() => {
const hasValue = this.data && typeof this.data.value !== 'undefined';
const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());
const labelFormatting = this.labelFormatting || (card => escapeLabel(trimLabel(card.label, 55)));
Function update
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
if (this.valueFormatting) {
this.formatedValue = this.valueFormatting(this.value);
} else {
this.formatedValue = formatLabel(this.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 getInnerStackedDomain
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getInnerStackedDomain() {
const domain = [];
for (const group of this.results) {
for(const stack 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 getYDomain
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getYDomain(): 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
Function cloneData
has a Cognitive Complexity of 10 (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 scaleText
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
scaleText(element, repeat: boolean = true): void {
let el;
let resizeScale;
if (element === 'value') {
el = this.valueTextEl;
- 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 getDomain
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function getDomain(values, scaleType, autoScale, minVal?, maxVal?): number[] {
let domain: number[] = [];
if (scaleType === 'linear') {
values = values.map(v => Number(v));
if (!autoScale) {
- 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 roundedRect
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function roundedRect(x, y, w, h, r, [tl, tr, bl, br]: boolean[]) {
let retval = '';
w = Math.floor(w);
h = Math.floor(h);
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
let legendColumns = 0;
if (this.showLegend || this.advancedData) {
this.legendType = this.getLegendType();
- 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 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(): any[] {
const domain = [];
for (const results of this.results) {
for (const d of results.series) {
if (domain.indexOf(d.value) < 0) {
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 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(): any[] {
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];