Zanata

DRILL DOWN HOW TO...

Recommended Posts

Hello everyone,

Im trying to make a DRILLDOWN WITHOUT IIS, using only Javascript and HTML And off course the FUSIONCHARTS V3.

But i dont have any idea how to make it. i`ve searched id Fusioncharts documentation, but did not find any example about that.

First:

Is it Possible?

Someone could show me a simple example about how to make it, sending Javascript, Html and XMl instruction?

WITING THE ANSWEAR TO MUCH FAST!

HUG's ;)

Share this post


Link to post
Share on other sites

THIS IS MY CODE

<html>
<head>    
<script language="JavaScript" src="../FusionCharts/FusionCharts.js"></script>  
<script LANGUAGE="JavaScript">
  
function updateMTDChart() {  
  
window.alert("OPA");
var chartObj = getChartFromId("MTDChart");  
chartObj.setDataURL("JSExample.xml");
}
</script>   
</head>	 

<body bgcolor="#ffffff">  
<BR>	 
<div id="Div_YTDChart" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>    
<param name="allowScriptAccess" value="always" />
<script type="text/javascript">	    
var Chart_YTDChart = new FusionCharts("../FusionCharts/Column3D.swf?registerWithJS=1","YTDChart","900","300","0","1");	    
Chart_YTDChart.setDataURL("JSExample.xml");	    
Chart_YTDChart.render("Div_YTDChart");    
</script>  
<BR>	 
<div id="Div_MTDChart" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div>    
<script type="text/javascript">	   
 var Chart_MTDChart = new FusionCharts("../FusionCharts/Column3D.swf?registerWithJS=1","MTDChart","900","300","0","1");	    
Chart_MTDChart.setDataURL("Data.xml");	    
Chart_MTDChart.render("Div_MTDChart");
</script>   
<input Type="Button" Name="Teste" align="center" onclick="JavasCript:updateMTDChart();">
</body>
</html>

When i click on the button the chart is not updatting...

it enter in the function but does'nt change data.

What can i do?

Share this post


Link to post
Share on other sites

i saw in another samples of fusioncharts that everything thats based on dataXML or DataURL change is no working in my PC.

Im not using the IIS, that's bacause of that?

ATt

Share this post


Link to post
Share on other sites

Can you tell us exactly what kind of data you are working with?

 

 

 

All of my drill down charts go and retrieve data from a database based on the user's choice. Obviously, we would need a little more than Javascript and HTML for that. However, if your data is already in XML format then you are good to go. For example, if you have a saved XML file for each month of the year that stores specific financial data for that year and you have no need for that to be continuously accurate, then you are good to go. Is that the case?

 

 

 

If so, then here is an example of what you are after.

 

 

 

Let me know if this helps or not.

drilldown.txt

Edited by Guest

Share this post


Link to post
Share on other sites

Hi Zanata,

I am afraid that your code will not work, until you do not change your global settings. Because by default Flash ignores any JavaScript call if it is made through Local.

And we have tested your code it is working fine.

Edited by Guest

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