PDA

View Full Version : How to get full SVG of un-rendered charts?



KartoPete
18 Jan 2012, 1:20 AM
I have charts inside different tabs in a tabpanel. For printing and conversion to images I need the full SVG from those charts. I can get it from the DOM, I know... BUT, the DOM has only the full SVG from the graph if once it has been displayed. What I need is the full SVG from all graphs inside those tabs, regardless of the tab has been opened and shown or not.
Is this possible? Has anyone found a solution to this problem?
Maybe there is a method to render those charts? I couldn't find any method that inserts the full SVG into the DOM. Must be the render engine, is there a way to directly use the engine and force the creation of the SVG in the initialization of the chart.
Cheers,
Peter

mitchellsimoens
18 Jan 2012, 6:31 AM
By default, the tabs aren't rendered due to deferredRender (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tab.Panel-cfg-deferredRender)... then you would have to get the source out of the DOM but you said you know how to do that, just need to get the tabs to render... just be careful of performance.

KartoPete
18 Jan 2012, 8:39 AM
OK, thx, I'll check that out. At the moment I flicker through all tabs be activating them with a series of DelayedTask's after the callParent within the initComponent() of the tabpanel.
What kind of performance issues are usally coming up with charts?
Cheers,
Peter