mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-29 10:50:51 +02:00
Merged master in
This commit is contained in:
commit
07ba2b7718
|
@ -116,9 +116,10 @@ export default class ColOps extends Feature {
|
||||||
|
|
||||||
if (isArray(labelId) && isArray(colIndex) && isArray(operation)) {
|
if (isArray(labelId) && isArray(colIndex) && isArray(operation)) {
|
||||||
let rows = tf.tbl.rows,
|
let rows = tf.tbl.rows,
|
||||||
colvalues = [];
|
colvalues = [],
|
||||||
|
ucol = 0;
|
||||||
|
|
||||||
for (let ucol = 0; ucol <= ucolMax; ucol++) {
|
for (; ucol <= ucolMax; ucol++) {
|
||||||
//this retrieves col values
|
//this retrieves col values
|
||||||
//use ucolIndex because we only want to pass through this loop
|
//use ucolIndex because we only want to pass through this loop
|
||||||
//once for each column get the values in this unique column
|
//once for each column get the values in this unique column
|
||||||
|
@ -148,9 +149,12 @@ export default class ColOps extends Feature {
|
||||||
decThisCol = [],
|
decThisCol = [],
|
||||||
labThisCol = [],
|
labThisCol = [],
|
||||||
oTypeThisCol = [],
|
oTypeThisCol = [],
|
||||||
mThisCol = -1;
|
mThisCol = -1,
|
||||||
|
k = 0,
|
||||||
|
j = 0,
|
||||||
|
i = 0;
|
||||||
|
|
||||||
for (let k = 0; k < colIndex.length; k++) {
|
for (; k < colIndex.length; k++) {
|
||||||
if (colIndex[k] === ucolIndex[ucol]) {
|
if (colIndex[k] === ucolIndex[ucol]) {
|
||||||
mThisCol++;
|
mThisCol++;
|
||||||
opsThisCol[mThisCol] = operation[k].toLowerCase();
|
opsThisCol[mThisCol] = operation[k].toLowerCase();
|
||||||
|
@ -185,7 +189,7 @@ export default class ColOps extends Feature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let j = 0; j < colvalues[ucol].length; j++) {
|
for (; j < colvalues[ucol].length; j++) {
|
||||||
//sort the list for calculation of median and quartiles
|
//sort the list for calculation of median and quartiles
|
||||||
if ((q1Flag === 1) || (q3Flag === 1) || (medFlag === 1)) {
|
if ((q1Flag === 1) || (q3Flag === 1) || (medFlag === 1)) {
|
||||||
if (j < colvalues[ucol].length - 1) {
|
if (j < colvalues[ucol].length - 1) {
|
||||||
|
@ -262,7 +266,7 @@ export default class ColOps extends Feature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i <= mThisCol; i++) {
|
for (; i <= mThisCol; i++) {
|
||||||
switch (opsThisCol[i]) {
|
switch (opsThisCol[i]) {
|
||||||
case 'mean':
|
case 'mean':
|
||||||
result = meanValue;
|
result = meanValue;
|
||||||
|
|
Loading…
Reference in a new issue