Showing 208 of 208 total issues
Function update
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
this.formatDates();
Function gridLayout
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function gridLayout(
dims: ViewDimensions,
data: GridData[],
minWidth: number,
designatedTotal: number
Function getRotationAngle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
getRotationAngle(ticks: any[]): number {
let angle = 0;
this.maxTicksLength = 0;
for (let i = 0; i < ticks.length; i++) {
const tick = this.tickFormat(ticks[i]).toString();
Function getArcs
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
getArcs(): any[] {
const arcs = [];
const availableRadius = this.outerRadius * 0.7;
Function count
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function count(countFrom: number, countTo: number, countDecimals: number, countDuration: number, callback: any) {
const startVal = Number(countFrom);
const endVal = Number(countTo);
const countDown = startVal > endVal;
const decimals = Math.max(0, countDecimals);
Function updateDataLabels
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
updateDataLabels(): void {
if (this.type === BarChartType.Stacked) {
this.barsForDataLabels = [];
const section: any = {};
section.series = this.seriesName;
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
getYDomain(): [number, number] {
const domain = [];
for (let i = 0; i < this.xSet.length; i++) {
const val = this.xSet[i];
- 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 updateDataLabels
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
updateDataLabels(): void {
if (this.type === BarChartType.Stacked) {
this.barsForDataLabels = [];
const section: any = {};
section.series = this.seriesName;
- 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 edges
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
get edges(): boolean[] {
let edges = [false, false, false, false];
if (this.roundEdges) {
if (this.orientation === BarOrientation.Vertical) {
if (this.data.value > 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 shouldFlip
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static shouldFlip(
elDimensions: DOMRect,
popoverDimensions: DOMRect,
placement: PlacementTypes,
spacing: number
- 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 formatDates
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
formatDates(): void {
for (let i = 0; i < this.results.length; i++) {
const g = this.results[i];
g.label = g.name;
if (isDate(g.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 getColor
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
getColor(value: StringOrNumberOrDate): string {
if (value === undefined || value === null) {
throw new Error('Value can not be null');
}
if (this.scaleType === ScaleType.Linear) {
- 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 getRotationAngle
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
getRotationAngle(ticks: any[]): number {
let angle = 0;
this.maxTicksLength = 0;
for (let i = 0; i < ticks.length; i++) {
const tick = this.tickFormat(ticks[i]).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 getValues
has 35 lines of code (exceeds 25 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());
Function update
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
if (!this.showAxis) {
if (!this.margin) {
Function update
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
height: this.height,
Function generateColorScheme
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateColorScheme(scheme: string | Color, type: ScaleType, domain: number[] | string[]): any {
if (typeof scheme === 'string') {
scheme = colorSets.find(cs => {
return cs.name === scheme;
});
Function update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
Function update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
if (this.labels && this.hasNoOptionalMarginsSet()) {
this.margins = [30, 80, 30, 80];
Function exports
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [