Showing 366 of 552 total issues
Function convertf2a
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
convertf2a(x) {
//do conversion if operation is defined
if (this.operation) x = this.operation(x);
if (this.autofmin) {
Function bind
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind(){
super.bind();
this.type = 'line';
this.options.legend.display = false;
let dataset = [];
Function handleValueChangeImpl
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleValueChangeImpl(e) {
console.log('bdl-ecg handlevaluechange e.detail', e.detail);
let mysegment = e.detail.segment;
let myreltime = e.detail.relativetime;
Function _createIEClipArea
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype._createIEClipArea = function() {
var className = 'dygraph-clip-div';
var graphDiv = this.dygraph_.graphDiv;
// Remove old clip divs.
- 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 doAnimatedZoom
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.doAnimatedZoom = function(oldXRange, newXRange, oldYRanges, newYRanges, callback) {
var steps = this.attr_("animatedZooms") ? Dygraph.ANIMATION_STEPS : 1;
var windows = [];
var valueRanges = [];
- 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 drawZoomRect_
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY,
endY, prevDirection, prevEndX,
prevEndY) {
var ctx = this.canvas_ctx_;
- 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 render
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype.render = function() {
// Draw the new X/Y grid. Lines appear crisper when pixels are rounded to
// half-integers. This prevents them from drawing in two rows/cols.
var ctx = this.elementContext;
function halfUp(x) { return Math.round(x) + 0.5; }
- 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 bind
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
bind() {
super.bind();
let datasets = [];
let mydata1 = this.initialdata.split(';');
//initialize x and y, x is first dataset, y is al the rest
- 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 bind
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
bind() {
this.isOneshot = this.mode === 'oneshot';
this.isOnestep = this.mode === 'onestep';
if (this.isOnestep) {
this.showcontrols = false;
- 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 destroyAdobe
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
destroyAdobe() {
console.log('animate adobe destroy()');
if (window.stage) {
window.stage.enableMouseOver(-1);
window.stage.enableDOMEvents(false);
- 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 initfmi
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
initfmi() {
console.log('fmi initfmi()');
let that = {};
if (window.thisfmi) {
that.fminame = window.thisfmi.fminame;
- 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 constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
//stacked box contains data, each box in different dataset, group is
this.handleValueChange = e => {
for (let j = 0; j< this.refindices.length; j++) {
- 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 constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
this.handleValueChange = e => {
//sets data to dataset
//apply value convert among all data
if (this.fromid) {
- 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 constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
//create lambda function which is added as listener later
this.handleValueChange = e => {
this.value = e.detail.data[this.refindex] * this.numerator / this.denominator;
- 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 destroy
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.destroy = function() {
var removeRecursive = function(node) {
while (node.hasChildNodes()) {
removeRecursive(node.firstChild);
node.removeChild(node.firstChild);
Function hsvToRGB
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.hsvToRGB = function (hue, saturation, value) {
var red;
var green;
var blue;
if (saturation === 0) {
Function treatMouseOpAsClick
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) {
var clickCallback = g.attr_('clickCallback');
var pointClickCallback = g.attr_('pointClickCallback');
var selectedPoint = null;
Function updateDeep
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.updateDeep = function (self, o) {
// Taken from http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
function isNode(o) {
return (
typeof Node === "object" ? o instanceof Node :
Function findClosestPoint
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.findClosestPoint = function(domX, domY) {
var minDist = Infinity;
var idx = -1;
var points = this.layout_.points;
var dist, dx, dy, point, closestPoint, closestSeries;
Function bind
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.isOneshot = this.mode === 'oneshot';
this.isOnestep = this.mode === 'onestep';
if (this.isOnestep) {
this.showcontrols = false;