ramadevimandala
Members-
Content count
29 -
Joined
-
Last visited
Everything posted by ramadevimandala
-
On the fly changin the Graph type
ramadevimandala replied to ramadevimandala's topic in FusionCharts and JSP
In Fusionschart V3 documentation, to change the data dynamically for displayed is chart using JS is given as: <HTML> <HEAD> <TITLE>FusionCharts & JavaScript - Updating chart using setDataURL() Method</TITLE> <SCRIPT LANGUAGE="Javascript" SRC="../../FusionCharts/FusionCharts.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript"> //updateChart method is called whenever the user clicks the button to //update the chart. Here, we get a reference to the chart and update it's //data using setDataURL method. function updateChart(DOMId){ //Get reference to chart object using Dom ID var chartObj = getChartFromId("chart1Id"); //Update it's URL chartObj.setDataURL("NewData.xml"); //Disable the button this.document.frmUpdate.btnUpdate.disabled = true; } </SCRIPT> </HEAD> <BODY> <div id="chart1div"> FusionCharts </div> <script language="JavaScript"> var chart1 = new FusionCharts("../../FusionCharts/Column3D.swf", "chart1Id", "400", "300", "0", "1"); chart1.setDataXML("<chart><set label='A' value='10' /><set label='B' value='11' /></chart>"); chart1.render("chart1div"); </script> <form name='frmUpdate'> <input type='button' value='Change Data' onClick='javaScript:updateChart();' name='btnUpdate'> </form> </BODY> </HTML> in above code what is var chartObj = getChartFromId("chart1Id");? how to get the dom id? please explain its very urgent -
Notable to create the chart with FusionChartsCreator class
ramadevimandala posted a topic in FusionCharts and JSP
Hi, I have written the code in my jsp to create the chart using FusionChartsCreator but the chart is not displaying instead ut is generating only string Chart. With the same xml file using FusionChartsHTMLRenderer, but i want to use the first method as i need to pass the parameters dynamically from DB here is my code: <td width="60%" > <% String chartCode=FusionChartsCreator.createChart("..//FusionCharts/Pie3D.swf", "..//Data/FirstChartData.xml","" , dbUnitName, 450, 300, false, false);%> <%=chartCode%></td> and : <td width="60%"> <jsp:include page="FusionChartsHTMLRenderer.jsp" flush="true"> <jsp:param name="chartSWF" value="..//FusionCharts/Pie3D.swf" /> <jsp:param name="strURL" value="..//Data/FirstChartData.xml" /> <jsp:param name="strXML" value="" /> <jsp:param name="chartId" value="chart1" /> <jsp:param name="chartWidth" value="450" /> <jsp:param name="chartHeight" value="300" /> <jsp:param name="debugMode" value="false" /> <jsp:param name="registerWithJS" value="true" /> </jsp:include> <BR> <BR> </td> Please help for the same, its urgent Thanks, rama -
Notable to create the chart with FusionChartsCreator class
ramadevimandala replied to srividya_sharma's topic in FusionCharts and JSP
Hi, I am getting the chart parameters from Database , which i want to use to create the chart I can't use jsp:param as it will not allow the java code inside: my Clob data is like "chartWidth=500;chartHeight=400;.." so please suggest me if you have any other way to do this. see the view source code: <HTML><HEAD><TITLE>EisCharts - Simple Pie 3D Chart</TITLE><style type="text/css">.bg1{ background-color:#D2D7DF;}.bg2{ background-color:#F5F5DC;}</style><link href="/OA_HTML/eisrs/jsp/js/sortabletable.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="/OA_HTML/eisrs/jsp/js/string_functions.js"></script> <link rel="stylesheet" charset="UTF-8" type="text/css" href="/OA_HTML/eisrs/jsp/js/eis-desktop-custom-windows.css"><SCRIPT LANGUAGE="Javascript" SRC="../../FusionCharts/FusionCharts.js"></SCRIPT><SCRIPT LANGUAGE="JavaScript"> function drillDownJS(ethnicOrigin){ window.open("/OA_HTML/eisrs/jsp/dashBoard/EisDBEmployeesDetails.jsp?ethnic_origin=" + ethnicOrigin,'',"title=no,status=yes,location=yes,toolbar=no,directories=no,resizable=yes,width=750,height=420,top=150,left=120,scrollbars=yes"); } function drillDownJS3(addrState){ window.open("/OA_HTML/eisrs/jsp/dashBoard/EisDBNewHireDrillDown.jsp?addr_state=" + addrState,'',"title=no,status=yes,location=yes,toolbar=no,directories=no,resizable=yes,width=750,height=420,top=150,left=120,scrollbars=yes"); } function drillDownJS2(year,leavingReason){ alert(year); alert(leavingReason); window.open("/OA_HTML/eisrs/jsp/dashBoard/EisDBEmployeesDetails.jsp?year=" + year+"&leaving_reason=" +leavingReason,'',"title=no,status=yes,location=yes,toolbar=no,directories=no,resizable=yes,width=750,height=420,top=150,left=120,scrollbars=yes"); } </SCRIPT></HEAD><BODY><form name="frm" method="post" action="EisDBEmployeesDetails.jsp"><CENTER> <h2>XXEIS HR Dashboard</h2> <table> <tr> <td width="50%" > <!-- START Script Block for Chart--> <div id='Turnover ComparisonDiv' align='center'> Chart. </div> <script type='text/javascript'> var chart_Turnover Comparison = new FusionCharts('/OA_HTML/eisrs/jsp/dashboard/FC/Pie3D.swf', 'Turnover Comparison', '450', '300', '0', '0'); // Set the dataURL of the chart chart_Turnover Comparison.setDataURL("/OA_HTML/eisrs/jsp/dashboard/Data/FirstChartData.xml"); // Finally, render the chart. chart_Turnover Comparison.render("Turnover ComparisonDiv"); </script> <!--END Script Block for Chart--> <BR> <BR> </td> <td width="50%"> <!--START Code Block for Chart chart2 --> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="450" height="300" id="chart2"> <param name="allowScriptAccess" value="always" /> <param name="movie" value="/OA_HTML/eisrs/jsp/dashboard/FC/MSColumn3D.swf"/> <param name="FlashVars" value="chartWidth=450&chartHeight=300&debugMode=0&dataURL=/OA_HTML/eisrs/jsp/dashboard/XMLData/SecondChartData.xml" /> <param name="quality" value="high" /> <embed src="/OA_HTML/eisrs/jsp/dashboard/FC/MSColumn3D.swf" FlashVars="chartWidth=450&chartHeight=300&debugMode=0&dataURL=/OA_HTML/eisrs/jsp/dashboard/XMLData/SecondChartData.xml" quality="high" width="450" height="300" name="chart2" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <!--END Code Block for Chart chart2 --> <BR> <BR> </td> </tr> </table> <a href='NoChart.html' target="_blank">Unable to see the chart above?</a></CENTER></form></BODY></HTML> -
Hi, Thank you for your reply, I found the solution in docs, <set value="28" link="JavaScript:drillDownJS2('2003','Resigned');"/> Thanks, Rama