Showing 430 of 684 total issues
Function extremeValues_
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.extremeValues_ = function(series) {
var minY = null, maxY = null, j, y;
var bars = this.attr_("errorBars") || this.attr_("customBars");
if (bars) {
- 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 attached
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
attached() {
//listening to custom event fmidata
console.log('dygraph attached');
if (this.refindex && (this.refindex.indexOf(',')>0)) this.refindices = this.refindex.split(',');
let fmielement = document.getElementById(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 bind
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
bind() {
//register throttled update function
if (typeof this.throttle === 'string') this.throttle = parseInt(this.throttle, 10);
if (typeof this.tofixed === 'string') this.tofixed = parseInt(this.tofixed, 10);
if (typeof this.dataevent === 'string') this.dataevent = this.dataevent === 'true';
- 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 parseDataTable_
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.parseDataTable_ = function(data) {
var shortTextForAnnotationNum = function(num) {
// converts [0-9]+ [A-Z][a-z]*
// example: 0=A, 1=B, 25=Z, 26=Aa, 27=Ab
// and continues like.. Ba Bb .. Za .. Zz..Aaa...Zzz Aaaa Zzzz
Function parseCSV_
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.parseCSV_ = function(data) {
var ret = [];
var lines = data.split("\n");
var vals, j;
Function _evaluateLimits
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
DygraphLayout.prototype._evaluateLimits = function () {
//TODO(tomaton): fix xrange when last x value is not the highest in case of x = sin(y) x is from 0 to 1 and back to 0
//and range for x is 0 to 1
this.minxval = this.maxxval = null;
if (this.dateWindow_) {
- 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 doUnzoom_
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.doUnzoom_ = function() {
var dirty = false, dirtyX = false, dirtyY = false;
if (this.dateWindow_ !== null) {
dirty = true;
dirtyX = true;
- 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 28 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
this.handleValueChange = e => {
//sets data to dataset
//apply value convert among all data
let rawdata;
- 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 28 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
this.handleXData = e => {
window.refpoint = e.target.value;
this.updatechart();
- 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 isPixelChangingOptionList
has a Cognitive Complexity of 27 (exceeds 5 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,
- 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 27 (exceeds 5 allowed). Consider refactoring. Open
bind() {
if (this.speedfactor) {
if (typeof this.speedfactor === 'string') this.speedfactor = parseInt(this.speedfactor, 10);
if (this.speedfactor <= 0 || this.speedfactor > 100) this.speedfactor = 100;
}
- 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 processAnswers
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
processAnswers(data) {
//const dbRef = ref(this.database, 'answers/');
//dbRef.once('value', snapshot => {
//const data = snapshot.val();
let aggregatedResults = {}
- 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 computeCombinedSeriesAndLimits_
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphRangeSelector.prototype.computeCombinedSeriesAndLimits_ = function() {
var data = this.dygraph_.rawData_;
var logscale = this.attr_('logscale');
// Create a combined series (average of all series values).
Function constructor
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
super();
this.handleValueChange = e => {
//let j = this.currentdataset;
//all values from refindex to one dataset - as one curve
Function markdownitbtoc
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function markdownitbtoc(md, _options) {
// Set default options
let options = Object.assign({}, defaultOptions, _options);
// Global variables
Function _renderChartLabels
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
DygraphCanvasRenderer.prototype._renderChartLabels = function() {
var div, class_div;
// Generate divs for the chart title, xlabel and ylabel.
// Space for these divs has already been taken away from the charting area in
Function updateSelection_
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.updateSelection_ = function(opt_animFraction) {
var defaultPrevented = this.cascadeEvents_('select', {
selectedX: this.lastx_,
selectedPoints: this.selPoints_
});
- 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 setSelection
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.setSelection = function(row, opt_seriesName) {
// Extract the points we've selected
this.selPoints_ = [];
var pos = 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 attached
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
attached() {
if (this.refpointindex) {
Chart.pluginService.register({
id: 'custom_lines to ref point',
afterDraw: (chart) => {
- 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 handleValueChange
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.handleValueChange = e => {
//let j = this.currentdataset;
//all values from refindex to one dataset - as one curve
let ydata = e.detail.data.slice(this.refindex, this.refindex + this.refvalues);
let y2data = [];