Showing 204 of 204 total issues
Function exports
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(env) {
return webpackMerge(commonConfig({ env: ENV }), {
devtool: 'source-map',
entry: {
'app': './demo/bootstrap.ts',
Function mapDataPointToCircle
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
mapDataPointToCircle(d: any, i: number): any {
const seriesName = this.data.name;
const value = d.value;
const label = d.name;
Function calculateLabelPositions
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
calculateLabelPositions(pieData): any {
const factor = 1.5;
const minDistance = 10;
const labelPositions = pieData;
- 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 setTicks
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
setTicks() {
let tickFormat;
if (this.xAxisTickFormatting) {
tickFormat = this.xAxisTickFormatting;
} else if (this.xScale.tickFormat) {
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
const scale = this.scale;
this.ticks = this.getTicks();
if (this.tickFormatting) {
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
getYDomain(): any[] {
if (this.valueDomain) {
return this.valueDomain;
}
- 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 setTicks
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
setTicks() {
let tickFormat;
if (this.xAxisTickFormatting) {
tickFormat = this.xAxisTickFormatting;
} else if (this.xScale.tickFormat) {
Function exports
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(config) {
var configuration = {
basePath: '',
singleRun: true,
frameworks: ['jasmine'],
Function gridLayout
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function gridLayout(dims, data, minWidth, designatedTotal) {
const xScale: any = scaleBand<number>();
const yScale: any = scaleBand<number>();
const width = dims.width;
const height = dims.height;
- 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 getLinearGradientStops
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
getLinearGradientStops(value, start?) {
if (start === undefined) {
start = this.domain[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 getValueDomain
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
getValueDomain(): any[] {
const domain = [];
let smallest = 0;
let biggest = 0;
for (const group of 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 getValueDomain
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
getValueDomain() {
const domain = [];
let smallest = 0;
let biggest = 0;
for (const group of 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 updateDataLabels
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
updateDataLabels() {
if (this.type === '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 updateDataLabels
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
updateDataLabels() {
if (this.type === '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 count
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function count(countFrom, countTo, countDecimals, countDuration, callback) {
const startVal = Number(countFrom);
const endVal = Number(countTo);
const countDown = startVal > endVal;
const decimals = Math.max(0, countDecimals);
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
update(): void {
if (this.data.length > 2) {
const valueFormatting = this.valueFormatting || (card => card.value.toLocaleString());
const sortedLengths = this.data
- 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 updateData
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
updateData() {
if (!this.realTimeData) {
return;
}
- 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 getTooltipMinMaxText
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
getTooltipMinMaxText(min: any, max: any) {
if (min !== undefined || max !== undefined) {
let result = ' (';
if (min !== undefined) {
if (max === undefined) {
- 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 getTicks
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
getTicks(): any {
const bigTickSegment = this.angleSpan / this.bigSegments;
const smallTickSegment = bigTickSegment / (this.smallSegments);
const tickLength = 20;
const ticks = {
Function getCircles
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
getCircles(): any[] {
const seriesName = this.data.name;
return this.data.series
.map((d, i) => {