Showing 430 of 684 total issues
Function bind
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
super.bind();
if (typeof this.timedenomfixed === 'string') this.timedenomfixed = parseInt(this.timedenomfixed,10);
if (typeof this.timedenom === 'string') {
Function attr_
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.attr_ = function(name, seriesName) {
var sources = [];
sources.push(this.attrs_);
if (this.user_attrs_) {
- 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 numDateTicks
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.numDateTicks = function(start_time, end_time, granularity) {
if (granularity < Dygraph.MONTHLY) {
// Generate one tick mark for every fixed interval of time.
var spacing = Dygraph.SHORT_SPACINGS[granularity];
return Math.floor(0.5 + 1.0 * (end_time - start_time) / spacing);
- 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 dateParser
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.dateParser = function(dateStr) {
var dateStrSlashed;
var d;
// Let the system try the format first, with one caveat:
- 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 computePlotArea_
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
DygraphLayout.prototype.computePlotArea_ = function() {
var area = {
// TODO(danvk): per-axis setting.
x: 0,
y: 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 _dashedLine
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype._dashedLine = function(ctx, x, y, x2, y2, pattern) {
// Original version http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas
// Modified by Russell Valentine to keep line history and continue the pattern
// where it left off.
var dx, dy, len, rot, patternIndex, segment;
- 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 addAnnotationRule
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.addAnnotationRule = function() {
if (Dygraph.addedAnnotationCSS) return;
var rule = "border: 1px solid black; " +
"background-color: white; " +
- 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 deregisterInputs
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
deregisterInputs() {
console.warn('deregistering inputs');//do removeListeners()
window.animateranges = [];
if (this.inputs) {
let inputparts = this.inputs.split(';');
- 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 setInputVariables
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
setInputVariables() {
for (let key in this.changeinputs) {
let myinputs = this.changeinputs[key];
//console.log('changing inputs', myinputs);
//set real - reference is in - one input one reference
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
this.handleValueChange = e => {
//sets data to dataset
//apply value convert among all 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 _evaluateLineCharts
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphLayout.prototype._evaluateLineCharts = function() {
// An array to keep track of how many points will be drawn for each set.
// This will allow for the canvas renderer to not have to check every point
// for every data set since the points are added in order of the sets in
// datasets.
Function doAnimatedZoom
has 35 lines of code (exceeds 25 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 = [];
Function bind
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
super.bind();
console.log('chartjs xy point bind()');
if (this.xmin) {
//sets yscale min
Function getScript
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
getScript(source, callback) {
//check whether the script is not already there
if (Array.from(document.getElementsByTagName('script')).filter(x=> x.getAttribute('src') === source).length > 0) {
console.warn('AnimateAdobe.getScript() WARNING, script is already added into DOM:', source);
//do callback?
Function getScript
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
getScript(source, callback) {
//check whether the script is not already there
if (Array.from(document.getElementsByTagName('script')).filter(x=> x.getAttribute('src') === source).length > 0) {
console.warn('AnimateAdobe.getScript() WARNING, script is already added into DOM:', source);
//do callback?
Function log
has 34 lines of code (exceeds 25 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});
Function handleResize
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleResize() {
console.log('animateadobe handleResize()');
//do not run if ani.lib is not defined - no adobe component is available
if (!this.lib) return;
let w = this.lib.properties.width; let h = this.lib.properties.height;
Function processAnswers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
processAnswers(data) {
//const dbRef = ref(this.database, 'answers/');
//dbRef.once('value', snapshot => {
//const data = snapshot.val();
let aggregatedResults = {}
Function bind
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
//either badges are defined - images in slot, or images are defined
//badges = 5, defines number of dots/badges generated
//create items array - numbers from 0 to 'badges -1'
if (this.infos) {
Function afterDraw
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
afterDraw: (chart) => {
if (chart.config.options.refpointplugin) {
const ctx = chart.canvas.getContext('2d');
ctx.save();