Source for file piechart1.php
Documentation is available at piechart1.php
include 'Image/Graph.php';
$Arial = & $Graph->addNew ('ttf_font', 'arial.ttf');
// set the font size to 11 pixels
// add a title using the created font
// create the 1st dataset
$Dataset1->addPoint ('Beef', rand(1 , 10 ));
$Dataset1->addPoint ('Pork', rand(1 , 10 ));
$Dataset1->addPoint ('Poultry', rand(1 , 10 ));
$Dataset1->addPoint ('Camels', rand(1 , 10 ));
$Dataset1->addPoint ('Other', rand(1 , 10 ));
// create the 1st plot as smoothed area chart using the 1st dataset
$Plot1 = & $Plotarea->addNew ('Image_Graph_Plot_Pie', &$Dataset1);
// create a Y data value marker
$Marker = & $Plot1->addNew ('Image_Graph_Marker_Value', VALUE_X );
// create a pin-point marker type
$PointingMarker = & $Plot1->addNew ('Image_Graph_Marker_Pointing_Angular', array (20 , &$Marker));
// and use the marker on the 1st plot
$Plot1->setMarker ($PointingMarker);
// format value marker labels as percentage values
$Plot1->setFillStyle ($FillArray);
Documentation generated on Mon, 11 Mar 2019 14:21:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|