Gauri Bansode Report post Posted June 6, 2011 Hi, I want to show the simple column chart on small pop up window when i click on each slice of pie chart. I am displaying pie chart from my view.jsp page using dataXML method. and when i click on each slice i call javascript function on 'link' element. Now in javascript function i have written required data for column chart to display and using 'window.open' i am trying to show that column chart,but its not working. here is my code: Pie chart ........ ....... strXML1+="<set name='gauri' value='10' link='javascript:my()' />"; ...... ...... function my() { var dynDiv = document.createElement("div"); dynDiv.id = "divDyna"; dynDiv.innerHTML = "Created using JavaScript"; dynDiv.style.height = "20px"; dynDiv.style.width = "300px"; dynDiv.style.backgroundColor = 'gray'; var sampText= "testetetredfdsfsdf"; <% String str=""; str+="<graph caption='' xAxisName='' yAxisName='' decimalPrecision='0' formatNumberScale='0' >"; str+="<set name='Jan' value='7' color='AFD8F8'/>"; str+="<set name='Feb' value='6' color='AFD8F8'/>"; str+="</graph>"; %> var chart1 = new FusionCharts("<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/FusionCharts/FCF_Column3D.swf")%>", "chart1Id", "240", "240"); chart1.setDataXML("<%=str%>"); top.consoleRef=window.open('','myconsole','width=500,height=500') top.consoleRef.document.writeln( '<html><head><title>Console</title></head>' +'<body>' +chart1.render(dynDiv)+'</body></html>' ) } If anybody knows the solution please help me. Thanks in advance. Regards, Gauri Bansode Share this post Link to post Share on other sites
Gauri Bansode Report post Posted June 7, 2011 Hi, I want to show the simple column chart on small pop up window when i click on each slice of pie chart. I am displaying pie chart from my view.jsp page using dataXML method. and when i click on each slice i call javascript function on 'link' element. Now in javascript function i have written required data for column chart to display and using 'window.open' i am trying to show that column chart,but its not working. here is my code: Pie chart ........ ....... strXML1+="<set name='gauri' value='10' link='javascript:my()' />"; ...... ...... function my() { var dynDiv = document.createElement("div"); dynDiv.id = "divDyna"; dynDiv.innerHTML = "Created using JavaScript"; dynDiv.style.height = "20px"; dynDiv.style.width = "300px"; dynDiv.style.backgroundColor = 'gray'; var sampText= "testetetredfdsfsdf"; <% String str=""; str+="<graph caption='' xAxisName='' yAxisName='' decimalPrecision='0' formatNumberScale='0' >"; str+="<set name='Jan' value='7' color='AFD8F8'/>"; str+="<set name='Feb' value='6' color='AFD8F8'/>"; str+="</graph>"; %> var chart1 = new FusionCharts("<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/FusionCharts/FCF_Column3D.swf")%>", "chart1Id", "240", "240"); chart1.setDataXML("<%=str%>"); top.consoleRef=window.open('','myconsole','width=500,height=500') top.consoleRef.document.writeln( '<html><head><title>Console</title></head>' +'<body>' +chart1.render(dynDiv)+'</body></html>' ) } If anybody knows the solution please help me. Thanks in advance. Regards, Gauri Bansode I am sorry that i have posted this thread in wrong a section as i am using FusionCharts free version. Share this post Link to post Share on other sites
Guest Angshu Report post Posted June 8, 2011 Hi, Thanks for your post. Please refer to the forum link: http://forum.fusioncharts.com/topic/9726-how-to-display-a-chart-on-popup-small-window-on-same-page/#entry37987 for your reference. Hope this helps. Share this post Link to post Share on other sites