Showing 366 of 552 total issues
Function createZoomHandles_
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphRangeSelector.prototype.createZoomHandles_ = function() {
var img = new Image();
img.className = 'dygraph-rangesel-zoomhandle';
img.style.position = 'absolute';
img.style.zIndex = 10;
Function updatetitles
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
updatetitles(hashstruct) {
//this.currentlink
console.log('top nav hash:', hashstruct);
if (window.markdownnav) {
let currentlink = '#' + (hashstruct[0].length > 0 ? hashstruct[0] : this.index);
Function attached
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
attached() {
//console.log('bdlmarkdownaurelia attached() src:', this.src);
// eslint-disable-next-line new-cap
//optionally, register customevent handler for 'contentupdate' when fromid is defined
// eslint-disable-next-line new-cap
Function get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
get() {
//sends GET request to
let myheaders = new Headers();
//localStorage.setItem('bdl-fhir-url',this.remoteurl);
if (this.remoteheadervalue && this.remoteheadervalue.length > 0) {
Function bind
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
super.bind();
//done in super
//this.chlabels = this.labels.split(','); //labels for each dataset
Function toc_body
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
md.renderer.rules.toc_body = function(tokens, index) {
let results = [];
let previousLevel = 0;
for (let i = 0; i < headingInfos.length; i++) {
Function handleValueChange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.handleValueChange = e => {
let datapoint = [];
if (!this.xy) datapoint.push(e.detail.time);
//e.detail do not reallocate - using same buffer, thus slicing to append to data array
let edata = e.detail.data.slice();
Function DrawPolygon_
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.DrawPolygon_ = function(sides, rotationRadians, ctx, cx, cy, color, radius, delta) {
Function _drawSeries
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
ctx, iter, strokeWidth, pointSize, drawPoints, drawGapPoints,
stepPlot, strategy) {
Function drawZoomRect_
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY,
endY, prevDirection, prevEndX,
prevEndY) {
Function setAnnotations
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
DygraphLayout.prototype.setAnnotations = function(ann) {
// The Dygraph object's annotations aren't parsed. We parse them here and
// save a copy. If there is no parser, then the user must be using raw format.
this.annotations = [];
var parse = this.attr_('xValueParser') || function(x) { return x; };
- 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 _evaluateLineTicks
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
DygraphLayout.prototype._evaluateLineTicks = function() {
var i, tick, label, pos;
this.xticks = [];
for (i = 0; i < this.xTicks_.length; i++) {
tick = this.xTicks_[i];
- 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 log
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.log = function(severity, message) {
var st;
if (typeof(printStackTrace) != 'undefined') {
// Remove uninteresting bits: logging functions and paths.
st = printStackTrace({guess: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 findPosX
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.findPosX = function(obj) {
var curleft = 0;
if(obj.offsetParent) {
var copyObj = obj;
while(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 startPan
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.Interaction.startPan = function(event, g, context) {
var i, axis;
context.isPanning = true;
var xRange = g.xAxisRange();
context.dateRange = xRange[1] - xRange[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 cascadeEvents_
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.cascadeEvents_ = function(name, extra_props) {
if (!name in this.eventListeners_) return true;
// QUESTION: can we use objects & prototypes to speed this up?
var e = {
- 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 findClosestPoint
has a Cognitive Complexity of 9 (exceeds 5 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;
- 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 evaluateWithError
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
DygraphLayout.prototype.evaluateWithError = function() {
this.evaluate();
if (!(this.attr_('errorBars') || this.attr_('customBars'))) return;
// Copy over the error terms
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
this.isstopped = true;
this.handleStart = e => {
//console.log('AnimatedHeart start event gif length:', this.gif.get_length());
//this.gif.play();
- 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 9 (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"