TheWitness Report post Posted September 28, 2020 (edited) I've just recently upgrade from 3.11.x to 3.15.2 and it solved a "massive" memory leak, so thanks. However, when I try to clone() a chart now, either by the charts Id or through it's variable name, it's coming back with no data to display. Code looks something like this: <snip> if (FusionCharts(chartid)) { //var newPanel = FusionCharts(chartid).clone(); var newPanel = charts[panel].clone(); newPanel.render('fullscreen') newPanel.resizeTo(width, height); } <snip> The array charts[panel] holds the chart object, but you can see the line above the clode, which was the way I was cloning it before upgrading. Tried both way and nada. Thanks, TheWitness Edited September 28, 2020 by TheWitness Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted September 29, 2020 Hi, Here is a demo of clone api using the latest version - http://jsfiddle.net/3fye14xo/ Please update the fiddle by replicating the problem. Thanks, Ayan Share this post Link to post Share on other sites
TheWitness Report post Posted September 29, 2020 That's what I used as the model for the clone() in the first place, and thanks for that. It was working prior to the update to 3.15.2. Let me have a look though. Before I was searching the DOM for the chart object, and I did not assign and "id" in the "new FusionCharts({})" call of the parent object. So, there were other changes. But it's presently close to the jsfiddle example. Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted September 29, 2020 Please revert back with a demo if you are still facing the problem. Share this post Link to post Share on other sites
TheWitness Report post Posted September 30, 2020 (edited) I did multiple things Ayan and nothing worked. The big change that I did was label the object using the following: FusionCharts({ id: 'chart_pane_id', ... }); As soon as I name the ID of the object using that call, the clone basically starts complaining that it can not find data and says no data to display even though when I use the debugger, the parent dom object has the right ID and the FusionCharts(chart_panel_id) returns object as expected. The clone simply fails, the resize just fails. Could it be that the use of the JSON tag "id" though it works, is not supported? By the way, I was able to clone the SVG using jQuery just fine and insert it, but then I lost the ability to resize Basically: var chartObject = $('#chart_panel_id') $(''#fullscreen').html(chartObject); Edited September 30, 2020 by TheWitness Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted October 5, 2020 Please fork the demo and share the updated sample - http://jsfiddle.net/3fye14xo/ I will take a look. Share this post Link to post Share on other sites
TheWitness Report post Posted October 5, 2020 How can I do that using the 3.1.5.2? I don't see a way to include that version of the library. Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted October 8, 2020 3.15.2 demo - https://jsfiddle.net/tg1x9jbn/ Share this post Link to post Share on other sites
TheWitness Report post Posted June 2, 2021 Ayan, Just getting back to this now. I think I see the problem. The chart that was properly cloned (I guess), but the "originalDataSource" value is set to undefined. On the original chart, the originalDataSource was populated via a callback with XML data. Do I have to grab the data again via a callback, or is there a way to clone that data as well? Larry Share this post Link to post Share on other sites
TheWitness Report post Posted June 2, 2021 Okay, figured it out. I not only had to clone the chart, but insert the data: <snip> var newPanel = charts[panel].clone(); var chart_xml = charts[panel].originalDataSource; newPanel.setXMLData(chart_xml); newPanel.render('fullscreen') newPanel.resizeTo(width, height); <snip> Share this post Link to post Share on other sites