Sign in to follow this  
ryadaval

Generating Chart Using Javascript

Recommended Posts

Hi ,

 

I have generated chart using fusionchart javascript method, here chart not rendered completely , please go through the attachment , in this after 50% rendered one javascript error is coming like "u.event not a function in highcharts.js file". below is the code which I am using :

 

<script type="text/javascript"><!--

 

function startExport(){

//Get reference to chart.

var chart = getChartFromId("myChartId");

//Now, we proceed with exporting only if chart has finished rendering.

if (chart.hasRendered()==true){

chart.exportChart();

}else{

alert("Please wait for the chart to finish rendering, before you can invoke exporting");

}

}

 

// -->

</script>

 

<html>

<head>

<title>My First chart using FusionCharts - Using pure JavaScript</title>

<script type="text/javascript" src="FusionCharts_User/Code/FusionCharts/FusionCharts.js"></script>

</head>

<body> <input type="button" onclick="startExport();" value="Begin Chart Export" />

<div id="chartContainer">FusionCharts will load here!</div>

<script type="text/javascript"><!--

 

FusionCharts.setCurrentRenderer('javascript');

 

var myChart = new FusionCharts( "FusionCharts_User/Charts/Column3D.swf",

"myChartId", "400", "300", "0", "1" );

myChart.setDataURL("FusionCharts_User/Gallery/Data/XML/Col3D1.xml");

myChart.render("chartContainer");

// -->

</script>

</body>

</html>

post-6793-010975100 1288240226_thumb.png

Edited by ryadaval

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

 

Could you please confirm whether you are using the latest version of FusionCharts(v 3.2.1)?

 

In case you are not using the same, please try upgrading the same from the link mentioned below :-

 

Ref.- http://www.fusioncharts.com/puc/

 

I hope this helps. :(

Share this post


Link to post
Share on other sites

Hi,

 

Could you please confirm whether you are using the latest version of FusionCharts(v 3.2.1)?

 

In case you are not using the same, please try upgrading the same from the link mentioned below :-

 

Ref.- http://www.fusioncharts.com/puc/

 

I hope this helps. :(

 

Yes , I am using latest version of FusionCharts(v 3.2.1) .

sorry I have given wrong path now it is working chart rendered but unable export serverside :

 

below is my xml :

 

<chart caption='Weekly Sales Summary' xAxisName='Week' yAxisName='Sales' numberPrefix='$'

exportEnabled='1' exportShowMenuItem="0" exportAtClient='0' exportAction='save' exportHandler='http://localhost/test/FusionCharts_User/ExportHandlers/PHP/FCExporter.php' exportFileName='test' exportCallback='myCallBackFunction'>

<set label='Week 1' value='14400' />

<set label='Week 2' value='19600' />

<set label='Week 3' value='24000' />

<set label='Week 4' value='15700' />

</chart>

 

but still it is exporting client side only, I have done path changes in FCExporter.php also , I want to save image in specified path.

 

can you please suggest how to save image into specified server path.

 

Thanks,

Renuka

Share this post


Link to post
Share on other sites

Yes , I am using latest version of FusionCharts(v 3.2.1) .

sorry I have given wrong path now it is working chart rendered but unable export serverside :

 

below is my xml :

 

<chart caption='Weekly Sales Summary' xAxisName='Week' yAxisName='Sales' numberPrefix='$'

exportEnabled='1' exportShowMenuItem="0" exportAtClient='0' exportAction='save' exportHandler='http://localhost/test/FusionCharts_User/ExportHandlers/PHP/FCExporter.php' exportFileName='test' exportCallback='myCallBackFunction'>

<set label='Week 1' value='14400' />

<set label='Week 2' value='19600' />

<set label='Week 3' value='24000' />

<set label='Week 4' value='15700' />

</chart>

 

but still it is exporting client side only, I have done path changes in FCExporter.php also , I want to save image in specified path.

 

can you please suggest how to save image into specified server path.

 

Thanks,

Renuka

 

waiting for your feedback

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