PDA

View Full Version : [OPEN] graph takes full screen when window is big



jep
16 Nov 2012, 2:45 PM
ST 2.1.0 gpl:

I'm running into a problem where at a certain browser window size, the chart goes kind of nutty and messes with the other widgets on the screen. I've managed to isolate it into this test case:


Ext.application({
launch:function () {
this.viewport =
Ext.create('Ext.Panel', {
fullscreen:true,
layout:'fit',
items:[
{
xtype:'chart',
store:Ext.create('Ext.data.Store', {
fields:[
{ name:'x', type:'float' },
{ name:'y', type:'float' }
],
data:[
]
}),
series:[
{type:'line', xField:'x', yField:'y'},
{type:'line', xField:'x', yField:'y'},
{type:'line', xField:'x', yField:'y'},
{type:'line', xField:'x', yField:'y'},
{type:'line', xField:'x', yField:'y'},
{type:'line', xField:'x', yField:'y'}
],
axes:[
{
type:'numeric',
position:'left',
fields:['y']
},
{
type:'numeric',
position:'bottom',
fields:['x']
}
]
},
{
xtype:'toolbar',
docked:'top',
title:'top'
},
{
xtype:'toolbar',
docked:'bottom',
title:'bottom'
}
]
});
}
});


What happens is that I see the screen first paint with the top and bottom toolbars showing. Then it repaints and the toolbars are gone and the chart is taking up the entire screen.

I run this in a maximized Chrome window (no dev tools showing) that winds up having document.body.clientWidth/Height = 1920/957. If I make it much smaller than that in either direction, the problem goes away. I also get this on multiple machines. I haven't tested it on a tablet because I don't have any that are nearly that high res.

mitchellsimoens
19 Nov 2012, 10:58 AM
Thanks for the report! I have opened a bug in our bug tracker.