PDA

View Full Version : Graph Rendering Issue in Ext 4.1 RC 2



jinionnet
16 Apr 2012, 4:19 AM
Hi Guys,
Is anybody else facing an issue with graph rendering in ExtJS 4.1 RC2/RC3? My application was perfectly working in 4.0.7 but now all the graphs are broken up and one of my graph event produces the following error also.

Console error from chrome developer console.

uncaught TypeError: Cannot call method 'getFullYear' of undefined
Ext.Date.getLastDateOfMonth
Ext.define.initUtilizationGraph.graphStore.load.callback
Ext.apply.callback

Please share your experience.
Thanks,
Jini

scottmartin
16 Apr 2012, 8:48 AM
Have you checked for possible API changes in docs in relation to your calls?

If you look at the offending lines using FireBug,
do you see the value that is not resolving to a date for getFullYear?

Scott.

jinionnet
17 Apr 2012, 9:59 AM
Hi Scott,
I am only using basic graph configuration, created by Designer. Even after removing the Ext.Date.getLastDateOfMonth from my axis rendering section, still broken up. Is there any known bugs for graph in 4.1?

Thanks,
jini



Have you checked for possible API changes in docs in relation to your calls?

If you look at the offending lines using FireBug,
do you see the value that is not resolving to a date for getFullYear?

Scott.

scottmartin
17 Apr 2012, 10:25 AM
Can you provide a basic working example that we can use to reproduce this?

Scott.

jinionnet
18 Apr 2012, 2:09 AM
Hi Scott,
I herewith attached different screenshot for 4.0.7 and 4.1 RC3. Also adding the source code. Kindly review these snippets.

NB: Please note that the Y axis is missing for graph in RC3.





Ext.define('APPL.view.ui.SDGraphTest', {
extend: 'Ext.window.Window',
height: 524,
width: 671,
layout: {
type: 'fit'
},
title: 'SD Graph Test',
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'chart',
height: 250,
animate: true,
insetPadding: 20,
store: 'SDGraphStore',
axes: [
{
type: 'Category',
fields: [
'HMTX_SD_ID'
],
position: 'left',
title: 'Category Axis',
categoryNames: [
'HMTX_SD_DESC'
]
},
{
type: 'Numeric',
grid: true,
fields: [
'X'
],
position: 'bottom',
title: 'Provider Count',
decimals: 0,
label: {
renderer: function (v) { return Ext.util.Format.number(v, '000,0'); }
}
}
],
series: [
{
type: 'bar',
highlight: true,
tips: {
trackMouse: true,
width: 300,
height: 28,
renderer: function (storeItem, item) {
this.setTitle(storeItem.get('HMTX_SD_DESC'));
}
},
label: {
display: 'insideEnd',
field: 'COUNT',
color: '#333',
'text-anchor': 'middle',
renderer: function (v) { return Ext.util.Format.number(v, '000,0'); }
},
axis: 'bottom',
yField: [
'COUNT'
]
}
]
}
]
});


me.callParent(arguments);
}
});




Thanks,
Jini

jinionnet
2 May 2012, 12:48 AM
Hi All,
I have fixed the issue by adding minimum:0 configuration value.

Thanks to all,
Jini

jinionnet
2 May 2012, 12:49 AM
As you know minimum config value for numeric axis.


Hi All,
I have fixed the issue by adding minimum:0 configuration value.

Thanks to all,
Jini