AREA : render(); //------------------------------------------------------------------------------------------%Visit ------------------------------------------------------------------------------------------------- /** $VisitTarget = 550; $VisitActual = 200; $VisitChart = new FusionCharts("pie3d", "ex2", "40%", "250", "chartVisit", "json", '{ "chart": { "caption": "% Visit ", "subcaption": "(Actual visit VS. Target)", "startingangle": "120", "showlabels": "0", "showlegend": "1", "enablemultislicing": "0", "slicingdistance": "15", "showpercentvalues": "1", "showpercentintooltip": "0", "showvalue": "1", "plottooltext": "$datavalue", "theme": "zune" }, "data": [ { "label": "Target", "value": "550" }, { "label": "Actual", "value": "$VisitActual" } ] }'); // Render the chart $VisitChart->render(); **/ $sqlVisit = << array( "caption" => "% Visit Customer", "paletteColors" => "#0075c2", "bgColor" => "#ffffff", "borderAlpha"=> "20", "canvasBorderAlpha"=> "0", "usePlotGradientColor"=> "0", "plotBorderAlpha"=> "10", "showXAxisLine"=> "1", "xAxisLineColor" => "#999999", "showValues" => "0", "divlineColor" => "#999999", "divLineIsDashed" => "1", "showAlternateHGridColor" => "0" ) ); $arrData["data"] = array(); // Push the data into the array while($row = mysql_fetch_array($resultVisit)) { array_push($arrData["data"], array( "value" => $row["ActualVisit"], ) ); } $jsonDataVisit = json_encode($arrData); $visitChart = new FusionCharts("pie3D", "myFirstChart" , "40%", "250", "chartVisit", "json", $jsonDataVisit); // Render the chart $visitChart->render(); } ?>

Target Actual
Baht 2,500,000 980,000
Carton 50,000 12,889
Target Actual
Baht 2,500,000 980,000
Carton 50,000 12,889