mkollipara
Members-
Content count
4 -
Joined
-
Last visited
About mkollipara
-
Rank
Forum Newbie
-
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>
-
Unable to call JavaScript method on click of Column in Column 2D chart.
mkollipara posted a topic in Javascript Problems
hi, I am trying to call javascript method onclick of column in column 2d chart but it is not working. Can you please help. Below is code that I am trying to use. HTML code : <html> <head> <title>JavaScript Link Example</title> <script language="JavaScript" src="../../../Charts/FusionCharts.js"></script> <SCRIPT LANGUAGE="JavaScript"><!-- function myJS(myVar){ window.alert(myVar); } // --></SCRIPT> </head> <body bgcolor="#ffffff"> <div id="chartdiv" align="center">The chart will appear within this DIV. This text will be replaced by the chart.</div> <script type="text/javascript"><!-- var myChart = new FusionCharts("../../../Charts/Column2D.swf", "myChartId", "500", "300", "1", "1"); myChart.setXMLUrl("JSExample.xml"); myChart.render("chartdiv"); // --></script> </body> </html> XML data: <chart caption='ABC Bank Branches' subCaption='(In Asian Countries)' yaxislabel='Branches' xaxislabel='Country'> <set label='Hong Kong' value='235' link="JavaScript:myJS('Hong Kong,235');"/> <set label='Japan' value='123' link="Callback.html" /> <set label='Singapore' value='129' /> <set label='Malaysia' value='121'/> <set label='Taiwan' value='110' /> <set label='China' value='90' /> <set label='S. Korea' value='86' /> </chart>