Showing 269 of 3,565 total issues
Function init
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
init(xConfig) {
const config = xConfig;
config.guide = utils.defaults(
Function fixScale
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const fixScale = (scale: ScaleFunction, start, end, flip) => {
var domain = scale.domain();
var length = Math.abs(scale.value(domain[1]) - scale.value(domain[0]));
var koeff = ((domain[1] - domain[0]) / length);
Function grid
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
.call((selection) => {
var grid = selection;
var animationSpeed = this.config.guide.animationSpeed;
Function constructor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(xSource: DataFrame, scaleConfig: ScaleConfig) {
super(xSource, scaleConfig);
var discrete = (scaleConfig.dimType !== 'measure');
Function constructor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
config: GPLSpec,
scalesRegistryInstance: ScalesFactory,
unitsRegistry: UnitsRegistry,
grammarRules: GrammarRegistry
Function subscribe
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
subscribe(sel: GrammarElement, dataInterceptor = ((x: any) => x), eventInterceptor = ((x: Event) => x)) {
var self = this;
var last = {};
([
{
Function createIterations
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const createIterations = (forward) => {
const iterations = groups
.map((g, i) => {
return {
elements: g.elements,
Function create
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
create(interval) {
var varSet = this.vars;
var utcTime = this.scaleConfig.utcTime;
const period = this.periodGenerator;
- 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 getTimeTicks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function getTimeTicks(domain: Date[], utc: boolean, count = 10) {
const d0 = Number(domain[0]);
const d1 = Number(domain[1]);
- 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 niceZeroBased
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function niceZeroBased(domain: number[]) {
var m = 10;
var low = parseFloat(Math.min(...domain).toFixed(15));
- 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 extendLogScale
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function extendLogScale(scale) {
var d3ScaleCopy = scale.copy;
// NOTE: D3 log scale ticks count is not configurable
// and returns 10 ticks per each exponent.
- 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 ChartArea
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const ChartArea = (rawConfig: ChartConfig) => {
var config = normalizeConfig(rawConfig);
var data = config.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 _initPointerEvents
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
_initPointerEvents() {
if (!this._liveSpec.settings.syncPointerEvents) {
this._pointerAnimationFrameId = null;
}
const svg = d3.select(this._svg);
- 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 _loopTasks
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
_loopTasks() {
var task: Task;
var duration: number;
var frameDuration = 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 getDataSetId
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getDataSetId = (() => {
const current = (frameSelection.empty() ? [] : frameSelection.data());
const currentIds = new Map();
frameSelection.each(function (d) {
currentIds.set(d, Number(this.getAttribute('data-id')));
Function baseModel
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
baseModel(screenModel) {
const kRound = 10000;
var baseModel = {
gog: screenModel.model,
Function updateFrame
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var updateFrame = function (selection) {
var backgroundPath = selection
.selectAll('.background')
.data(f => f.part());
backgroundPath
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
init(xConfig) {
const config = BasePath.init(xConfig);
const enableStack = config.stack;
Function _expandUnitsStructure
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
_expandUnitsStructure(root: Unit, parentPipe: DataFilter[] = []) {
var self = this;
if (root.expression.operator === false) {
Function getClosestElement
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
getClosestElement(cursorX, cursorY) {
if (!this._boundsInfo) {
return null;
}
const {bounds, tree} = this._boundsInfo;