Sign in to follow this  
maks

Problem when trying Exporting charts as PDF/Images > Exporting from JavaScript

Recommended Posts

Hi:

In my asp.net application FusionChart is working fine. Now I'm trying to export chart as image.

Using  'Exporting Charts as PDF or Images > Client-side export > Simple Example' example from the FucionChart website, I can export my chart.

But when I'm trying to export using 'Exporting charts as PDF/Images > Exporting from JavaScript' example it's not working. It does not say anything, no error, nothing. I checked ChartID, also  RegisterWithJS parameter while initializing my chart is set to '1' for the charts to respond to the JavaScripts.

it's ok but I'm not able to export it.

I'm using IE7.

For exporting I'm using the following JavaScript:

<script type="text/javascript"> 
function ExportMyChart() {
var chartObject = getChartFromId('MonthlyEventTotal'); 
if( chartObject.hasRendered()) 
chartObject.exportChart(); } 
</script>

then calling this function from html button as:

<input type="button" value="Export My Chart" onclick="ExportMyChart()" />

Why it's not working.........need help pls.

Thanking You,

Maksuda...

Edited by Guest

Share this post


Link to post
Share on other sites

I don't know what happened, now it's showing the exporting dialog box with percentage of export without asking anything about saving the export. So I can't find where it's exporting and also the format it's exporting

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

 

 

Could you please confirm the following:

 

 

 

1) You are using Flash Player 10 and FusionCharts ver3.1.(latest version)

 

 

 

2) The global security settings are enabled.

 

 

 

3) You have FusionChartsExportComponent.js file (latest version)

Share this post


Link to post
Share on other sites

 

Could you please confirm the following:

 

1) You are using Flash Player 10 and FusionCharts ver3.1.(latest version)

 

2) The global security settings are enabled.

 

3) You have FusionChartsExportComponent.js file (latest version)

 

 

Thanks Basundhara for the relpy.

I checked them. 1 and 3 are ok.

I have Flash Player 10 and FusionCharts ver3.1.

Also I have FusionChartsExportComponent.js file latest version.

I'm not sure about 2. I couldn't find the global security. Would you please help me finding Global security settings of Flash Player?

Will someone please help me understanding the following line that is in Fusion Chart's doc ? (image export using js)

............. click on the "Export My Chart" button and the chart will start exporting all by itself!

What does it mean? does it export only without any popup screen or what?

Thanks again for the help.

Regards,

Maksuda

Edited by Guest

Share this post


Link to post
Share on other sites

Thanks Madhumita for the reply.

I enabled my Global Security Settings.

Still no progress.

In the example (the link you sent) I saw after exporting a dropdownlist is appeared with the saving format options.

I don't get that option. Just show export popup screen.

Need help pls........

Thanking You,

Maksuda...

Share this post


Link to post
Share on other sites

At last I made it !!!!!

Yes I can export and save chart using JavaScript. Now another thing I need to fix...

After capturing the chart two dropdpwn lists are appeared, one with chart name and another with chart save options like pfd,JPEG.

But both the dropdownlist are appeared at the very top of the page which I don't want. How can I fix the position of the dropdownlists?

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

 

 

These dropdown lists are a part of FusionCharts Client Side Export Component.

 

 

 

The export component is generated using Java S cript.

 

 

 

So, you can also position the export component as you wish in the page.

 

 

 

Ref:-http://www.fusioncharts.com/docs/Contents/ECServerFormats.html

 

 

 

Hope this helps.:D

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