davide.menoni@omnilab.it

Client-Side Exporting

Recommended Posts

It is possible to hide Waiting button and show its only after charts is ready to save?

 

>> Yes. Please see: http://www.fusioncharts.com/Demos/ExportChart/Contents/client_export.html. The export handler (a button in your case, and a small drop down and button in this case) first does not loads up. It loads only when the first export is made and the chart finishes collecting data.

 

 

Witch event is called when button change from Waiting to Save?

 

>> When chart finishes collecting data it calls FC_ExportReady(DOMId) event.

Share this post


Link to post
Share on other sites

Hi Sudipto, tks.

I resolved in this way:

 

<div id="divContainer"></div>
<div id="divExporter"></div>

 

var divExporter = document.getElementById("divExporter");
var divContainer = document.getElementById("divContainer");

function FC_ExportReady(DOMId) {
   divExporter.style.visibility = "visible";
   divExporter.style.display = "block";
   return false;
};

function ExportGraph() {
   var myExportComponent = new FusionChartsExportObject(...);
   myExportComponent.componentAttributes.btnsavetitle = ...;
   myExportComponent.componentAttributes.btndisabledtitle = ...;
   myExportComponent.Render(divExporter.id);
   return false;
};

function Reload() {
   divExporter.innerHTML = "";
   divExporter.style.visibility = "hidden";
   divExporter.style.display = "none";
   divContainer.innerHTML = "";
   var myChart = new FusionCharts(...);
   ...
   myChart.render(divContainer.id);
   ExportGraph();
   return false;
};
Reload();

 

Better solutions?

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