Showing 156 of 1,095 total issues
Avoid deeply nested control flow statements. Open
Open
if (selectedNumBar[selectedNumBar.length - 1] >= opts_.xDomain[i - 1] &&
selectedNumBar[selectedNumBar.length - 1] < opts_.xDomain[i]) {
// right point is closer to the downward tick
maxNumBarPoint = opts_.xDomain[i];
} else {
Avoid deeply nested control flow statements. Open
Open
if (!hasNA && !hasSmallerOutlier && !hasGreaterOutlier &&
minNumBarPoint !== '' && maxNumBarPoint !== '') {
tempFilters_[0] = minNumBarPoint + '<';
tempFilters_[1] = '<=' + maxNumBarPoint;
} else if (hasNA && !hasSmallerOutlier) {
Avoid deeply nested control flow statements. Open
Open
if (hasNA) {
tempFilters_[0] += 'NA';
} else {
tempFilters_[0] = tempFilters_[0].slice(0, -2);// remove last coma
}
Avoid deeply nested control flow statements. Open
Open
if (!hasNA && _filter[0] < opts_.xDomain[startNumIndex] &&
_filter[1] > opts_.xDomain[endNumIndex]) {
tempFilters_[0] = 'All Numbers';
} else if (!hasNA && minNumBarPoint !== '' && maxNumBarPoint !== '') {
tempFilters_[0] = minNumBarPoint + '<';
Avoid deeply nested control flow statements. Open
Open
} else if (exponentRange === 1) {
config.minDomain = Math.pow(10, minExponent - 1);
config.xDomain.push(Math.pow(10, minExponent) / 3); // add "<=" marker
for (i = minExponent; i <= maxExponent + 1; i++) {
config.xDomain.push(Math.pow(10, i));
Avoid deeply nested control flow statements. Open
Open
if (selectedMap_[geneIndex] === undefined) {
selectedMap_[geneIndex] = {};
if (includeMutationCount) {
selectedMap_[geneIndex].num_muts = 1;
}
Avoid deeply nested control flow statements. Open
Open
} else if (data_.min > 1500 &&
opts_.xDomain.length > 7) {
// this is the special case for printing out year
index = opts_.xDomain.indexOf(v);
if (index % 2 === 0) {
Avoid deeply nested control flow statements. Open
Open
if (item === -1 && _matrix[0] === -1 && _matrix[1] === -1 && _matrix[2] === -1 && _matrix[3] === -1) {
// Found a place for chart
_matrix = [chart.attr_id, chart.attr_id, chart.attr_id, chart.attr_id];
layoutItem.notFull = false;
foundSpace = true;
Avoid deeply nested control flow statements. Open
Open
if (data_.hasNA) {// has 'NA' tick
endNumIndex = opts_.xDomain.length >= 3 ? opts_.xDomain.length - 3 : endNumIndex;
} else {
endNumIndex = opts_.xDomain.length - 2;
}
Consider simplifying this complex logical expression. Open
Open
} else if ((!data_.noGrouping && _filter[0] < opts_.xDomain[0] && _filter[1] > opts_.xDomain[opts_.xDomain.length - 1]) ||
(data_.noGrouping && _filter[0] < opts_.xFakeDomain[0] && _filter[1] > opts_.xFakeDomain[opts_.xFakeDomain.length - 1])) {
tempFilters_[0] = 'All';
} else {
if (data_.noGrouping) {
Function iViz
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
window.iViz = (function(_, $, cbio, QueryByGeneUtil, QueryByGeneTextArea) {
Avoid too many return
statements within this function. Open
Open
return -1;
Avoid too many return
statements within this function. Open
Open
return '>' + formattedValue;
Avoid too many return
statements within this function. Open
Open
return _returnValue;
Avoid too many return
statements within this function. Open
Open
return 1;
Avoid too many return
statements within this function. Open
Open
return b.numOfDatum - a.numOfDatum;