evang
13 Aug 2010, 8:07 AM
Please see the image (attachment) and this code below to reproduce the problem.
1. Using border layout
2. Using the code below
then we get display problem with leftAxis. Any idea how to solve the problem, please? thx.
var grid = Ext.extend(Ext.grid.PivotGrid, {
initComponent: function () {
var Record = Ext.data.Record.create([{
name: 'crname',
type: 'string'
},
{
name: 'crp_raw',
type: 'string'
},
{
name: 'crqlt_raw',
type: 'string'
},
{
name: 'crtqty_raw',
type: 'int'
},
{
name: 'crtpercent',
type: 'int'
}]);
var store = new Ext.data.Store({
url: 'simple.json',
reader: new Ext.data.JsonReader({
totalProperty: 'total',
idProperty: 'id',
root: 'data'
}, Record)
});
var config = {
viewConfig: {
title: 'Performance'
},
store: store,
aggregator: 'sum',
measure: 'crtpercent',
leftAxis: [{
width: 25,
dataIndex: 'crp_raw'
},
{
width: 100,
dataIndex: 'crname'
}],
topAxis: [{
dataIndex: 'crqlt_raw'
}]
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
grid.superclass.initComponent.apply(this, arguments);
},
onRender: function () {
this.store.load();
grid.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('test_pivot', grid);
21947
1. Using border layout
2. Using the code below
then we get display problem with leftAxis. Any idea how to solve the problem, please? thx.
var grid = Ext.extend(Ext.grid.PivotGrid, {
initComponent: function () {
var Record = Ext.data.Record.create([{
name: 'crname',
type: 'string'
},
{
name: 'crp_raw',
type: 'string'
},
{
name: 'crqlt_raw',
type: 'string'
},
{
name: 'crtqty_raw',
type: 'int'
},
{
name: 'crtpercent',
type: 'int'
}]);
var store = new Ext.data.Store({
url: 'simple.json',
reader: new Ext.data.JsonReader({
totalProperty: 'total',
idProperty: 'id',
root: 'data'
}, Record)
});
var config = {
viewConfig: {
title: 'Performance'
},
store: store,
aggregator: 'sum',
measure: 'crtpercent',
leftAxis: [{
width: 25,
dataIndex: 'crp_raw'
},
{
width: 100,
dataIndex: 'crname'
}],
topAxis: [{
dataIndex: 'crqlt_raw'
}]
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
grid.superclass.initComponent.apply(this, arguments);
},
onRender: function () {
this.store.load();
grid.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('test_pivot', grid);
21947