hubbardr1 Report post Posted April 15, 2008 Is there an api available that will enable me to change the 3D pie chart to its 2D view? If you right click on the 3d pie, there is a 2d option. I would like to toggle this with javascript if possible to give my users better print formatting. I could also regenerate the xml and re-render if an xml attribute could toggle this. Does anything like this exist? Thanks! Share this post Link to post Share on other sites
Pallav Report post Posted April 22, 2008 I'm afraid we do not have an option for this yet. Share this post Link to post Share on other sites
1dmf Report post Posted April 23, 2008 I use JS and AJAX to create graphs like this... function disp_charts(myxml){ mytype = document.getElementById('chart_type').value; var myChart = new FusionCharts("myurl/FusionCharts/" + mytype, "myChart", mywidth, myheight); myChart.setDataXML(escape(myxml)); myChart.render("report_chart"); gXML = myxml; } So the ajax call is made, which returns the XML and draws the chart, i then store the returned xml in gXML. So on my user interface I have a select list for ZOOM function , you'll notice the global vars mywidth & myheight. I then use the following onchange event for the zoom selector tool.... // Zoom Graph function zoom(per){ mywidth= 900; myheight = 400; mywidth = mywidth * per; myheight = myheight * per; mytype = document.getElementById('chart_type').value; if(mytype.match("Pie") != null || mytype.match("Dough") != null){ if(mytype.match("FCF_Pie3D") != null){ pRad = 300; } else{ pRad = 150; } var oVal = cPer * pRad; var nVal = per * pRad; cPer = per; gXML = gXML.replace("pieRadius='"+oVal+"'","pieRadius='"+nVal+"'"); } var myChart = new FusionCharts("myurl/FusionCharts/" + mytype, "myChart", mywidth, myheight); myChart.setDataXML(escape(gXML)); myChart.render("report_chart"); } You will notice i've had to deal with pie charts and the fact that 2d & 3d use different sizes for radius. So you could possibly use this logic to enable 're-rendering' of charts with a different chart type via an onchange event select list. Hope this helps. Share this post Link to post Share on other sites