PDA

View Full Version : Extjs LineChart doesn't show on IE (blank panel)



pfernandom
5 Oct 2009, 8:33 AM
I used this example code to made a linechart:




var store = new Ext.data.JsonStore({
fields:['name', 'visits', 'views', 'otro'],
data: [
{name:'Jul 07', visits: 245000, views: 300000},
{name:'Aug 07', visits: 240000, views: 350000},
{name:'Sep 07', visits: 355000, views: 400000},
{name:'Oct 07', visits: 375000, views: 420000},
{name:'Nov 07', visits: 490000, views: 450000},
{name:'Dec 07', visits: 495000, views: 580000},
{name:'Jan 08', visits: 520000, views: 600000},
{name:'Feb 08', visits: 620000, views: 750000}
]
});

// extra simple

new Ext.Panel({
//iconCls:'chart',

//title: 'Prueba de grafica de lineas',

frame:true,
renderTo: 'container',
width:800,
height:600,
//layout:'fit',


items:[{
xtype: 'linechart',
store: store,
url: 'charts.swf',
xField: 'name',
//xField: 'views',

yAxis: new Ext.chart.NumericAxis({
title: 'Visitas',
displayName: 'Visitas',
labelRenderer : Ext.util.Format.numberRenderer('0,0')
}),
tipRenderer : function(chart, record){
return Ext.util.Format.number(record.data.visits, '0,0') + ' visits in ' + record.data.name;
},
series: [{
type:'line',
displayName: 'Visitas',
yField: 'visits'

},{
type:'line',
displayName: 'Vistas,',
yField: 'views',
style:{color:0xf00000}
}]
}]
});


and it shows in Firefox, but not in IE. And it doesn't report any error.

I've searched why happens this, but I can't find it.


Do I need no install something in IE, download a plugin, set an extra parameter in the declaration of the chart??

Thanks in advance :D

5 Oct 2009, 9:25 AM
set the panel to layout : 'fit', does that work?

pfernandom
5 Oct 2009, 9:29 AM
I have made some tests using (in other server) Dreamweaver, and this code does work in IE, but in my own server it does not work. I think it has something to do with the way that the page charges the chart.swf file, but if it renders on Firefox, it should render in IE with the same path, no?

pfernandom
5 Oct 2009, 9:31 AM
thanks jgarcia, but with or without "layout:'fit'", happens the same...

:s

Condor
5 Oct 2009, 10:42 AM
Are you trying the render the chart inside a <form> tag (or does your server automatically add a form tag around the content)?

5 Oct 2009, 11:29 AM
does charts.swf actually exist in the location of the page being loaded?

widen-av
10 Mar 2010, 9:44 AM
Make sure you have a working Flash plugin installed in IE and also make sure you are not running the 64-bit version of IE (http://kb2.adobe.com/cps/000/6b3af6c9.html). When the charts fail to load there is currently no message displaying a generic message that indicates why, even if it's just that the user has no Flash plugin installed.

sothea
5 Jul 2011, 12:19 AM
I display date in the EditGridePanel in IE but it doesn't work. It doesn't work for date type only. For other types are work correctly. Please help me!

skirtle
5 Jul 2011, 3:33 PM
@sothea: Your question doesn't appear to have anything to do with this thread. Please start a new thread and include some example code that shows your problem.