Forum
12:14
Moderators
30/10/2007
Hello,
Can you please post a test case for this problem?
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.
12:58
24/04/2014
Yes of course.
var grid = jQuery("#grid").jqGrid('jqPivot',
"data.json",
{
xDimension : [
{
dataName: 'date_visit.year',
align: 'center'
},
],
yDimension : [
{dataName: 'source.source_label'},
{dataName: 'browser'},
],
aggregates : [
{member: 'pageviews_sum', aggregator : 'sum', width:50, label:'Sum of pageviews', summaryType: 'sum'},
{member: 'pageviews_avg', aggregator : 'sum', width:50, label:'Average of pageviews', summaryType: 'sum'},
],
rowTotals: false,
colTotals : false
},
// grid options
{
groupingView : {
hideFirstGroupCol : true
},
gridview: false,
loadtext: 'Bitte warten',
loadui: 'block',
shrinkToFit:false,
rowNum : 10,
pager: "#pager",
caption: 'webvisits'
},
{ reader : 'cells' }
);
});
{
"summary": {},
"remainder": {},
"cells": [
{
"source.source_label": "Direct link",
"pageviews_sum": 116010,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Direct_link",
"browser": "Chrome"
},
{
"source.source_label": "Direct link",
"pageviews_sum": 117321,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Direct_link",
"browser": "Firefox"
},
{
"source.source_label": "Direct link",
"pageviews_sum": 119346,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Direct_link",
"browser": "Lynx"
},
{
"source.source_label": "Unknown",
"pageviews_sum": 115723,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Unknown",
"browser": "Chrome"
},
{
"source.source_label": "Unknown",
"pageviews_sum": 112487,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Unknown",
"browser": "Firefox"
},
{
"source.source_label": "Unknown",
"pageviews_sum": 112685,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Unknown",
"browser": "Lynx"
},
{
"source.source_label": "Web search",
"pageviews_sum": 114041,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Web_search",
"browser": "Chrome"
},
{
"source.source_label": "Web search",
"pageviews_sum": 112181,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Web_search",
"browser": "Firefox"
},
{
"source.source_label": "Web search",
"pageviews_sum": 117329,
"pageviews_avg": 20,
"date_visit.year": 2012,
"source.source_id": "Web_search",
"browser": "Lynx"
},
{
"source.source_label": "Direct link",
"pageviews_sum": 113345,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Direct_link",
"browser": "Chrome"
},
{
"source.source_label": "Direct link",
"pageviews_sum": 111848,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Direct_link",
"browser": "Firefox"
},
{
"source.source_label": "Direct link",
"pageviews_sum": 111196,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Direct_link",
"browser": "Lynx"
},
{
"source.source_label": "Unknown",
"pageviews_sum": 112940,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Unknown",
"browser": "Chrome"
},
{
"source.source_label": "Unknown",
"pageviews_sum": 114079,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Unknown",
"browser": "Firefox"
},
{
"source.source_label": "Unknown",
"pageviews_sum": 113435,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Unknown",
"browser": "Lynx"
},
{
"source.source_label": "Web search",
"pageviews_sum": 114373,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Web_search",
"browser": "Chrome"
},
{
"source.source_label": "Web search",
"pageviews_sum": 111530,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Web_search",
"browser": "Firefox"
},
{
"source.source_label": "Web search",
"pageviews_sum": 114705,
"pageviews_avg": 20,
"date_visit.year": 2013,
"source.source_id": "Web_search",
"browser": "Lynx"
}
],
"aggregates": [
"pageviews_sum",
"pageviews_avg"
],
"cell": [],
"levels": {
"source": [
"source"
],
"date_visit": [
"year"
],
"browser": [
"browser"
]
}
}
I noticed some other problems with the ydimension. I attach some Screenshots later.
13:10
24/04/2014
If i use a yDimension with only two entries, the column grouping ist right but the first value is used twice.
The second value should be Yes, as you can see in this screenshot ( i only changed the order of the dimensions):
By the way, thank you for this great plugin 🙂
Edit: I realised that this problem also exists in the example from the last post. You can see tha there are 3 source.source_label entries but only two are used. (Directlink and Websearch, unknown is missing)
14:41
Moderators
30/10/2007
Hello,
Thanks. Will look at the code later this weekend.
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.
Most Users Ever Online: 715
Currently Online:
79 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