mkollipara

Drill down chart not working.

Recommended Posts

hi,

I am trying to create a sample drill down chart with fusion charts but it is not working. I created HTML using below code and I am using xml data as shown below.

 

HTML 

<html>
  <head>  
    <title>My First chart using FusionCharts XT</title>  
    <script language="JavaScript" src="../../../Charts/FusionCharts.js"></script>
    </script>
  </head>   
  <body>     
    <div id="chartContainer">FusionCharts XT will load here!</div>          
    <script type="text/javascript"><!--  
 
      var myChart = new FusionCharts( "../../../Charts/Column2D.swf", 
        "myChartId", "320", "250", "0", "1" );
      myChart.setXMLUrl("summary-data.xml");
      myChart.render("chartContainer");
      
    // -->     
    </script>     
  </body> 
</html> 
 
XML data :
<chart caption="Yearly sales" xAxisName="Year" yAxisName="Sales">
  <set label="2004" value="37800" link="newchart-xml-2004-quarterly" />
  <set label="2005" value="21900" link="newchart-xml-2005-quarterly" />
  <set label="2006" value="32900" link="newchart-xml-2006-quarterly" />
  <set label="2007" value="39800" link="newchart-xml-2007-quarterly" />
  
  <linkeddata id="2004-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2004"
    xAxisName="Quarter" yAxisName="Sales" >
       <set label="Q1" value="11700" />
       <set label="Q2" value="8600" />
       <set label="Q3" value="6900" />
       <set label="Q4" value="10600" />
    </chart>
  </linkeddata>
  
  <linkeddata id="2005-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2005"
      xAxisName="Quarter" yAxisName="Sales">
       <set label="Q1" value="5500" />
       <set label="Q2" value="7100" />
       <set label="Q3" value="3900" />
       <set label="Q4" value="5400" />
    </chart>
  </linkeddata>
 
  <linkeddata id="2006-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2006"
      xAxisName="Quarter" yAxisName="Sales">
       <set label="Q1" value="6700" />
       <set label="Q2" value="9200" />
       <set label="Q3" value="10800" />
       <set label="Q4" value="6200" />
    </chart>
  </linkeddata>
 
  <linkeddata id="2007-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2007"
      xAxisName="Quarter" yAxisName="Sales">
      <set label="Q1" value="8900" />
      <set label="Q2" value="6600" />
      <set label="Q3" value="11200" />
      <set label="Q4" value="13100" />
     </chart>
  </linkeddata>
 
</chart>

 

Share this post


Link to post
Share on other sites
Guest Rishab

Hi,

 

Can you please try rendering the chart on the server and let us know if your issue has been resolved?

Share this post


Link to post
Share on other sites

i m new to fusion charts.. i m facing the same problem .. i can able to see the first chart after but cant able to drill down ... i m using trial version but one of my colleague can able to drill down chart.. i need to clarify that . whether i m doing any mistake .. is there any restriction for linked charts??? in previous versions is there access for linked charts ??? now it got restricted ??

 

please help me to figure it out .. 

 

 

my code is :

 

<html>
  <head>  
    <title>My First chart using FusionCharts XT</title>  
    <script type="text/javascript" src="FusionCharts/FusionCharts.js">
    </script>
  </head>   
  <body>     
    <div id="chartContainer">FusionCharts XT will load here!</div>          
    <script type="text/javascript"><!--  
 
var myChart = new FusionCharts( "FusionCharts/Column2D.swf",
    "myChartId", "320", "250", "0", "1" );
  myChart.setXMLUrl("Data.xml");
  myChart.render("chartContainer");
   
     // -->     
    </script>     
  </body> 
</html> 
//-------------------------------------------------------------------
 
xml code:
 
<chart caption="Yearly Sales" xAxisName="Year" yAxisName="Sales">
  <set label="2004" value="37800" link="newchart-xmlurl-Data2004" />
  <set label="2005" value="21900" link="newchart-xmlurl-Data2005" />
  <set label="2006" value="32900" link="newchart-xmlurl-Data2006" />
  <set label="2007" value="39800" link="newchart-xmlurl-Data2007" />
 
 
<linkeddata id ="Data2004">
<chart caption="Quarterly Sales Summary" subcaption="For the year 2004" xAxisName="Quarter" yAxisName="Sales" >
   <set label="Q1" value="11700" />
   <set label="Q2" value="8600" />
   <set label="Q3" value="6900" />
   <set label="Q4" value="10600" />
</chart>
</linkeddata>
 
<linkeddata id="Data2005">
<chart caption="Quarterly Sales Summary" subcaption="For the year 2005" xAxisName="Quarter" yAxisName="Sales">
  <set label="Q1" value="5500" />
  <set label="Q2" value="7100" />
  <set label="Q3" value="3900" />
  <set label="Q4" value="5400" />
</chart>
</linkeddata>
 
<linkeddata id="Data2006">
<chart caption="Quarterly Sales Summary" subcaption="For the year 2006"xAxisName="Quarter" yAxisName="Sales">
  <set label="Q1" value="6700" />
  <set label="Q2" value="9200" />
  <set label="Q3" value="10800" />
  <set label="Q4" value="6200" />
</chart>
</linkeddata>
 
<linkeddata id="Data2007">
<chart caption="Quarterly Sales Summary" subcaption="For the year 2007" xAxisName="Quarter" yAxisName="Sales">
  <set label="Q1" value="8900" />
  <set label="Q2" value="6600" />
  <set label="Q3" value="11200" />
  <set label="Q4" value="13100" />
</chart>
</linkeddata>
</chart>
 
Edited by jemals

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum Post.

 

Since the descendant chart XML has been appended within the parent source, please try setting dataformat as xml. Please find the updated XML attached.

<chart caption="Yearly sales" xAxisName="Year" yAxisName="Sales">
  <set label="2004" value="37800" link="newchart-xml-2004-quarterly" />
  <set label="2005" value="21900" link="newchart-xml-2005-quarterly" />
  <set label="2006" value="32900" link="newchart-xml-2006-quarterly" />
  <set label="2007" value="39800" link="newchart-xml-2007-quarterly" />
  
  <linkeddata id="2004-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2004"
    xAxisName="Quarter" yAxisName="Sales" >
       <set label="Q1" value="11700" />
       <set label="Q2" value="8600" />
       <set label="Q3" value="6900" />
       <set label="Q4" value="10600" />
    </chart>
  </linkeddata>
  
  <linkeddata id="2005-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2005"
      xAxisName="Quarter" yAxisName="Sales">
       <set label="Q1" value="5500" />
       <set label="Q2" value="7100" />
       <set label="Q3" value="3900" />
       <set label="Q4" value="5400" />
    </chart>
  </linkeddata>
 
  <linkeddata id="2006-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2006"
      xAxisName="Quarter" yAxisName="Sales">
       <set label="Q1" value="6700" />
       <set label="Q2" value="9200" />
       <set label="Q3" value="10800" />
       <set label="Q4" value="6200" />
    </chart>
  </linkeddata>
 
  <linkeddata id="2007-quarterly">
    <chart caption="Quarterly Sales Summary" subcaption="For the year 2007"
      xAxisName="Quarter" yAxisName="Sales">
      <set label="Q1" value="8900" />
      <set label="Q2" value="6600" />
      <set label="Q3" value="11200" />
      <set label="Q4" value="13100" />
     </chart>
  </linkeddata>
 
</chart>

Hope this helps.

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