PDA

View Full Version : weekdays and time in pivot grid headers



raj_plays
24 Feb 2011, 9:58 AM
Hi,
My PivotGrid displays Weekdays on the top axis and hours(0 to 24) on the left axis.
The problem is that it sorts the weekdays so that the first column is Friday, then Monday and so on.
I want them in their natural order starting with Sunday.
Another problem is that on the left axis, the first value of 0 is not displayed.
Please help solve these.


var statistics = Ext.data.Record.create([
{name: 'day', type: 'string'},
{name: 'hour', type: 'int'}
]);

new Ext.grid.PivotGrid({
store : statisticsDataStore,
measure: 'duration',
aggregator: 'sum',
topAxis: [{dataIndex: 'day', direction: 'ASC', width: 80}],
leftAxis: [{dataIndex: 'hour', direction: 'DESC', width: 30}]
.....
});