include("function.php"); include("FusionCharts.php"); include("connect_mysql.php"); //value $area = "N201"; $period = "2017"; ?>
AREA : =$area?> //------------------------------------------------------------------------------------------Actual VS Target ------------------------------------------------------------------------------------------------- $angularChart = new FusionCharts("AngularGauge", "ex1", "100%", "200", "chart-1", "json", '{ "chart": { "caption": "% Sales Actual vs. Target", "lowerlimit": "0", "upperlimit": "100", "lowerlimitdisplay": "0", "upperlimitdisplay": "Good", "palette": "1", "numbersuffix": "%", "tickvaluedistance": "10", "showvalue": "1", "gaugeinnerradius": "0", "bgcolor": "FFFFFF", "pivotfillcolor": "333333", "pivotradius": "8", "pivotfillmix": "333333, 333333", "pivotfilltype": "radial", "pivotfillratio": "0,100", "showtickvalues": "1", "showborder": "0" }, "colorrange": { "color": [ { "minvalue": "0", "maxvalue": "45", "code": "e44a00" }, { "minvalue": "45", "maxvalue": "75", "code": "f8bd19" }, { "minvalue": "75", "maxvalue": "100", "code": "6baa01" } ] }, "dials": { "dial": [ { "value": "90", "rearextension": "8", "radius": "100", "bgcolor": "333333", "bordercolor": "333333", "basewidth": "10" } ] } }'); $angularChart->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