Function initDataAsMatrix
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
DataGroup.prototype.initDataAsMatrix = function(data) {
// TODO: store the created matrix dataPoints in the filters instead of
// reloading each time.
var x, y, i, obj;
- 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 initializeData
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
DataGroup.prototype.initializeData = function(graph3d, rawData, style) {
if (rawData === undefined) return;
if (Array.isArray(rawData)) {
rawData = new DataSet(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 initializeData
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
DataGroup.prototype.initializeData = function(graph3d, rawData, style) {
if (rawData === undefined) return;
if (Array.isArray(rawData)) {
rawData = new DataSet(rawData);
File DataGroup.js
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
var DataSet = require('../DataSet');
var DataView = require('../DataView');
var Range = require('./Range');
var Filter = require('./Filter');
var Settings = require('./Settings');
Function _getDataPoints
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
DataGroup.prototype._getDataPoints = function (data) {
var dataPoints = [];
if (this.style === Settings.STYLE.GRID || this.style === Settings.STYLE.SURFACE) {
dataPoints = this.initDataAsMatrix(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 initDataAsMatrix
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
DataGroup.prototype.initDataAsMatrix = function(data) {
// TODO: store the created matrix dataPoints in the filters instead of
// reloading each time.
var x, y, i, obj;
TODO found Open
* TODO: if/when combined settings per axis defined, get rid of this.
- Exclude checks
TODO found Open
* TODO: if/when combined settings per axis defined, rewrite this.
- Exclude checks
TODO found Open
// TODO: implement Array().indexOf() for Internet Explorer
- Exclude checks
TODO found Open
// TODO: store the created matrix dataPoints in the filters instead of
- Exclude checks
TODO found Open
* TODO: Pass settings only instead.
- Exclude checks
TODO found Open
// TODO: Perhaps it's better if an error is thrown if the values do not agree.
- Exclude checks