View Full Version : [4.2.x] Gradients are not rendered after chart hide/show

27 Nov 2013, 1:46 AM
Browsers versions tested against, both OSX10.8.5 and Windows7:

Chrome 31.0.1650.57 - not ok

Firefox 25.0.1- not ok

Safari 6.1 (8537.71) - not ok

IE10/9 - ok

Having a few SVG bugs lately on Firefox which have been confirmed on bugzilla and because on IE the issue doesn't occur, I suppose this one could be a browser bug also. The example from fiddle is a little dump, as I got it from my client, but is just a test case and is enough to replicate the issue.

Steps to reproduce:
Just open the fiddle in any browser from above list, and play a little with hide and show buttons.Usually the issue occurs on second hide - the gradients on the other visible charts are not rendered, are black.

If I change hideMode from "display" to "visibility" then no issue.


27 Nov 2013, 6:23 AM

Gradient ids must be unique for all gradients defined in the DOM including even chart instances of the same chart class.

You are repeating ids. Make these ids unique, otherwise you will have problems on some browsers.

27 Nov 2013, 6:52 AM
Hmmm, a little strange tough makes sense. Was blinded because of IE, thx.

28 Nov 2013, 6:40 AM
I think we would need a feature request for the case when one theme is needed to be used for more charts. I've had to add a workaround for this, and override Ext.chart.theme.Theme.initTheme to pass chart.id to the theme and build gradients ids based on chart's ID.