rafal Report post Posted August 14, 2009 I have few charts on page. I want to export few of them. That is my code : //Function that creates element to save chart as an image or in PDF format function createChartExportElement(){ //Create dragable box printDragableBox('fcexpDiv','Save chart',0,100,100,410,0); //Render the export component in dragable box var myExportComponent = new FusionChartsExportObject("fcExporter1", "/charts/FusionCharts/FCExporter.swf",{defaultExportFormat: 'pdf'}); //Set configuration //Full Mode myExportComponent.debugMode = true; myExportComponent.checkFlashVersion = true; myExportComponent.sourceCharts = ['chart_tab0pan1', 'chart_tab0pan2', 'chart_tab0pan3']; myExportComponent.componentAttributes.fullMode = '1'; //Set saving type to individual myExportComponent.componentAttributes.saveMode = 'both'; //Show allowed export format drop-down myExportComponent.componentAttributes.showAllowedTypes = '1'; //Width and height myExportComponent.componentAttributes.width = '400'; myExportComponent.componentAttributes.height = '300'; //Message - caption of export component myExportComponent.componentAttributes.showMessage = '1'; myExportComponent.componentAttributes.message = ' '; myExportComponent.componentAttributes.saveAllPanelCaption = 'Save all charts in a single file'; //Render the exporter SWF in our DIV fcexpDiv myExportComponent.Render("fcexpDiv"); return myExportComponent; } //Code that export charts var exportComponent =createChartExportElement(); var chartArray=new Array(); var tabNumber=document.getElementById('actualTabNumber').value; for(var i=0; i<30; i++){ if (getChartFromId('chart_tab' + tabNumber + 'pan' + i)) { if (getChartFromId('chart_tab' + tabNumber + 'pan' + i).hasRendered()) { tmp = 'chart_tab' + tabNumber + 'pan' + i; chartArray.push(tmp); } } } exportComponent.sourceCharts=chartArray; exportComponent.BeginExport(); It works fine in IE 7/8 but doesn't work in Fire Fox (version 3.5.2):w00t: I'm getting js error message Error 10902092026. Error with internal FusionCharts object. Review parameters. Refer to documentation. That means (according documentation) that chart ids are wrong or chart hasn't render yet but they are definitely OK. I will be grateful for any help. Share this post Link to post Share on other sites
ReLexEd Report post Posted August 14, 2009 As I reported on http://www.fusioncharts.com/forum/Topic17203-31-1.aspx, I'm thinking this has to do with the fact that most-likely one of the charts you're trying to export has not yet been scrolled into the viewport, and therefore cannot be accessed thru javascript. Try scrolling down the page, and after that try exporting them, in my case that will do the trick. But I'm also looking for a solution for that one... I'm thinking about using javascript to forcefully scroll to the position in the page where the chart resides, so that it is triggered and rendered properly, before triggering the batch-export. Not a very neat solution, but the only one I can come up with in this scenario.... Unless support comes up with a better idea Share this post Link to post Share on other sites
rafal Report post Posted August 17, 2009 In my case there is no scrollbar on the chart page. Every charts are "visible". Share this post Link to post Share on other sites
FusionCharts Support Report post Posted August 20, 2009 Hi, Tt seems that the chart reference provided as sourceCharts did not return a valid object. Please check whether the Chart IDs provided in sourceCharts are correct. If they are correct, make sure that the charts are already rendered before you are calling the export function. Share this post Link to post Share on other sites
rafal Report post Posted August 31, 2009 I foud solution :hehe: Instead of putting id of charts in sourceChart array (like in documentation) I put there chart objects; like below for(var i=0; i<30; i++){ if (getChartFromId('chart_tab' + tabNumber + 'pan' + i)) { if (getChartFromId('chart_tab' + tabNumber + 'pan' + i).hasRendered()) { //Code that works on IE and FF tmp = getChartFromId('chart_tab' + tabNumber + 'pan' + i); //code that doesn't work on Fire Fox but works on IE //tmp = 'chart_tab' + tabNumber + 'pan' + i chartArray.push(tmp); } } } exportComponent.sourceCharts=chartArray; exportComponent.BeginExport(); IT WORKS:) Share this post Link to post Share on other sites
Guest Rajroop Report post Posted August 31, 2009 Hey Rafal, That's great! Share this post Link to post Share on other sites
Guest Angie Report post Posted January 19, 2011 Dear User, We are delighted to announce that PowerCharts is now ready for your iPads and iPhones too. We have just released PowerCharts v3.2. Starting v3.2, PowerCharts has HighCharts embedded within it, and offers both Flash and JavaScript (HTML5) charting . The Flash charts are displayed on a majority of devices and the JavaScript charts on devices that do not support Flash, all of it without writing a line of code. Automatic rendering of JavaScript charts on devices (like iPad and iPhone) where Flash player is not supported. 5 new chart types: Heat Map Chart Box and Whisker Chart Step Line Chart Error Line Chart Error Scatter Chart * Support for JSON data format. * Support for LinkedCharts, where a single data source controls multiple charts. * Interactive legends in charts allow selective showing/hiding of data series. * Legends now support icons for each data series. * Better management of labels on charts. * Labels now have an auto rendering mode to prevent them from overlapping, the chart selects the best display mode depending on the length of the labels and the width of the chart. * Long labels are truncated, with ellipses appended to the truncated end of each label, and a tooltip bearing the completed label text is displayed when the user hovers over a truncated label. * Support for line breaks and wrapping in all text elements including: caption, sub caption, X-axis title, Y-axis title, Labels and tooltips. * In Line charts, data values can now be positioned either above or below the dataplots. Automatic positioning of data values is also supported. * In Step-line charts dataplots can be joined using vertical lines. * Custom alignment of caption and sub caption using STYLES. * Advanced print management using JavaScript. * Additional options for efficient event handling using JavaScript. * Support for dynamic update of chart properties using JavaScript(barring select scatter and drag charts). * Charts now support % based sizes along with dynamic resizing (barring select scatter and drag charts). Learn more about everything new in PowerCharts v3.2 at : http:/ www.fusioncharts.com/PowerCharts/ We would love to hear from you at: http://www.fusioncharts.com/contact/ Share this post Link to post Share on other sites