Sign in to follow this  
avefenix

Change The Actual Graphic On Linkedchart

Recommended Posts

Hi, I have this code, but when I apply this on linkedchart XML, the graphic is reloaded completely, but I wish only change the actual graphic. For example: If I click in the graphic and showme a new graphic, I want to change only the actual graphic.

 

Thanks.huh.gif

 

 


<html>
   <head>
       <script type="text/javascript" src="FusionCharts.js"></script>

   </head>
   <body>


				     <input type="button" value="Bar" onClick="changeChart('bar')" > <input type="button" value="Pie" onClick="changeChart('pie')" >
                       <div id="chartContainer">FusionCharts will load here</div>

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

						function changeChart(x)
						{
							var charts = { bar : "Bar2D.swf", pie : "Pie3D.swf"};
							var chartXML ="";

							if( FusionCharts ("myChartId") ) {
								chartXML = FusionCharts ("myChartId").getXMLData();
								FusionCharts ("myChartId").dispose();
							}
							var myChart = new FusionCharts( charts[x.toLowerCase()], "myChartId", "400", "300", "0", "1" );

							if(chartXML!="") 
								myChart.setXMLData( chartXML );
							else
								myChart.setXMLUrl( "Data.xml" );
							myChart.render( "chartContainer" );
						}

						<!--changeChart('line');-->
                           // -->
                       </script>


   </body>
</html>

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi avefenix,

 

Thanks for the post.

 

Can you clarify more by providing screenshot of what you have and what you want to get ?

If I will consider, you wish to get a new pop up window while clicking the graphic to show new graphic, then go to the below link:

http://docs.fusioncharts.com/charts/contents/DrillDown/PopUps.html

 

I hope this will help you.

 

Happy FusionCharting :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