deepanker

batch export

Recommended Posts

I am getting an error after on click method: Cannot read property 'DOWNLOAD' of undefined.

render the chart code : 

function renderChart(){

FusionCharts.setCurrentRenderer('javascript');

var chartSettings = [];

chartSettings['id'] = "new-chart-1";    / / i am using this id to export the all chart in blow code to batch export.

chartSettings['type'] = '${request.contextPath}/rq-theme/charts/swf/MSLine.swf';

chartSettings['renderAt'] = div;

chartSettings['swidth'] = '99%';

chartSettings['height'] = height;

chartSettings['dataFormat'] = 'json';

chartSettings['dataSource'] = jsonDataArray;

FusionCharts.ready(function(){ var fusioncharts = new FusionCharts(chartSettings);

fusioncharts.render(); });

}

My Function is : 

var batchExportConfig = function() {
    FusionCharts.batchExport({
        "charts": [{
            "id": "new-chart-1",
        }],
        "exportFileName": "batchExport",
        "exportFormats": "jpg",
        "exportAtClientSide": "1"
    })
}

 

Button Code :  

<button style="z-index: 111111111111;" onclick="batchExportConfig()" id="export_charts" class="btn btn-primary">Chart Export</button>

 

 

 

Share this post


Link to post
Share on other sites

Hi,

Please let us know which version of FusionCharts you are using so that we could assist you accordingly.

However, please note FusionCharts batchExport functionality has been added from the version 3.11.0

https://www.fusioncharts.com/dev/exporting-charts/using-fc-export-server/exporting-multiple-charts-in-a-single-image#exporting-multiple-charts-in-a-single-image-0

Share this post


Link to post
Share on other sites

HI All,

I am using 3.12.1 your latest version.  

The file is able to export but size is 0 kb. I can not upload me exported image because size is 0 kb.  

And I am using below code: and this code run on the click event :  

var batchExportConfig = function() {
    FusionCharts.batchExport()
}

And I am following this link: https://www.fusioncharts.com/dev/exporting-charts/using-fc-export-server/exporting-multiple-charts-in-a-single-image

Edited 2 hours ago by deepanker

Share this post


Link to post
Share on other sites

Hi,

The chart type which you are using has .swf as an extension which is no longer supported, also FusionCharts.setCurrentRenderer method is no longer required instead you could render the chart using FusionCharts.ready method.

Also please note that for batch exporting you need to set the chart width and height in pixels not in percentage as of now, for reference please check the sample fiddle - http://jsfiddle.net/fusioncharts/pnqhtseq/

Share this post


Link to post
Share on other sites

Its now working. When I can download js file and link the local system:  

If I give the server path like this:- 

<script type="text/javascript" src="//www.fusioncharts.com/lib/fcassets/3.12.2/fusioncharts.js"></script>

if I download the js file and give the local system. It can not render the chart, its give an error. 

Please give me suggestion : 

Screenshot from 2018-07-13 16-40-00.png

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