hyper-analytics
Advanced tools
Comparing version 0.12.0 to 0.13.0
@@ -52,12 +52,17 @@ 'use strict'; | ||
if (index.length) { | ||
var groupsOffset = drillDown.hasGroups() ? 1 : 0, | ||
// var groupsOffset = drillDown.hasGroups() ? 1 : 0, | ||
// data = this.data, | ||
// dataLen = drillDown.getColumnCount() - groupsOffset, | ||
// i = 0, | ||
// sorter = drillDown.sorterInstance; | ||
var groupsOffset = Number(drillDown.hasGroups()), | ||
sorter = drillDown.sorterInstance, | ||
data = this.data, | ||
dataLen = drillDown.getColumnCount() - groupsOffset, | ||
i = 0, | ||
sorter = drillDown.sorterInstance; | ||
dataLen = sorter.getColumnCount(), | ||
i = 0; | ||
sorter.index = index; | ||
//data[0] = ""; //No need to repeat the first column info above the group | ||
for (i; i < dataLen; i++) { | ||
data[groupsOffset + i] = sorter.getValue(i, 0); | ||
data[i + groupsOffset] = sorter.getValue(i, 0); | ||
} | ||
@@ -64,0 +69,0 @@ } |
@@ -166,3 +166,2 @@ 'use strict'; | ||
var reversedGroupBys = this.groupBys.slice(0).reverse(), | ||
leafDepth = this.groupBys.length - 1, | ||
source = this.dataSource, | ||
@@ -180,12 +179,15 @@ rowCount = source.getRowCount(), | ||
for (var r = 0; r < rowCount; r++) { | ||
var path = tree; | ||
var path = tree, | ||
leaf, key; | ||
this.groupBys.forEach(function(g, c) { // eslint-disable-line no-loop-func | ||
var key = source.getValue(g, r), | ||
factoryDataNode = (c === leafDepth) ? factoryDataNodeLeaf : factoryDataNodeGroup; | ||
path = path.children.getIfUndefined(key, factoryDataNode); | ||
key = source.getValue(g, r); | ||
path = path.children.getIfUndefined(key, factoryDataNodeGroup); | ||
}); | ||
path.index.push(r); | ||
leaf = factoryDataNodeLeaf(key); | ||
path.children.set(r, leaf); | ||
leaf.index.push(r); | ||
} | ||
@@ -192,0 +194,0 @@ |
{ | ||
"name": "hyper-analytics", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Data transformations on arrays of congruent JavaScript objects.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91697
2808