} else {
                array_push($matchtype, $data[$c]);
            }
        }
    }
}
require_once "/var/www/ChartDirector/lib/phpchartdir.php";
# Create a PieChart object of size 360 x 300 pixels
$c = new PieChart(780, 390);
# Set the center of the pie at (180, 140) and the radius to 100 pixels
$c->setPieSize(410, 215, 195);
# Add a title to the pie chart
$c->addTitle($display_date);
# Set the color palette
$colors = array(0x3e8e35, 0x8fc28a, 0x2c7524, 0xe38919, 0xf8930d, 0xa86916, 0xc2965d);
# Set the font
$c->setLabelStyle("arial.ttf", 10);
# Set the sector colors
$c->setColors2(DataColor, $colors);
# Set the gradient
$c->setSectorStyle(LocalGradientShading);
# Draw the pie in 3D
$c->set3D();
$c->addLegend(0, 0);
$c->setLabelFormat("{percent}%");
# Set the pie data and the pie labels
$c->setData($count, $matchtype);
# Explode the 1st sector (index = 0)
$c->setExplode(0);
$filename = $path . "/provider/charts/tempimages/" . $imagename;
$c->makeChart($filename);