FusionCharts Forum: Fusion Chart V3 : Server Side Export of chart - Initiation through custom link and not using context menus - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fusion Chart V3 : Server Side Export of chart - Initiation through custom link and not using context menus

#1 User is offline   piyush@fusioncharts 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 25-November 09

Posted 25 November 2009 - 06:31 AM

Hi,



I am using fusion chart v3 evalution version for testing right now. we are planning to buy the commercial version of the same.



while testing export chart api with fusion chart v3 i come across below issue.



I am using server side export handler to export chart as PDF/Image as i need to save the PDF/Image to server disk for later use.



So here i am able to export chart using context menu export method. but i need to pass other custom parameter also to the handler method in controller with necessary xml attributes. so how can i pass these parameters ?? also if i do not want to initiate export process through context menu by doing right click on chart but want to initiate export process on click event of custom export link then how can i do that ??



Please reply asap.



Thanks,

Piyush
-1

Other Replies To This Topic

#2 User is offline   srividya_sharma 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 943
  • Joined: 01-October 07

Posted 25 November 2009 - 07:17 AM

Hi Piyush,

You can use javascript to initiate the export. Here is the code:

<script type="text/javascript">

   function ExportMyChart() {

        var chartObject = getChartFromId('myChart');

        if( chartObject.hasRendered() ) chartObject.exportChart();

   }

</script>

You can use your custom controller to handle the export, by specifying the exportHandler value in the xml.

You cannot provide custom parameters to your controller, from the chart.

The one way, you could achieve this is by using the existing attributes with a different meaning in your controller.

For example: exportTargetWindow or exportAction.

You could use these attributes as something else in your controller.

Hope this helps.:)

Srividya

regards,
Srividya Sharma
0

Other Replies To This Topic

#3 User is offline   piyush@fusioncharts 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 25-November 09

Posted 25 November 2009 - 12:32 PM

Thanks for your reply Srividya.



I have one more question here regarding registartwithJS option. in the documentation it is mentioned that we need to set this attribute at true to enable chart export initiation through javascript but it is not clear that where to set this attribute ?? is it as one of the parameter in the chart xml ??



Thanks,

Piyush
0

Other Replies To This Topic

#4 User is offline   Rajroop 

  • FusionCharts Team
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1803
  • Joined: 19-May 09

Posted 25 November 2009 - 03:12 PM

Hello Piyush,



Here, you would have to use the parameter 'register_with_js' and set it to true.



To register the chart with JavaScript, we set the registerWithJS parameter to 1. It's the last parameter in FusionCharts constructor function.



var chart1 = new FusionCharts("../../FusionCharts/Column3D.swf", "chart1Id", "400", "300", "0", "1");



Ref.- http://www.fusioncha...S_Overview.html



Hope this helps.
Regards,

Rajroop Bhaduri

FusionCharts Team

Help us improve our documentation with your precious feedback at:
http://documentation...sioncharts.com/

Follow us @Twitter
0

Other Replies To This Topic

#5 User is offline   srividya_sharma 

  • Supreme Being
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 943
  • Joined: 01-October 07

Posted 25 November 2009 - 07:34 PM

Hi Piyush,

If you are using the render_chart function in the view, you could set the registerWithJS value as follows:

#Create the chart - Column 3D Chart with data contained in str_xml render_chart '/FusionCharts/Column3D.swf', '', str_xml, 'productSales', 600, 300, false, true do-%>

Srividya :)

regards,
Srividya Sharma
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic