File tree Expand file tree Collapse file tree 1 file changed +1
-63
lines changed Expand file tree Collapse file tree 1 file changed +1
-63
lines changed Original file line number Diff line number Diff line change @@ -1518,68 +1518,6 @@ jsonstat.prototype.Unflatten=function(callback){
15181518 }
15191519
15201520 return cells ;
1521- }
1521+ } ;
15221522
15231523export default jsonstat ;
1524-
1525- /*
1526-
1527- jsonstat.prototype.Unflatten=function(callback){
1528- if(this===null || this.class!=="dataset" || this.value===null || typeof callback !== 'function'){
1529- return null;
1530- }
1531-
1532- const
1533- dims = this.id,
1534- size = this.size,
1535- cells = []
1536- ;
1537-
1538- for(let index=0; index<this.n; index++){
1539- const
1540- point = this.Data(index),
1541- coord = {}
1542- ;
1543-
1544- let remaining = index;
1545-
1546- for (let i = dims.length - 1; i >= 0; i--) {
1547- const
1548- dim = this.Dimension(i),
1549- role = dim.role,
1550- id = this.id[i],
1551- label = dim.label,
1552- dimSize = size[i],
1553- catIndex = remaining % dimSize,
1554- cat = dim.Category(catIndex),
1555- catLabel = cat.label,
1556- catId = dim.id[catIndex]
1557- ;
1558-
1559- remaining = Math.floor(remaining / dimSize);
1560-
1561- coord[id] = {
1562- label: label,
1563- cat: {
1564- id: catId,
1565- label: catLabel
1566- }
1567- };
1568-
1569- if(role!==null){
1570- coord[id].role = role;
1571- if(role==="metric" && cat.unit){
1572- coord[id].cat.unit = cat.unit;
1573- }
1574- }
1575- }
1576-
1577- const result = callback(coord, point, index, cells);
1578- if (typeof result !== 'undefined') {
1579- cells.push(result);
1580- }
1581- }
1582-
1583- return cells;
1584- }
1585- */
You can’t perform that action at this time.
0 commit comments