PDA

View Full Version : [OPEN-663] Chart loses labelRenderer after hide/show



extjs@peacetech.com
25 Feb 2010, 8:03 PM
Ext 3.2 rev 6165 yahoo chart 2.8r4 I believe
I have a LineChart with time series aAxis on a tab panel
After switching to a different tab and then back to the tab with chart it loses xAxis renderer. I verified it does not get called any more after tab switch.

Jamie Avins
26 Feb 2010, 8:30 AM
Can you also let us know what Browser you tested this on.

extjs@peacetech.com
26 Feb 2010, 11:07 AM
Can you also let us know what Browser you tested this on.

Sorry it happens in FireFox 3.6. On Win7 (not sure if it happens on any other platforms)
It works fine in IE8 strict and compat modes.

In FF when I switch tab back to chart it does complete refresh of the chart and it loses time series renderer

ovan
13 May 2010, 6:00 AM
I have the same problem with Windows 7 and FF 3.6.3 and ExtJS 3.2.1.
IE 8 works fine.

asagala
28 Jun 2010, 10:49 AM
I have the same issue on same environement as above

Stsalomon90
2 Jul 2010, 7:42 AM
I can confirm the same issue on linux (Fedora 11) with Firefox 3.5.9.

Condor
2 Jul 2010, 7:55 AM
Is this a Flash reflow problem?

Does the Ext.ux.plugin.VisibilityMode plugin (http://code.google.com/p/uxmedia/source/browse/trunk/source/media22/uxvismode.js) fix it?

Stsalomon90
2 Jul 2010, 8:28 AM
That doesn't appear to have fixed the issue. To be clear the chart is re-rendered when you switch back to its tab however the labelRenders are no longer called.

thosimo
7 Jul 2010, 7:42 AM
Is this a bug in Ext-js,
I have the same issue on XP and firefox but it worked in IE.

Is there a workarount?

best regards.

KimSchneider
9 Jul 2010, 2:37 AM
Are you working on a solution?

Got the same problem with my labelRenderer. Got a tab panel with several charts, after I reswitch to the first tab, the label isnt rendered anymore.

Jamie Avins
13 Jul 2010, 10:13 AM
I'll try an re-prioritize it and see if we can't at least find a workaround for the problem.

gopelaez
2 Aug 2010, 7:35 AM
Are there any updates on this issue?

KimSchneider
2 Aug 2010, 9:34 PM
I'll try an re-prioritize it and see if we can't at least find a workaround for the problem.

You should think about using http://code.google.com/p/flot/

It's a pure JS chart, you are a JS framework, so why not?! Should be easy to integrate.

cplist
3 Sep 2010, 9:56 AM
I got around this issue by overriding the class that deals w/ labelRenderer. For whatever reason the original code deletes the labelRenderer once it's initially rendered. I'm not sure why the delete is specifically there, but commenting it out does the trick. So stick this near the top of your code.


// don't delete the labelRenderer!
Ext.override(Ext.chart.CartesianChart,{
createAxis : function(axis, value){
var o = Ext.apply({}, value),
ref,
old;

if(this[axis]){
old = this[axis].labelFunction;
this.removeFnProxy(old);
this.labelFn.remove(old);
}
if(o.labelRenderer){
ref = this.getFunctionRef(o.labelRenderer);
o.labelFunction = this.createFnProxy(function(v){
return ref.fn.call(ref.scope, v);
});
// delete o.labelRenderer; // troublemaker!
this.labelFn.push(o.labelFunction);
}
if(axis.indexOf('xAxis') > -1 && o.position == 'left'){
o.position = 'bottom';
}
return o;
}
});

smcneill
18 Feb 2011, 10:54 AM
The suggested override works for me, but I'm interested in whether or nor this will be fixed in the future. It seems really odd that the labelRenderer gets deleted, yet it is clearly needed after a hide/show operation.