Sign in to follow this  
nikunjnandaniya

Fusion chart all chart export in pdf

Recommended Posts

Hello guys,

 

Technology i used is asp.net with c#.

I have multiple chart on same page.

I want to export all in one click in one pdf no matter if one chart in one page.

I did everything.

but i am not able to render FCExporter.swf (Attached image.)

I already put the javascript for the same and path is also correct.

I want same functionality as given in below link.

 

http://docs.fusioncharts.com/charts/Code/ExportChartSamples/BatchExport/SimpleExample.html

 

if you give me demo for asp.netc# for above link then it's good.

 

Here below is my div.

 

in divcharts i am rendering charts dynamically on basis of criteria.

 

<div id="divCharts" runat="server" style="width90%">
 </div>
 <div id="fcexpDiv">
</div>

 

Here  below is my javascript.

 

<script type="text/javascript">
            function initiateExport() {
                myExportComponent.BeginExport();
            }            
        </script>
        <script type="text/javascript">
            //Initialize Batch Exporter with DOM Id as fcBatchExporter             
            var myExportComponent = new FusionChartsExportObject("fcBatchExporter""../FusionCharts/FCExporter.swf");

            //Add the charts to queue. The charts are referred to by their DOM Id.
            myExportComponent.sourceCharts = ['1''2''3'];

            //------ Export Component Attributes ------//
            //Set the mode as full mode
            myExportComponent.componentAttributes.fullMode = '1';
            //Set saving mode as both. This allows users to download individual charts/ as well as download all charts as a single file.
            myExportComponent.componentAttributes.saveMode = 'both';
            //Show allowed export format drop-down
            myExportComponent.componentAttributes.showAllowedTypes = '1';
            //Cosmetics
            //Width and height
            myExportComponent.componentAttributes.width = '350';
            myExportComponent.componentAttributes.height = '200';
            //Message - caption of export component
            myExportComponent.componentAttributes.showMessage = '1';
            myExportComponent.componentAttributes.message = 'Click on button above to begin export of charts. Then save from here.';
            //Render the exporter SWF in our DIV fcexpDiv
            myExportComponent.Render("fcexpDiv");
        </script>

post-48705-0-77177000-1373037730_thumb.png

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Welcome to FusionCharts Forum.

 

You can find the the same sample (as in the demo link) from the FusionCharts XT Download Pack > Code > ExportChartSamples > BatchExport > SimpleExample.html section.

 

Please go through the same and let us know, if you have any issues/queries related to FusionCharts.

Share this post


Link to post
Share on other sites

Hii,

 

Thanks for reply.

 

I already dowload the same.

 

but Batch Export demo is not wokring for me in any browser.

 

I used Mozila 21.0,IE 9 ,Chrome 27.0.1453.116

 

Can you please download the same try to run batch export in following browsers.

Share this post


Link to post
Share on other sites

Hiii,

 

I got the solution.

 

It's not rendered because i have 2 asp.net panel.

 

I am rendering this component in panel2 which is getting visible after one button click.

 

So now i create function of below code and call this function from codebehind(C#) on that button click event from which panel 2 is being visible true.

 

 

  <script type="text/javascript">

function abc(){
            //Initialize Batch Exporter with DOM Id as fcBatchExporter             
            var myExportComponent = new FusionChartsExportObject("fcBatchExporter""../FusionCharts/FCExporter.swf");

            //Add the charts to queue. The charts are referred to by their DOM Id.
            myExportComponent.sourceCharts = ['1''2''3'];

            //------ Export Component Attributes ------//
            //Set the mode as full mode
            myExportComponent.componentAttributes.fullMode = '1';
            //Set saving mode as both. This allows users to download individual charts/ as well as download all charts as a single file.
            myExportComponent.componentAttributes.saveMode = 'both';
            //Show allowed export format drop-down
            myExportComponent.componentAttributes.showAllowedTypes = '1';
            //Cosmetics
            //Width and height
            myExportComponent.componentAttributes.width = '350';
            myExportComponent.componentAttributes.height = '200';
            //Message - caption of export component
            myExportComponent.componentAttributes.showMessage = '1';
            myExportComponent.componentAttributes.message = 'Click on button above to begin export of charts. Then save from here.';
            //Render the exporter SWF in our DIV fcexpDiv
            myExportComponent.Render("fcexpDiv");

}
        </script>

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

It's glad to know, that you have managed to resolve your issue.

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