Sign in to follow this  
Luciano Casa

Exportcharts Problems

Recommended Posts

I'm doing the FusionChart export the server side and am having two problems:

1) When I have many graphs (around 10), the last graph does not call the code FCExplorter.php. What might be happening? If all graphs are called the same way (through exportChart) as a mistake can happen at last?

2) Some exports are exporting the graphics still being graphic rendering and not as it really is. What might be happening?

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Please find the response to your queries inline, below:

 

1) When I have many graphs (around 10), the last graph does not call the code FCExplorter.php. What might be happening? If all graphs are called the same way (through exportChart) as a mistake can happen at last?

>>Please note that for exporting the FusionCharts' Charts successfully, it needs to render in the Browser's viewable area, before beginning export process.

 

Since, you are rendering 10 graphs, the last graph may not appear in the Browser's viewable area and will not begin the export process.

 

As a work around, we have one JavaScript file (scroll.js) which helps you to render the charts in non-viewable area and helps in Exporting of all the charts.

 

But, in IE browser this process will take a bit more time to load the file, due to the limitation of Adobe Flash player in IE browser.

 

If you need this file, please drop a request mail to FusionCharts Team <[email protected]>.

 

2) Some exports are exporting the graphics still being graphic rendering and not as it really is. What might be happening?

>>Could you please invoke the export method "exportChart()" after completion of the chart rendering, as per the reference code below:

 

Ref. Code:

var chartObject = FusionCharts('myChartID');
if( chartObject.hasRendered() ) chartObject.exportChart(); 

 

Hope this helps !

Share this post


Link to post
Share on other sites

On the first item, it may be that. I'll force the scroll and must resolve.

The item 2, the problem keeps happening. I'm using the code you suggested. In debug Chrome, the result of hasRendered () is true.

The difference in my code I pass the ExportFormat and ExportFileName but do not think this is the problem.

Any idea?

Hi,

 

Please find the response to your queries inline, below:

 

1) When I have many graphs (around 10), the last graph does not call the code FCExplorter.php. What might be happening? If all graphs are called the same way (through exportChart) as a mistake can happen at last?

>>Please note that for exporting the FusionCharts' Charts successfully, it needs to render in the Browser's viewable area, before beginning export process.

 

Since, you are rendering 10 graphs, the last graph may not appear in the Browser's viewable area and will not begin the export process.

 

As a work around, we have one JavaScript file (scroll.js) which helps you to render the charts in non-viewable area and helps in Exporting of all the charts.

 

But, in IE browser this process will take a bit more time to load the file, due to the limitation of Adobe Flash player in IE browser.

 

If you need this file, please drop a request mail to FusionCharts Team <[email protected]>.

 

2) Some exports are exporting the graphics still being graphic rendering and not as it really is. What might be happening?

>>Could you please invoke the export method "exportChart()" after completion of the chart rendering, as per the reference code below:

 

Ref. Code:

var chartObject = FusionCharts('myChartID');
if( chartObject.hasRendered() ) chartObject.exportChart(); 

 

Hope this helps !

Share this post


Link to post
Share on other sites

Remembered something else, I run into the routine exportChart FC_Rendered (objRtn), or believe that not needed after all the hasRendered.

I belive that FusionCharts calls the routine after the render. Yet even put the hasRendered.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

For the second issue, could you please send us the code snippet of how you are initiating the export process and the screen shot of the issue "Some exports are exporting the graphics still being graphic rendering and not as it really is", to better look into your issue?

 

Awaiting inputs from your end.

Share this post


Link to post
Share on other sites
function FC_Rendered(objRtn){
   if (objRtn.substring(0,6) == "CLONE_" && aPanExps.length > 0){
       for (var i in aPanExps) {
           if (aPanExps[i].graficoID == objRtn && !aPanExps[i].rendered){
               aPanExps[i].rendered = true;
               iTotRender = iTotRender+1;
           }
       }
       if (iTotGraf == iTotRender){
           clearTimeout(tTimeoutRender);
           tTimeoutSend = setTimeout(GrafSendTimeout,60000);
           Ext.MessageBox.updateText("Gerando gráficos e tabelas.");
           var ofrmExport = Ext.ComponentQuery.query("#frmExport")[0];
           var bSoTabela = true;
           for (var i in aPanExps) {
               var oGrafID = ofrmExport.el.query("object[id="+aPanExps[i].graficoID+"]")[0];
               if (oGrafID && oGrafID.hasRendered()){
                   //console.log ("render:" + oGrafID.hasRendered());
                   var sFileName = "VSBI_" + Ext.Date.format(new Date(),'YmdHisu');
                   aPanExps[i].nomegrafico = sFileName;
                   oGrafID.style.visibility = 'hidden';
                   oGrafID.exportChart({
                       exportFormat: 'PNG' ,
                       exportFileName: sFileName
                   });                    
               }
           }
       }
   }}

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

It seems there is no issues with the code snippet for the export process.

 

Could you please provide us the screen shot of your issue "Some exports are exporting the graphics still being graphic rendering and not as it really is" along with the XML data of the corresponding graph and the FusionCharts version that you are using, to better look into your issue?

 

Awaiting inputs from your end!

Share this post


Link to post
Share on other sites

JSON:

{"chart":{"caption":"","showvalues":"0","showlabels":"1","labeldisplay":"AUTO","showlegend":"1","legendposition":"BOTTOM","plotgradientcolor":" ","decimals":"2","bgcolor":"9BA5B2,FFFFFF","showborder":"0","canvasborderthickness":"1","useellipseswhenoverflow":"0","rotatevalues":"1","setadaptiveymin":"1","decimalseparator":",","thousandseparator":".","exportenabled":"1","exportshowmenuitem":"0","exporthandler":"/includes/FusionCharts/FCExporter.php","exportatclient":"0","exportaction":"save"},"categories":[{"category":[{"label":"Jan"},{"label":"Fev"},{"label":"Mar"},{"label":"Abr"},{"label":"Mai"},{"label":"Jun"},{"label":"Jul"},{"label":"Ago"},{"label":"Set"},{"label":"Out"},{"label":"Nov"},{"label":"Dez"}]}],"dataset":[{"seriesname":"2011","data":[{"value":"4909299"},{"value":"1194963"},{"value":"1344771"},{"value":"1430641"},{"value":"1513487"},{"value":"1435860"},{"value":"1601218"},{"value":"1581550"},{"value":"1520979"},{"value":"1457984"},{"value":"1678887"},{"value":"2439673"}]},{"seriesname":"2012","data":[{"value":"4909299"},{"value":"1194963"},{"value":"1344771"},{"value":"1430641"},{"value":"1513487"},{"value":"1435860"},{"value":"1601218"},{"value":"1581550"},{"value":"1520979"},{"value":"1457984"},{"value":"1678887"},{"value":"2439673"}]}]}

FusionCharts version: [3, 2, 3, "sr1", 5347]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this