Showing 358 of 540 total issues
Function axisSmart
has a Cognitive Complexity of 582 (exceeds 5 allowed). Consider refactoring. Open
export default function axisSmart(_orient) {
return (function d3_axis_smart(_super) {
const VERTICAL = "vertical axis";
- 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 treemenu.js
has 1273 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Component from "base/component";
import Class from "base/class";
import Hook from "models/hook";
import Marker from "models/marker";
Function axisSmart
has 644 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function axisSmart(_orient) {
return (function d3_axis_smart(_super) {
const VERTICAL = "vertical axis";
Function d3_axis_smart
has 642 lines of code (exceeds 25 allowed). Consider refactoring. Open
return (function d3_axis_smart(_super) {
const VERTICAL = "vertical axis";
const HORIZONTAL = "horizontal axis";
const X = "labels stack side by side";
File utils.js
has 1070 lines of code (exceeds 250 allowed). Consider refactoring. Open
import interpolator from "vizabi-interpolators/interpolators";
export const d3json = function(path, callback) {
d3.json(path)
Function _updateRainbowLegend
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
_updateRainbowLegend(isVisible) {
const _this = this;
//Hide rainbow element if showing minimap or if color is discrete
this.rainbowEl.classed("vzb-hidden", !isVisible);
- 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 label
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
const label = function(context) {
return (function d3_label() {
const _this = context;
- 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 labels.js
has 722 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Class from "base/class";
import cssEscape from "css.escape";
import { close as iconClose } from "base/iconset";
File marker.js
has 694 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Model from "base/model";
/*!
* HOOK MODEL
Function collisionResolver
has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring. Open
export default function collisionResolver() {
return (function collision_resolver() {
const DURATION = 300;
let labelHeight = 0;
// MAINN FUNCTION. RUN COLLISION RESOLVER ON A GROUP g
- 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 d3.axisWithLabelPicker.js
has 647 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
//d3.axisSmart
export default function axisSmart(_orient) {
Function resize
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
resize() {
const _this = this;
this.profiles = {
"small": {
- 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 labelFactory
has 275 lines of code (exceeds 25 allowed). Consider refactoring. Open
axis.labelFactory = function(options) {
if (options == null) options = {};
if (options.scaleType != "linear" &&
options.scaleType != "time" &&
options.scaleType != "genericLog" &&
File datastorage.js
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Class from "base/class";
function _getQueryId(query, path, lastModified, readerName) {
File colorlegend.js
has 601 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Component from "base/component";
import ColorPicker from "helpers/d3.colorPicker";
import axisSmart from "helpers/d3.axisWithLabelPicker";
import { close as iconClose } from "base/iconset";
Function label
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
const label = function(context) {
return (function d3_label() {
const _this = context;
Function d3_label
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
return (function d3_label() {
const _this = context;
let _cssPrefix;
File timeslider.js
has 554 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Component from "base/component";
import axisSmart from "helpers/d3.axisWithLabelPicker";
const precision = 1;
File buttonlist.js
has 553 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as utils from "base/utils";
import Component from "base/component";
import * as iconset from "base/iconset";
/*!
Function _updateRainbowLegend
has 207 lines of code (exceeds 25 allowed). Consider refactoring. Open
_updateRainbowLegend(isVisible) {
const _this = this;
//Hide rainbow element if showing minimap or if color is discrete
this.rainbowEl.classed("vzb-hidden", !isVisible);