Bleak
21 Oct 2010, 2:13 PM
Hey Everyone,
I've been using the PivotGrid (Nice, btw) and it is incredibly straight-forward to use. However, I have problem with the rendering of the PivotGrid.
Whenever I render the grid, the leftAxis values are much larger than the value rows that are rendered (see screenshot)
22971
I've tried all the various layouts (fit, auto, etc). This specific one has the layout as 'auto'. I want to add this actual pivotGrid to a VBOX Region on another panel and I also do not want to have to specify it's height as it is quite dyamic.
I've looked at the samples, almost all of them set the height of the pivotgrid, so hopefully this isn't a requirement.
Here is the code I used to generate this specific one;
myWin = new Ext.Window({width: 500, height: 500, layout: 'auto'});
myWin.show()
myPivot = new Ext.grid.PivotGrid({
store : new RaciDAO({autoLoad: false}).getStore(),
aggregator : 'sum',
measure : 'raci',
renderer : function(value) {
switch (value) {
case 1:
return 'R';
break;
case 2:
return 'A';
break;
case 3:
return 'C';
break;
case 4:
return 'I';
break;
default :
return ''
}
},
leftAxis : [
{
width : 150,
dataIndex : 'deliverable'
}
],
topAxis : [
{
width : 50,
dataIndex : 'roleName',
orientation : 'vertical'
}
]
});
myPivot.getStore().setBaseParam('projectId', 27);
myPivot.getStore().load();
myWin.add(myPivot);
myWin.doLayout();
I've been using the PivotGrid (Nice, btw) and it is incredibly straight-forward to use. However, I have problem with the rendering of the PivotGrid.
Whenever I render the grid, the leftAxis values are much larger than the value rows that are rendered (see screenshot)
22971
I've tried all the various layouts (fit, auto, etc). This specific one has the layout as 'auto'. I want to add this actual pivotGrid to a VBOX Region on another panel and I also do not want to have to specify it's height as it is quite dyamic.
I've looked at the samples, almost all of them set the height of the pivotgrid, so hopefully this isn't a requirement.
Here is the code I used to generate this specific one;
myWin = new Ext.Window({width: 500, height: 500, layout: 'auto'});
myWin.show()
myPivot = new Ext.grid.PivotGrid({
store : new RaciDAO({autoLoad: false}).getStore(),
aggregator : 'sum',
measure : 'raci',
renderer : function(value) {
switch (value) {
case 1:
return 'R';
break;
case 2:
return 'A';
break;
case 3:
return 'C';
break;
case 4:
return 'I';
break;
default :
return ''
}
},
leftAxis : [
{
width : 150,
dataIndex : 'deliverable'
}
],
topAxis : [
{
width : 50,
dataIndex : 'roleName',
orientation : 'vertical'
}
]
});
myPivot.getStore().setBaseParam('projectId', 27);
myPivot.getStore().load();
myWin.add(myPivot);
myWin.doLayout();