Forum
14:06
24/04/2014
Hello,
There is an index error with three or more yDimensions.
I get the following error:
''Uncaught TypeError: Cannot read property 'name' of undefined"
in this line:
headers[items.level-1].groupHeaders[collen-1].startColumnName = columns[colpos].name;
Â
For example then colpos is 90 but columns have only 86 entries
11:33
Moderators
30/10/2007
Hello,
There was some fixes in the GitHub regarding pivot.
Can you please post a simple test case, since I can not reproduce this problem.
Thank you.
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
13:03
24/04/2014
Hello tony,
i want to try it with the latest GitHub Source but if i run the gradlew script the output file "jquery.jgGrid.js" is twice as big as my original file (26515 Lines).Â
And with this file i get errors even with a simple table.
If you can tell me how to fix this i will test it again and if necessary i provide a test case.
Thank you
10:05
24/04/2014
Hello Tony,
the following is a simple non working example:
Â
With sample data:
With this code you will receive the error message:
Uncaught TypeError: Cannot read property 'name' of undefined
If you remove one month in the "cells" array, there is no error but the pageviews_sum values in the table are wrong.
It would be very nice if you could run my example.
12:21
Moderators
30/10/2007
Hello,
Thanks for the test case. With the last code this works fine for me except that there was another bug which I will see how to fix.
I have put the new script in our demo site - you can see the demo index and load the script or download it.
To work your code you should put a converter function.It should look like this:
// pivot options
{
xDimension : [
{ dataName: 'browser', label: 'Browser', align: 'center'}
],
yDimension : [
{dataName: 'date_visit.year', label: 'Year'},
{dataName: 'date_visit.quarter', label: 'Quarter', converter: function(val, axVal, ayVal){
var ret;
switch (val) {
case "1":
ret = "First";
break;
case "2":
ret = "Second";
break;
case "3":
ret = "Third";
break;
}
return ret;
}
},
{dataName: 'date_visit.month', label: 'Month'}
],
aggregates : [
{member: 'pageviews_sum', aggregator : 'sum', label:'Sum of pageviews', summaryType: 'sum'}
],
rowTotals: false,
colTotals : false
},
// grid options
{
groupingView : { hideFirstGroupCol : true },
gridview: true,
rowNum : 10,
pager: "#pager",
caption: 'Website / Visits' },
{
reader : 'cells'
}
);
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
15:36
24/04/2014
Hello Tony,
thank you for your help!
Do you mean this file from the demo site?Â
http://trirand.com/blog/jqgrid......jqGrid.js
Thats strange because i get the same error with this file.
But it breaks with more data (The data above was only a part of my testdata)
Can you please test it with my full Response:
{
"summary": {},
"remainder": {},
"cells": [
{
"pageviews_sum": 233,
"pageviews_avg": 10.590909090909092,
"date_visit.year": 2012,
"date_visit.month": 1,
"pageviews_max": 18,
"date_visit.quarter": 1,
"browser": "Chrome"
},
{
"pageviews_sum": 208,
"pageviews_avg": 9.043478260869565,
"date_visit.year": 2012,
"date_visit.month": 2,
"pageviews_max": 19,
"date_visit.quarter": 1,
"browser": "Chrome"
},
{
"pageviews_sum": 206,
"pageviews_avg": 9.363636363636363,
"date_visit.year": 2012,
"date_visit.month": 3,
"pageviews_max": 28,
"date_visit.quarter": 1,
"browser": "Chrome"
},
{
"pageviews_sum": 178,
"pageviews_avg": 9.368421052631579,
"date_visit.year": 2012,
"date_visit.month": 4,
"pageviews_max": 20,
"date_visit.quarter": 2,
"browser": "Chrome"
},
{
"pageviews_sum": 118,
"pageviews_avg": 6.9411764705882355,
"date_visit.year": 2012,
"date_visit.month": 5,
"pageviews_max": 15,
"date_visit.quarter": 2,
"browser": "Chrome"
},
{
"pageviews_sum": 145,
"pageviews_avg": 7.25,
"date_visit.year": 2012,
"date_visit.month": 6,
"pageviews_max": 16,
"date_visit.quarter": 2,
"browser": "Chrome"
},
{
"pageviews_sum": 170,
"pageviews_avg": 8.947368421052632,
"date_visit.year": 2012,
"date_visit.month": 7,
"pageviews_max": 20,
"date_visit.quarter": 3,
"browser": "Chrome"
},
{
"pageviews_sum": 145,
"pageviews_avg": 8.529411764705882,
"date_visit.year": 2012,
"date_visit.month": 8,
"pageviews_max": 15,
"date_visit.quarter": 3,
"browser": "Chrome"
},
{
"pageviews_sum": 144,
"pageviews_avg": 6,
"date_visit.year": 2012,
"date_visit.month": 9,
"pageviews_max": 21,
"date_visit.quarter": 3,
"browser": "Chrome"
},
{
"pageviews_sum": 128,
"pageviews_avg": 7.111111111111111,
"date_visit.year": 2012,
"date_visit.month": 10,
"pageviews_max": 21,
"date_visit.quarter": 4,
"browser": "Chrome"
},
{
"pageviews_sum": 114,
"pageviews_avg": 6,
"date_visit.year": 2012,
"date_visit.month": 11,
"pageviews_max": 16,
"date_visit.quarter": 4,
"browser": "Chrome"
},
{
"pageviews_sum": 243,
"pageviews_avg": 9.346153846153847,
"date_visit.year": 2012,
"date_visit.month": 12,
"pageviews_max": 19,
"date_visit.quarter": 4,
"browser": "Chrome"
},
{
"pageviews_sum": 217,
"pageviews_avg": 7.75,
"date_visit.year": 2013,
"date_visit.month": 1,
"pageviews_max": 19,
"date_visit.quarter": 1,
"browser": "Chrome"
},
{
"pageviews_sum": 139,
"pageviews_avg": 8.6875,
"date_visit.year": 2013,
"date_visit.month": 2,
"pageviews_max": 20,
"date_visit.quarter": 1,
"browser": "Chrome"
},
{
"pageviews_sum": 166,
"pageviews_avg": 8.3,
"date_visit.year": 2013,
"date_visit.month": 3,
"pageviews_max": 20,
"date_visit.quarter": 1,
"browser": "Chrome"
},
{
"pageviews_sum": 204,
"pageviews_avg": 7.0344827586206895,
"date_visit.year": 2013,
"date_visit.month": 4,
"pageviews_max": 20,
"date_visit.quarter": 2,
"browser": "Chrome"
},
{
"pageviews_sum": 211,
"pageviews_avg": 7.535714285714286,
"date_visit.year": 2013,
"date_visit.month": 5,
"pageviews_max": 22,
"date_visit.quarter": 2,
"browser": "Chrome"
},
{
"pageviews_sum": 119,
"pageviews_avg": 7,
"date_visit.year": 2013,
"date_visit.month": 6,
"pageviews_max": 17,
"date_visit.quarter": 2,
"browser": "Chrome"
},
{
"pageviews_sum": 202,
"pageviews_avg": 8.08,
"date_visit.year": 2013,
"date_visit.month": 7,
"pageviews_max": 22,
"date_visit.quarter": 3,
"browser": "Chrome"
},
{
"pageviews_sum": 170,
"pageviews_avg": 8.5,
"date_visit.year": 2013,
"date_visit.month": 8,
"pageviews_max": 19,
"date_visit.quarter": 3,
"browser": "Chrome"
},
{
"pageviews_sum": 209,
"pageviews_avg": 8.708333333333334,
"date_visit.year": 2013,
"date_visit.month": 9,
"pageviews_max": 18,
"date_visit.quarter": 3,
"browser": "Chrome"
},
{
"pageviews_sum": 171,
"pageviews_avg": 7.125,
"date_visit.year": 2013,
"date_visit.month": 10,
"pageviews_max": 20,
"date_visit.quarter": 4,
"browser": "Chrome"
},
{
"pageviews_sum": 139,
"pageviews_avg": 6.95,
"date_visit.year": 2013,
"date_visit.month": 11,
"pageviews_max": 19,
"date_visit.quarter": 4,
"browser": "Chrome"
},
{
"pageviews_sum": 124,
"pageviews_avg": 8.266666666666667,
"date_visit.year": 2013,
"date_visit.month": 12,
"pageviews_max": 17,
"date_visit.quarter": 4,
"browser": "Chrome"
},
{
"pageviews_sum": 172,
"pageviews_avg": 9.555555555555555,
"date_visit.year": 2012,
"date_visit.month": 1,
"pageviews_max": 25,
"date_visit.quarter": 1,
"browser": "Firefox"
},
{
"pageviews_sum": 127,
"pageviews_avg": 7.9375,
"date_visit.year": 2012,
"date_visit.month": 2,
"pageviews_max": 21,
"date_visit.quarter": 1,
"browser": "Firefox"
},
{
"pageviews_sum": 123,
"pageviews_avg": 6.833333333333333,
"date_visit.year": 2012,
"date_visit.month": 3,
"pageviews_max": 19,
"date_visit.quarter": 1,
"browser": "Firefox"
},
{
"pageviews_sum": 136,
"pageviews_avg": 8.5,
"date_visit.year": 2012,
"date_visit.month": 4,
"pageviews_max": 16,
"date_visit.quarter": 2,
"browser": "Firefox"
},
{
"pageviews_sum": 71,
"pageviews_avg": 5.916666666666667,
"date_visit.year": 2012,
"date_visit.month": 5,
"pageviews_max": 14,
"date_visit.quarter": 2,
"browser": "Firefox"
},
{
"pageviews_sum": 150,
"pageviews_avg": 7.894736842105263,
"date_visit.year": 2012,
"date_visit.month": 6,
"pageviews_max": 22,
"date_visit.quarter": 2,
"browser": "Firefox"
},
{
"pageviews_sum": 135,
"pageviews_avg": 10.384615384615385,
"date_visit.year": 2012,
"date_visit.month": 7,
"pageviews_max": 22,
"date_visit.quarter": 3,
"browser": "Firefox"
},
{
"pageviews_sum": 112,
"pageviews_avg": 7,
"date_visit.year": 2012,
"date_visit.month": 8,
"pageviews_max": 11,
"date_visit.quarter": 3,
"browser": "Firefox"
},
{
"pageviews_sum": 195,
"pageviews_avg": 10.833333333333334,
"date_visit.year": 2012,
"date_visit.month": 9,
"pageviews_max": 18,
"date_visit.quarter": 3,
"browser": "Firefox"
},
{
"pageviews_sum": 162,
"pageviews_avg": 7.714285714285714,
"date_visit.year": 2012,
"date_visit.month": 10,
"pageviews_max": 15,
"date_visit.quarter": 4,
"browser": "Firefox"
},
{
"pageviews_sum": 137,
"pageviews_avg": 8.058823529411764,
"date_visit.year": 2012,
"date_visit.month": 11,
"pageviews_max": 18,
"date_visit.quarter": 4,
"browser": "Firefox"
},
{
"pageviews_sum": 119,
"pageviews_avg": 8.5,
"date_visit.year": 2012,
"date_visit.month": 12,
"pageviews_max": 20,
"date_visit.quarter": 4,
"browser": "Firefox"
},
{
"pageviews_sum": 157,
"pageviews_avg": 10.466666666666667,
"date_visit.year": 2013,
"date_visit.month": 1,
"pageviews_max": 27,
"date_visit.quarter": 1,
"browser": "Firefox"
},
{
"pageviews_sum": 166,
"pageviews_avg": 9.764705882352942,
"date_visit.year": 2013,
"date_visit.month": 2,
"pageviews_max": 18,
"date_visit.quarter": 1,
"browser": "Firefox"
},
{
"pageviews_sum": 172,
"pageviews_avg": 8.19047619047619,
"date_visit.year": 2013,
"date_visit.month": 3,
"pageviews_max": 21,
"date_visit.quarter": 1,
"browser": "Firefox"
},
{
"pageviews_sum": 180,
"pageviews_avg": 8.181818181818182,
"date_visit.year": 2013,
"date_visit.month": 4,
"pageviews_max": 19,
"date_visit.quarter": 2,
"browser": "Firefox"
},
{
"pageviews_sum": 162,
"pageviews_avg": 8.526315789473685,
"date_visit.year": 2013,
"date_visit.month": 5,
"pageviews_max": 17,
"date_visit.quarter": 2,
"browser": "Firefox"
},
{
"pageviews_sum": 141,
"pageviews_avg": 8.8125,
"date_visit.year": 2013,
"date_visit.month": 6,
"pageviews_max": 20,
"date_visit.quarter": 2,
"browser": "Firefox"
},
{
"pageviews_sum": 88,
"pageviews_avg": 9.777777777777779,
"date_visit.year": 2013,
"date_visit.month": 7,
"pageviews_max": 19,
"date_visit.quarter": 3,
"browser": "Firefox"
},
{
"pageviews_sum": 73,
"pageviews_avg": 6.636363636363637,
"date_visit.year": 2013,
"date_visit.month": 8,
"pageviews_max": 23,
"date_visit.quarter": 3,
"browser": "Firefox"
},
{
"pageviews_sum": 106,
"pageviews_avg": 9.636363636363637,
"date_visit.year": 2013,
"date_visit.month": 9,
"pageviews_max": 25,
"date_visit.quarter": 3,
"browser": "Firefox"
},
{
"pageviews_sum": 140,
"pageviews_avg": 7.777777777777778,
"date_visit.year": 2013,
"date_visit.month": 10,
"pageviews_max": 16,
"date_visit.quarter": 4,
"browser": "Firefox"
},
{
"pageviews_sum": 211,
"pageviews_avg": 8.791666666666666,
"date_visit.year": 2013,
"date_visit.month": 11,
"pageviews_max": 21,
"date_visit.quarter": 4,
"browser": "Firefox"
},
{
"pageviews_sum": 105,
"pageviews_avg": 7.5,
"date_visit.year": 2013,
"date_visit.month": 12,
"pageviews_max": 13,
"date_visit.quarter": 4,
"browser": "Firefox"
},
{
"pageviews_sum": 70,
"pageviews_avg": 8.75,
"date_visit.year": 2012,
"date_visit.month": 1,
"pageviews_max": 17,
"date_visit.quarter": 1,
"browser": "Lynx"
},
{
"pageviews_sum": 46,
"pageviews_avg": 11.5,
"date_visit.year": 2012,
"date_visit.month": 2,
"pageviews_max": 18,
"date_visit.quarter": 1,
"browser": "Lynx"
},
{
"pageviews_sum": 79,
"pageviews_avg": 9.875,
"date_visit.year": 2012,
"date_visit.month": 3,
"pageviews_max": 14,
"date_visit.quarter": 1,
"browser": "Lynx"
},
{
"pageviews_sum": 99,
"pageviews_avg": 7.615384615384615,
"date_visit.year": 2012,
"date_visit.month": 4,
"pageviews_max": 18,
"date_visit.quarter": 2,
"browser": "Lynx"
},
{
"pageviews_sum": 58,
"pageviews_avg": 8.285714285714286,
"date_visit.year": 2012,
"date_visit.month": 5,
"pageviews_max": 19,
"date_visit.quarter": 2,
"browser": "Lynx"
},
{
"pageviews_sum": 76,
"pageviews_avg": 7.6,
"date_visit.year": 2012,
"date_visit.month": 6,
"pageviews_max": 20,
"date_visit.quarter": 2,
"browser": "Lynx"
},
{
"pageviews_sum": 46,
"pageviews_avg": 11.5,
"date_visit.year": 2012,
"date_visit.month": 7,
"pageviews_max": 26,
"date_visit.quarter": 3,
"browser": "Lynx"
},
{
"pageviews_sum": 83,
"pageviews_avg": 8.3,
"date_visit.year": 2012,
"date_visit.month": 8,
"pageviews_max": 17,
"date_visit.quarter": 3,
"browser": "Lynx"
},
{
"pageviews_sum": 34,
"pageviews_avg": 6.8,
"date_visit.year": 2012,
"date_visit.month": 9,
"pageviews_max": 15,
"date_visit.quarter": 3,
"browser": "Lynx"
},
{
"pageviews_sum": 73,
"pageviews_avg": 8.11111111111111,
"date_visit.year": 2012,
"date_visit.month": 10,
"pageviews_max": 20,
"date_visit.quarter": 4,
"browser": "Lynx"
},
{
"pageviews_sum": 30,
"pageviews_avg": 6,
"date_visit.year": 2012,
"date_visit.month": 11,
"pageviews_max": 8,
"date_visit.quarter": 4,
"browser": "Lynx"
},
{
"pageviews_sum": 2,
"pageviews_avg": 2,
"date_visit.year": 2012,
"date_visit.month": 12,
"pageviews_max": 2,
"date_visit.quarter": 4,
"browser": "Lynx"
},
{
"pageviews_sum": 83,
"pageviews_avg": 6.916666666666667,
"date_visit.year": 2013,
"date_visit.month": 1,
"pageviews_max": 15,
"date_visit.quarter": 1,
"browser": "Lynx"
},
{
"pageviews_sum": 48,
"pageviews_avg": 12,
"date_visit.year": 2013,
"date_visit.month": 2,
"pageviews_max": 19,
"date_visit.quarter": 1,
"browser": "Lynx"
},
{
"pageviews_sum": 72,
"pageviews_avg": 8,
"date_visit.year": 2013,
"date_visit.month": 3,
"pageviews_max": 15,
"date_visit.quarter": 1,
"browser": "Lynx"
},
{
"pageviews_sum": 25,
"pageviews_avg": 6.25,
"date_visit.year": 2013,
"date_visit.month": 4,
"pageviews_max": 14,
"date_visit.quarter": 2,
"browser": "Lynx"
},
{
"pageviews_sum": 83,
"pageviews_avg": 11.857142857142858,
"date_visit.year": 2013,
"date_visit.month": 5,
"pageviews_max": 21,
"date_visit.quarter": 2,
"browser": "Lynx"
},
{
"pageviews_sum": 25,
"pageviews_avg": 5,
"date_visit.year": 2013,
"date_visit.month": 6,
"pageviews_max": 10,
"date_visit.quarter": 2,
"browser": "Lynx"
},
{
"pageviews_sum": 145,
"pageviews_avg": 8.529411764705882,
"date_visit.year": 2013,
"date_visit.month": 7,
"pageviews_max": 16,
"date_visit.quarter": 3,
"browser": "Lynx"
},
{
"pageviews_sum": 96,
"pageviews_avg": 10.666666666666666,
"date_visit.year": 2013,
"date_visit.month": 8,
"pageviews_max": 16,
"date_visit.quarter": 3,
"browser": "Lynx"
},
{
"pageviews_sum": 19,
"pageviews_avg": 3.8,
"date_visit.year": 2013,
"date_visit.month": 9,
"pageviews_max": 9,
"date_visit.quarter": 3,
"browser": "Lynx"
},
{
"pageviews_sum": 36,
"pageviews_avg": 7.2,
"date_visit.year": 2013,
"date_visit.month": 10,
"pageviews_max": 14,
"date_visit.quarter": 4,
"browser": "Lynx"
},
{
"pageviews_sum": 69,
"pageviews_avg": 8.625,
"date_visit.year": 2013,
"date_visit.month": 11,
"pageviews_max": 22,
"date_visit.quarter": 4,
"browser": "Lynx"
},
{
"pageviews_sum": 9,
"pageviews_avg": 4.5,
"date_visit.year": 2013,
"date_visit.month": 12,
"pageviews_max": 7,
"date_visit.quarter": 4,
"browser": "Lynx"
}
],
"aggregates": [
"pageviews_sum",
"pageviews_avg",
"pageviews_max"
],
"cell": [],
"levels": {
"date_visit": [
"year",
"quarter",
"month"
],
"browser": [
"browser"
]
}
}
Â
Thank you very much.
12:02
Moderators
30/10/2007
Hello,
Will look into this these days and will replay. Eventually I will post a code.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
11:41
Moderators
30/10/2007
Hello,
Well with this data I have error too.
Currently I investigate the problem and will post you a solution.
Thank you for the test case and patience.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
10:06
Moderators
30/10/2007
Hello,
I have found the bug. It is little difficult to fix this. I always will fix this.
Thanks for the code and test case.
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
13:34
Moderators
30/10/2007
Hello,
Â
Just have made the fix. This is maybe my hardest fix that i have made for the grid.
I'm just making last tests (some other small fixes) and will let you know.
I hope that next week you will be able to use the pivot.
Kind Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
67 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66