Showing 204 of 204 total issues
File series-vertical.component.ts
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Component, Input, Output, EventEmitter, OnChanges, ChangeDetectionStrategy, TemplateRef } from '@angular/core';
import { trigger, style, animate, transition } from '@angular/animations';
import { formatLabel, escapeLabel } from '../common/label.helper';
import { DataItem } from '../models/chart-data.model';
import { ColorHelper } from '../common';
Function exports
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(options = {}) {
return {
context: dir(),
resolve: {
extensions: ['.ts', '.js', '.json', '.css', '.scss', '.html'],
File bar-horizontal.component.ts
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
Function update
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
let scale;
const sign = this.orient === 'top' || this.orient === 'right' ? -1 : 1;
this.tickSpacing = Math.max(this.innerTickSize, 0) + this.tickPadding;
Function exports
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(options) {
return webpackMerge(commonConfig({ env: ENV }), {
devtool: 'cheap-module-source-map',
devServer: {
port: 9999,
BarVertical2DStackedComponent
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'ngx-charts-bar-vertical-2d-stacked',
template: `
<ngx-charts-chart
[view]="[width, height]"
Function exports
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(env) {
return webpackMerge(commonConfig({ env: ENV }), {
devtool: 'inline-source-map',
plugins: [
new CheckerPlugin()
File series-horizontal.component.ts
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Component,
Input,
Output,
EventEmitter,
Function update
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
this.dims = calculateViewDimensions({
width: this.width,
Function getLinearGradientStops
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
getLinearGradientStops(value, start?) {
if (start === undefined) {
start = this.domain[0];
}
AreaChartComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'ngx-charts-area-chart',
template: `
<ngx-charts-chart
[view]="[width, height]"
Function update
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
let scale;
const sign = this.orient === 'top' || this.orient === 'right' ? -1 : 1;
this.tickSpacing = Math.max(this.innerTickSize, 0) + this.tickPadding;
- 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 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): any[] {
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: any): 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
File timeline-filter-bar-chart.component.ts
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Component, Input, Output, EventEmitter, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
import { scaleLinear, scaleTime, scaleBand } from 'd3-scale';
import { brushX } from 'd3-brush';
import { select, event as d3event } from 'd3-selection';
Function update
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
super.update();
if (!this.showDataLabel) {
this.dataLabelMaxHeight = { negative: 0, positive: 0 };
Function update
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
this.updateGradient();
let currentArea;
let startingArea;