cancan97 Report post Posted May 21, 2009 Hi, I try to use dril down chart in array but i can't. This is my code ; //print_r($grafik); die(); //print_r($baslik[0]['ADI']); die(); for($i=0; $i<sizeof($grafik); $i++){ $arrData[$i][0] = $grafik[$i]['YIL']."-".$grafik[$i]['AY']; $arrData[$i][1] = $grafik[$i]['ROUND(SUM(NVL(DEGER,0)))']; //SUM(NVL(DEGER,0)) } // print_r($arrData); die(); # Create FusionCharts PHP Class object for multiseies column3d chart $FC = new FusionCharts("Column3D","100%","100%"); # Set Relative Path of swf file. $FC->setSWFPath("http://localhost/ProjeYatirim/js/FusionCharts/"); # Define chart attributes $FC->setInitParam("scalemode","exactfit"); //echo "<pre>"; //print_r($arrData); die; $strParam="caption=".$baslik[0]['ADI'].";formatNumberScale=0;rotateValues=1;decimals=0;canvasBgColor=FFFFFF,FF5904;canvasBgAlpha=100,40;canvasBgRatio=0,100; canvasBgAngle=180;labelDisplay=Rotate;showValues=0;". for($i=0; $i<sizeof($grafik); $i++){ echo"clickURL=http://localhost/ProjeYatirim/index.php?/proje/zamanAltGrafik/".$arrData[$i][0]; }.""; //paletteColors=FF5904,0372AB,FF0000 # Set chart attributes $FC->setChartParams($strParam); # Pass the 2 arrays storing data and category names to # FusionCharts PHP Class function addChartDataFromArray $FC->addChartDataFromArray($arrData); # Render the Chart $FC->renderChart(); ?> PC : i use PHPCLass structure to get chart data from array therefore "link" properties does not work. (link properties work only data from xml). What can i do to solve this? Thanks Share this post Link to post Share on other sites
saptarshi Report post Posted May 22, 2009 Hello, Could you please attach the XML that is generated, so that we may have a look? You can get the XML by going to 'View Source' in the browser. Share this post Link to post Share on other sites
cancan97 Report post Posted May 22, 2009 Hi Saptarshi, i dont use xml file to draw chart. use php codeigniter framework and get my data from oracle db. so put my data in to array. Drawing chart with "$FC->addChartDataFromArray($arrData);" code. Fussion PHP Array Chart usage allows only "clickURL" attribute set the entire chart. but i can do this. ("$FC->addChartDataFromArray($arrData);") this property not allowed to use "link" properties to pass array specific data to drill down chart. i want to use like "link" attribute for using drill down chart. Thanks. Share this post Link to post Share on other sites
pohng Report post Posted July 1, 2009 From the php class documentation, it doesn't look like the addchartdatafromarray method allows adding link parameters for drilldown charts. It does look like, however, you can add links with the addDataFromDatabase method in php, which might be an option. You could probably create an array that was structurally similar to the database return, and use this method instead. In practice, however, it would be much more useful to add these parameters to the addchartdatafromarray method, as most database reads require some manipulation before passing directly into the chart rendering engine. In other words, I don't want to have to write a query for each graph I draw...I want to be able to draw multiple graphs from the same query. If there isn't a better option, I'll probably write my own method and add it to the php class. Can I please get confirmation from an admin on this? Thanks! Great product so far. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted July 9, 2009 Hi, ClickURL attributes work in PHPClass too. Please make sure you are using v3 charts, as this feature is not available in FusionCharts vFREE version. Could you please right click on the browser (say, Internet Explorer ) and get the generate HTML from "View Source" menu option? This would give us the XML generated as well as other discrepancies that might be occurring. Share this post Link to post Share on other sites