Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Pivot: Wrong Column Grouping
16/05/2014
11:20
Avatar
stapelchip
Member
Members
Forum Posts: 20
Member Since:
24/04/2014
sp_UserOfflineSmall Offline

Hello,

The column grouping is wrong with more than one yDimension.

[Image Can Not Be Found]

19/05/2014
12:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

21/05/2014
12:58
Avatar
stapelchip
Member
Members
Forum Posts: 20
Member Since:
24/04/2014
sp_UserOfflineSmall Offline

Yes of course.

jQuery(document).ready(function(){
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.

21/05/2014
13:10
Avatar
stapelchip
Member
Members
Forum Posts: 20
Member Since:
24/04/2014
sp_UserOfflineSmall Offline

If i use a yDimension with only two entries, the column grouping ist right but the first value is used twice.

http://i62.tinypic.com/2hhoupd.pngImage Enlarger

The second value should be Yes, as you can see in this screenshot ( i only changed the order of the dimensions):

http://i62.tinypic.com/okvspg.pngImage Enlarger

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)

22/05/2014
14:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
53 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information