Showing 430 of 684 total issues
Function findStackedPoint
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.findStackedPoint = function(domX, domY) {
var row = this.findClosestRow(domX);
var boundary = this.getLeftBoundary_();
var rowIdx = row - boundary;
var points = this.layout_.points;
- 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 __init__
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.__init__ = function (div, file, attrs) {
// Hack for IE: if we're using excanvas and the document hasn't finished
// loading yet (and hence may not have initialized whatever it needs to
// initialize), then keep calling this routine periodically until it has.
if (/MSIE/.test(navigator.userAgent) && !window.opera &&
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
//create lambda function which is added as listener later
this.changeinputs = {}; //[]; change to associative array
this.handleValueChange = e => {
//e.target; //triggered the event
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
bind() {
super.bind();
this.plugins = [ChartDataLabels];
if (this.extremelimits) {
this.elimits = this.extremelimits.split(','); //split by comma
- 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 gatherDatasets_
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) {
var boundaryIds = [];
var cumulative_y = []; // For stacked series.
var datasets = [];
var extremes = {}; // series name -> [low, high]
Function _renderAnnotations
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype._renderAnnotations = function() {
var annotationStyle = {
"position": "absolute",
"fontSize": this.attr_('axisLabelFontSize') + "px",
"zIndex": 10,
Function __init__
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.__init__ = function (div, file, attrs) {
// Hack for IE: if we're using excanvas and the document hasn't finished
// loading yet (and hence may not have initialized whatever it needs to
// initialize), then keep calling this routine periodically until it has.
if (/MSIE/.test(navigator.userAgent) && !window.opera &&
Function movePan
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.Interaction.movePan = function(event, g, context) {
context.dragEndX = g.dragGetX_(event, context);
context.dragEndY = g.dragGetY_(event, context);
var minDate = context.initialLeftmostDate -
- 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 parseConvertors
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
parseConvertors() {
//configure convertors - used to convert units received from fmi
if (this.convertor) {
let convertvalues = this.convertor.split(';');
let identity = x => 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 markdownitbtoc
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export function markdownitbtoc(md, _options) {
// Set default options
let options = Object.assign({}, defaultOptions, _options);
// Global variables
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
bind() {
super.bind();
console.log('chartjs xy point bind()');
if (this.xmin) {
//sets yscale min
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
//this.data = [[0, 0, 0]];
//this.data=[[1, 5], [2, 5], [3, 4.9], [4, 4.8], [5, 5.2]];
//create lambda function which is added as listener later
console.log('dygraph chart constructor');
- 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 23 (exceeds 5 allowed). Consider refactoring. Open
bind() {
if ((typeof this.vertical) === "string") this.vertical = this.vertical === 'true';
if (this.w3class) {
this.activeclass= this.w3class+ ' '+(this.vertical?this.activeclasstemplatevertical:this.activeclasstemplate);
this.inactiveclass= this.w3class+' '+(this.vertical?this.inactiveclasstemplatevertical:this.inactiveclasstemplate);
- 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 computeYAxisRanges_
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.computeYAxisRanges_ = function (extremes) {
// Build a map from axis number -> [list of series names]
var seriesForAxis = [], series;
for (series in this.seriesToAxisMap_) {
if (!this.seriesToAxisMap_.hasOwnProperty(series)) continue;
AnimateAdobe
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
export class AnimateAdobe {
@bindable src;
@bindable width=800;
@bindable height=600;
@bindable name;//="ZelezoCelek"
Function isPixelChangingOptionList
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.isPixelChangingOptionList = function(labels, attrs) {
// A whitelist of options that do not change pixel positions.
var pixelSafeOptions = {
'annotationClickHandler': true,
'annotationDblClickHandler': true,
Function abbr_replace
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function abbr_replace(state) {
var i, j, l, tokens, token, text, nodes, pos, reg, m, regText, regSimple,
currentToken,
blockTokens = state.tokens;
Function computeYAxes_
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.computeYAxes_ = function() {
// Preserve valueWindow settings if they exist, and if the user hasn't
// specified a new valueRange.
var i, valueWindows, seriesName, axis, index, opts, v;
if (this.axes_ !== undefined && this.user_attrs_.hasOwnProperty("valueRange") === false) {
Function updateDeep
has a Cognitive Complexity of 22 (exceeds 5 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 :
- 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 RGBColor
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function RGBColor(color_string)
{
this.ok = false;
// strip any leading #
- 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"