Problem
While using Ext.ux.Chart.OFC.Panel I have encountered problems with statically delivered data (from js). I made panel embedding ofc panel, and I have created ofc panel in the simplest way (in my opinion):


this.chart = new Ext.ux.Chart.OFC.Panel ({
chartURL: 'shared/open-flash-chart/open-flash-chart.swf',
width: this.width,
height: this.height,
ofcCfg:{
autoSize : true
},
chartData: this.data
});


Ok, it works perfectly in FF but IE cries with #2032 error from OFC - which means no data to load was found. I have spent some time on reading forums (ExtJS, OFC) but without luck.

Solution
Finally while experimenting/debugging (PITA factor for IE is high here) I found finally two solutions:

1. You can extend ofc panel config by adding mediaMask="Whatever" and autoMask = true, loadMask is optional in this case:

mediaMask: 'Loading chart...',
autoMask: true,


2. Your can add random value to URL pointing to SWF file

chartURL: 'shared/open-flash-chart/open-flash-chart.swf?r='+Math.random(),


Hopefully it will save someone's plenty of time.

Remarks
Open Flash Chart is open source LGPL licenced flash chart component.

Ext.ux.Chart is part of Ext.ux.Media developed by Active Group and licenced under GPL3 licence.

1 comments:

Thanks a lot! this had me going mad for months...

August 27, 2009  

Newer Post Older Post Home