當前位置: 首頁>>代碼示例>>PHP>>正文


PHP XYDataSet類代碼示例

本文整理匯總了PHP中XYDataSet的典型用法代碼示例。如果您正苦於以下問題:PHP XYDataSet類的具體用法?PHP XYDataSet怎麽用?PHP XYDataSet使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了XYDataSet類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: display

 public function display()
 {
     /*CHART*/
     $chart = new VerticalBarChart(4500, 350);
     $dataSet = new XYDataSet();
     foreach ($this->data as $key => $datum) {
         $dataSet->addPoint(new Point($datum['client_ip'], $datum['frequency']));
     }
     $chart->setDataSet($dataSet);
     $chart->getPlot()->setLogoFileName("");
     //clear the image logo
     $chart->setTitle("");
     //clear the image title
     $chart->render("front-end/images/client_request_vertical_bar_plot.png");
     /*CHART*/
     $session = SessionFactory::create();
     $dom = DOMHandlerFactory::create();
     $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'));
     $selectedDate = $session->get("selected-date");
     $title = "<h3>Bar Graph IP requests for the day: " . $selectedDate . " </h3>";
     $dom->whereIdIs("body-title")->insertNode($title);
     $graph = '<div style="text-align: center;">
     			<img src="front-end/images/client_request_vertical_bar_plot.png" alt="" border="0">
     			</div>';
     $dom->whereIdIs("squidDataContainer")->insertNode($graph);
     $dom->display();
 }
開發者ID:argosback,項目名稱:statistical-log-analizer,代碼行數:27,代碼來源:V_ClientRequestVerticalBarPlot.php

示例2: setData

 public function setData($data)
 {
     $dataSet = new XYDataSet();
     foreach ($data as $info) {
         $dataSet->addPoint(new Point($info[0], $info[1]));
     }
     $this->chart->setDataSet($dataSet);
 }
開發者ID:chriistiian,項目名稱:phpexcel-adodb-report-generator,代碼行數:8,代碼來源:Charting.class.php

示例3: display

 public function display()
 {
     $chart = new LineChart(4500, 350);
     $dataSet = new XYDataSet();
     foreach ($this->data as $key => $datum) {
         $dataSet->addPoint(new Point($datum['client_ip'], $datum['frequency']));
     }
     $chart->setDataSet($dataSet);
     $chart->setTitle("Client Request Frequency Line Plot");
     $chart->render("front-end/images/client_request_vertical_bar_plot.png");
     $session = SessionFactory::create();
     $dom = DOMHandlerFactory::create();
     $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'));
     $graph = '<div style="text-align: center;">
                 <img src="front-end/images/client_request_vertical_bar_plot.png" alt="" border="0">
                 </div>';
     $dom->whereIdIs("squidDataContainer")->insertNode($graph);
     $dom->display();
 }
開發者ID:argosback,項目名稱:statistical-log-analizer,代碼行數:19,代碼來源:V_ClientRequestFrequencyLinePlot.php

示例4: display

 public function display()
 {
     $session = SessionFactory::create();
     $clientIp = $session->get("selected-client-ip");
     $date = $session->get("selected-date");
     $beginTime = $this->data[0]['time'];
     $endTime = end($this->data)['time'];
     /*CHART*/
     // $chart = new HorizontalBarChart(800,30000);
     $chart = new LineChart(3000, 500);
     $dataSet = new XYDataSet();
     // $protocols = array('http://', 'https://', 'ftp://', 'www.');
     foreach ($this->data as $key => $datum) {
         // $domain = explode('/', str_replace($protocols, '', $datum['url']));
         $dataSet->addPoint(new Point("", $datum['frequency']));
     }
     $chart->setDataSet($dataSet);
     $chart->getPlot()->setGraphPadding(new Padding(5, 3, 20, 140));
     $chart->getPlot()->setLogoFileName("");
     //clear the image logo
     $chart->setTitle("");
     //clear the image title
     $chart->render("front-end/images/domains_request_horizontal_bar_plot.png");
     /*CHART*/
     $session = SessionFactory::create();
     $dom = DOMHandlerFactory::create();
     $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'));
     //INSERT TITLE:
     $title = "<h3>Client (" . $clientIp . ") Domains Request Frequency Bar Plot, at: " . $date . " between: " . $beginTime . " and " . $endTime . "</h3>";
     $dom->whereIdIs("body-title")->insertNode($title);
     $graph = '<div style="text-align: center;">
     			<img 
     				src="front-end/images/domains_request_horizontal_bar_plot.png" 
     				alt="" border="0">
     			</div>';
     $dom->whereIdIs("squidDataContainer")->insertNode($graph);
     $dom->display();
 }
開發者ID:argosback,項目名稱:statistical-log-analizer,代碼行數:38,代碼來源:V_DomainsRequestLineChart.php

示例5: create_bar_chart

/**
 * @author Ibnu Daqiqil Id
 * @param string 	$title 	Judul Chart
 * @param array 	$data 	Data array dengan dua dimensi (key,value)
 * @param integer 	$x		Lebar chart
 * @param integer	$y		Tinggi Chart
 * @param string	$type 	tipe output chart (bar_vertikal,bar_horizontal,pie)
 * @param boolean	$render	Apakah di render ke file?
 */
function create_bar_chart($title, $data, $x = 500, $y = 300, $type = "bar_vertikal", $render_file = FALSE)
{
    if ("bar_horizontal" == $type) {
        $chart = new HorizontalBarChart($x, $y);
    } else {
        if ("bar_vertikal" == $type) {
            $chart = new VerticalBarChart($x, $y);
        } else {
            $chart = new PieChart($x, $y);
        }
    }
    $dataSet = new XYDataSet();
    foreach ($data as $value) {
        $dataSet->addPoint(new Point($value['key'], $value['value']));
    }
    $chart->setDataSet($dataSet);
    $chart->setTitle($title);
    if (!$render_file) {
        return $chart->render();
    } else {
        return $chart->render($render_file);
    }
}
開發者ID:rasyid46,項目名稱:ci_crud,代碼行數:32,代碼來源:chart_pi.php

示例6: renderLineChart

function renderLineChart($value_arrays, $labels = NULL, $title = '', $xlabels = NULL)
{
    $chart = new LineChart(1000, 400);
    $dataSet = new XYSeriesDataSet();
    for ($va = 0; $va < sizeof($value_arrays); $va++) {
        $value_array = $value_arrays[$va];
        $ds = new XYDataSet();
        if (sizeof($value_array)) {
            for ($x = 0; $x < sizeof($value_array); $x++) {
                if ($xlabels) {
                    $label = $xlabels[$x];
                } else {
                    $label = $x + 1;
                }
                $ds->addPoint(new Point($label, $value_array[$x]));
            }
        } else {
            // need at least one point or will except
            $ds->addPoint(new Point(1, 0));
        }
        if ($labels) {
            $label = $labels[$va];
        } else {
            $label = $va;
        }
        $dataSet->addSerie($label, $ds);
    }
    $chart->setDataSet($dataSet);
    $chart->setTitle($title);
    $name = tempnam('/tmp', '.png');
    $chart->render($name);
    $image = base64_encode(file_get_contents($name));
    unlink($name);
    echo '<div style="text-align: center"><img src="data:image/png;base64,';
    echo $image;
    echo '"></div>';
}
開發者ID:acculitx,項目名稱:fleetmatrixsite,代碼行數:37,代碼來源:render.php

示例7: display

 public function display()
 {
     $session = SessionFactory::create();
     $clientIp = $session->get("selected-client-ip");
     $date = $session->get("selected-date");
     $beginTime = $this->data[0]['time'];
     $endTime = end($this->data)['time'];
     /*CHART*/
     $chart = new LineChart(1400, 500);
     $serie1 = new XYDataSet();
     foreach ($this->data as $key => $datum) {
         $serie1->addPoint(new Point("", $datum['client_data']));
     }
     $dataSet = new XYSeriesDataSet();
     $dataSet->addSerie("Client: " . $clientIp . " at " . $date, $serie1);
     $chart->setDataSet($dataSet);
     $chart->getPlot()->setGraphPadding(new Padding(5, 3, 20, 140));
     $chart->setTitle("");
     //clear the image title
     $chart->getPlot()->setLogoFileName("");
     //clear the image logo
     $chart->render("front-end/images/client_data_line_plot.png");
     /*CHART*/
     //DOM:
     $dom = DOMHandlerFactory::create();
     $dom->setDocumentFromFile(STATISTICAL_LOG_ANALIZER_HTML)->whereIdIs('login-user')->insertNode($session->get('session-user-name'));
     //INSERT TITLE:
     $title = "<h3>Client (" . $clientIp . ") Data Consumption Line Chart, \n                            at: " . $date . " between: " . $beginTime . " and " . $endTime . "</h3>";
     $dom->whereIdIs("body-title")->insertNode($title);
     //INSERT GRAPH:
     $graph = '<div style="text-align: center;">
                 <img src="front-end/images/client_data_line_plot.png" alt="" border="0">
                 </div>';
     $dom->whereIdIs("squidDataContainer")->insertNode($graph);
     $dom->display();
 }
開發者ID:argosback,項目名稱:statistical-log-analizer,代碼行數:36,代碼來源:V_ClientDataLineChart.php

示例8: grafico_doppio

function grafico_doppio($v, $nomegrafico, $titolo, $i, $ii, $init)
{
    //	$chart = new VerticalBarChart(600,200);
    //	$chart = new VerticalBarChart();
    $chart = new LineChart();
    $dataSet = new XYDataSet();
    $x = $init;
    foreach ($v as $e) {
        $dataSet->addPoint(new Point(sprintf("%02d", $x), $e[$i] + 0));
        $x = $x + 1;
    }
    $dataSet1 = new XYDataSet();
    $x = $init;
    foreach ($v as $e) {
        $dataSet1->addPoint(new Point(sprintf("%02d", $x), $e[$ii] + 0));
        $x = $x + 1;
    }
    $dataSet3 = new XYSeriesDataSet();
    $dataSet3->addSerie("Vento Medio", $dataSet);
    $dataSet3->addSerie("Raffiche", $dataSet1);
    $chart->setDataSet($dataSet3);
    $chart->setTitle($titolo);
    $chart->render($nomegrafico);
}
開發者ID:ninux-fi,項目名稱:monitoring_scripts,代碼行數:24,代碼來源:graph.php

示例9: getDatasetCasesByProcess

 function getDatasetCasesByProcess()
 {
     $dataSet = new XYDataSet();
     $processObj = new Process();
     $c = new Criteria('workflow');
     $c->clearSelectColumns();
     $c->addSelectColumn(ApplicationPeer::PRO_UID);
     $c->addSelectColumn('COUNT(*) AS CANT');
     //$c->addJoin( ProcessPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
     $c->addGroupByColumn(ApplicationPeer::PRO_UID);
     $rs = ApplicationPeer::doSelectRS($c);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     $row = $rs->getRow();
     while (is_array($row)) {
         $processObj->load($row['PRO_UID']);
         $label = $processObj->getProTitle();
         $value = $row['CANT'];
         $dataSet->addPoint(new Point($label, (int) $value));
         $rs->next();
         $row = $rs->getRow();
     }
     return $dataSet;
 }
開發者ID:emildev35,項目名稱:processmaker,代碼行數:24,代碼來源:class.charts.php

示例10: Point

$serie1->addPoint(new Point("{$month} 17, {$year} ", $ro->getPxCensusMonth($month, "17", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 18, {$year} ", $ro->getPxCensusMonth($month, "18", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 19, {$year} ", $ro->getPxCensusMonth($month, "19", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 20, {$year} ", $ro->getPxCensusMonth($month, "20", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 21, {$year} ", $ro->getPxCensusMonth($month, "21", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 22, {$year} ", $ro->getPxCensusMonth($month, "22", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 23, {$year} ", $ro->getPxCensusMonth($month, "23", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 24, {$year} ", $ro->getPxCensusMonth($month, "24", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 25, {$year} ", $ro->getPxCensusMonth($month, "25", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 26, {$year} ", $ro->getPxCensusMonth($month, "26", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 27, {$year} ", $ro->getPxCensusMonth($month, "27", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 28, {$year} ", $ro->getPxCensusMonth($month, "28", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 29, {$year} ", $ro->getPxCensusMonth($month, "29", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 30, {$year} ", $ro->getPxCensusMonth($month, "30", $year, "OPD")));
$serie1->addPoint(new Point("{$month} 31, {$year} ", $ro->getPxCensusMonth($month, "31", $year, "OPD")));
$serie2 = new XYDataSet();
$serie2->addPoint(new Point("{$month} 1, {$year}", $ro->getPxCensusMonth($month, "01", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 2, {$year}", $ro->getPxCensusMonth($month, "02", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 3, {$year} ", $ro->getPxCensusMonth($month, "03", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 4, {$year} ", $ro->getPxCensusMonth($month, "04", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 5, {$year}", $ro->getPxCensusMonth($month, "05", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 6, {$year}", $ro->getPxCensusMonth($month, "06", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 7, {$year}", $ro->getPxCensusMonth($month, "07", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 8, {$year}", $ro->getPxCensusMonth($month, "08", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 9, {$year}", $ro->getPxCensusMonth($month, "09", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 10, {$year}", $ro->getPxCensusMonth($month, "10", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 11, {$year}", $ro->getPxCensusMonth($month, "11", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 12, {$year}", $ro->getPxCensusMonth($month, "12", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 13, {$year}", $ro->getPxCensusMonth($month, "13", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 14, {$year}", $ro->getPxCensusMonth($month, "14", $year, "IPD")));
$serie2->addPoint(new Point("{$month} 15, {$year}", $ro->getPxCensusMonth($month, "15", $year, "IPD")));
開發者ID:rickyx12,項目名稱:protacio,代碼行數:31,代碼來源:monthlyRegistrationCensus.php

示例11: Point

$serie1->addPoint(new Point("{$month} 17, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "17", $year), 2)));
$serie1->addPoint(new Point("{$month} 18, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "18", $year), 2)));
$serie1->addPoint(new Point("{$month} 19, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "19", $year), 2)));
$serie1->addPoint(new Point("{$month} 20, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "20", $year), 2)));
$serie1->addPoint(new Point("{$month} 21, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "21", $year), 2)));
$serie1->addPoint(new Point("{$month} 22, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "22", $year), 2)));
$serie1->addPoint(new Point("{$month} 23, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "23", $year), 2)));
$serie1->addPoint(new Point("{$month} 24, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "24", $year), 2)));
$serie1->addPoint(new Point("{$month} 25, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "25", $year), 2)));
$serie1->addPoint(new Point("{$month} 26, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "26", $year), 2)));
$serie1->addPoint(new Point("{$month} 27, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "27", $year), 2)));
$serie1->addPoint(new Point("{$month} 28, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "28", $year), 2)));
$serie1->addPoint(new Point("{$month} 29, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "29", $year), 2)));
$serie1->addPoint(new Point("{$month} 30, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "30", $year), 2)));
$serie1->addPoint(new Point("{$month} 31, {$year} ", number_format($ro->getPxRevenueDaily_opd($month, "31", $year), 2)));
$serie2 = new XYDataSet();
$serie2->addPoint(new Point("{$month} 1, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "01", $year), 2)));
$serie2->addPoint(new Point("{$month} 2, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "02", $year), 2)));
$serie2->addPoint(new Point("{$month} 3, {$year} ", number_format($ro->getPxRevenueDaily_ipd($month, "03", $year), 2)));
$serie2->addPoint(new Point("{$month} 4, {$year} ", number_format($ro->getPxRevenueDaily_ipd($month, "04", $year), 2)));
$serie2->addPoint(new Point("{$month} 5, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "05", $year), 2)));
$serie2->addPoint(new Point("{$month} 6, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "06", $year), 2)));
$serie2->addPoint(new Point("{$month} 7, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "07", $year), 2)));
$serie2->addPoint(new Point("{$month} 8, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "08", $year), 2)));
$serie2->addPoint(new Point("{$month} 9, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "09", $year), 2)));
$serie2->addPoint(new Point("{$month} 10, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "10", $year), 2)));
$serie2->addPoint(new Point("{$month} 11, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "11", $year), 2)));
$serie2->addPoint(new Point("{$month} 12, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "12", $year), 2)));
$serie2->addPoint(new Point("{$month} 13, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "13", $year), 2)));
$serie2->addPoint(new Point("{$month} 14, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "14", $year), 2)));
$serie2->addPoint(new Point("{$month} 15, {$year}", number_format($ro->getPxRevenueDaily_ipd($month, "15", $year), 2)));
開發者ID:rickyx12,項目名稱:protacio,代碼行數:31,代碼來源:monthlyRevenue.php

示例12: Point

$serie2->addPoint(new Point("Nov {$year}", $ro->getGenderAnnual("11", $year, "female", "OPD")));
$serie2->addPoint(new Point("Dec {$year}", $ro->getGenderAnnual("12", $year, "female", "OPD")));
$serie3 = new XYDataSet();
$serie3->addPoint(new Point("Jan {$year}", $ro->getGenderAnnual("01", $year, "male", "IPD")));
$serie3->addPoint(new Point("Feb {$year}", $ro->getGenderAnnual("02", $year, "male", "IPD")));
$serie3->addPoint(new Point("Mar {$year}", $ro->getGenderAnnual("03", $year, "male", "IPD")));
$serie3->addPoint(new Point("Apr {$year}", $ro->getGenderAnnual("04", $year, "male", "IPD")));
$serie3->addPoint(new Point("May {$year}", $ro->getGenderAnnual("05", $year, "male", "IPD")));
$serie3->addPoint(new Point("Jun {$year}", $ro->getGenderAnnual("06", $year, "male", "IPD")));
$serie3->addPoint(new Point("Jul {$year}", $ro->getGenderAnnual("07", $year, "male", "IPD")));
$serie3->addPoint(new Point("Aug {$year}", $ro->getGenderAnnual("08", $year, "male", "IPD")));
$serie3->addPoint(new Point("Sep {$year}", $ro->getGenderAnnual("09", $year, "male", "IPD")));
$serie3->addPoint(new Point("Oct {$year}", $ro->getGenderAnnual("10", $year, "male", "IPD")));
$serie3->addPoint(new Point("Nov {$year}", $ro->getGenderAnnual("11", $year, "male", "IPD")));
$serie3->addPoint(new Point("Dec {$year}", $ro->getGenderAnnual("12", $year, "male", "IPD")));
$serie4 = new XYDataSet();
$serie4->addPoint(new Point("Jan {$year}", $ro->getGenderAnnual("01", $year, "female", "IPD")));
$serie4->addPoint(new Point("Feb {$year}", $ro->getGenderAnnual("02", $year, "female", "IPD")));
$serie4->addPoint(new Point("Mar {$year}", $ro->getGenderAnnual("03", $year, "female", "IPD")));
$serie4->addPoint(new Point("Apr {$year}", $ro->getGenderAnnual("04", $year, "female", "IPD")));
$serie4->addPoint(new Point("May {$year}", $ro->getGenderAnnual("05", $year, "female", "IPD")));
$serie4->addPoint(new Point("Jun {$year}", $ro->getGenderAnnual("06", $year, "female", "IPD")));
$serie4->addPoint(new Point("Jul {$year}", $ro->getGenderAnnual("07", $year, "female", "IPD")));
$serie4->addPoint(new Point("Aug {$year}", $ro->getGenderAnnual("08", $year, "female", "IPD")));
$serie4->addPoint(new Point("Sep {$year}", $ro->getGenderAnnual("09", $year, "female", "IPD")));
$serie4->addPoint(new Point("Oct {$year}", $ro->getGenderAnnual("10", $year, "female", "IPD")));
$serie4->addPoint(new Point("Nov {$year}", $ro->getGenderAnnual("11", $year, "female", "IPD")));
$serie4->addPoint(new Point("Dec {$year}", $ro->getGenderAnnual("12", $year, "female", "IPD")));
$dataSet = new XYSeriesDataSet();
$dataSet->addSerie("OPD Male", $serie1);
$dataSet->addSerie("OPD Female", $serie2);
開發者ID:rickyx12,項目名稱:protacio,代碼行數:31,代碼來源:annualGenderCensus.php

示例13: hundredsBarChart

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
/**
 * Multiple horizontal bar chart demonstration.
 *
 */
include "../../../COCONUT/libchart/libchart/classes/libchart.php";
$chart = new hundredsBarChart(4000, 1500);
$ro = new database1();
$serie1 = new XYDataSet();
$serie1->addPoint(new Point("{$month} 31", number_format($ro->getBestSellingChart_opd($month, "31", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 30", number_format($ro->getBestSellingChart_opd($month, "30", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 29", number_format($ro->getBestSellingChart_opd($month, "29", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 28", number_format($ro->getBestSellingChart_opd($month, "28", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 27", number_format($ro->getBestSellingChart_opd($month, "27", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 26", number_format($ro->getBestSellingChart_opd($month, "26", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 25", number_format($ro->getBestSellingChart_opd($month, "25", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 24", number_format($ro->getBestSellingChart_opd($month, "24", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 23", number_format($ro->getBestSellingChart_opd($month, "23", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 22", number_format($ro->getBestSellingChart_opd($month, "22", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 21", number_format($ro->getBestSellingChart_opd($month, "21", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 20", number_format($ro->getBestSellingChart_opd($month, "20", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 19", number_format($ro->getBestSellingChart_opd($month, "19", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 18", number_format($ro->getBestSellingChart_opd($month, "18", $year, $description) / 100, 2)));
$serie1->addPoint(new Point("{$month} 17", number_format($ro->getBestSellingChart_opd($month, "17", $year, $description) / 100, 2)));
開發者ID:rickyx12,項目名稱:protacio,代碼行數:31,代碼來源:bestSellingChart.php

示例14: PieChart

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
/**
 * Pie chart demonstration
 *
 */
include "../../../COCONUT/libchart/libchart/classes/libchart.php";
$chart = new PieChart();
$ro = new database1();
$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("OPD (" . number_format($ro->getPxRevenueDaily_opd($fromMonth, $fromDay, $fromYear), 2) . ")", $ro->getPxRevenueDaily_opd($fromMonth, $fromDay, $fromYear)));
$dataSet->addPoint(new Point("IPD (" . number_format($ro->getPxRevenueDaily_ipd($fromMonth, $fromDay, $fromYear), 2) . ")", $ro->getPxRevenueDaily_ipd($fromMonth, $fromDay, $fromYear)));
$chart->setDataSet($dataSet);
$chart->setTitle("Collection Report For {$fromMonth} {$fromDay}, {$fromYear} ");
$chart->render("../../../COCONUT/graphicalReport/chartList/dailyRevenue.png");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title></title>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
</head>
<body>
	<img alt="Pie chart"  src="/COCONUT/graphicalReport/chartList/dailyRevenue.png" style="border: 1px solid gray;"/>
</body>
開發者ID:rickyx12,項目名稱:protacio,代碼行數:31,代碼來源:revenuePie_dec5.php

示例15: LineChart

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
/**
 * Line chart demonstration
 *
 */
include "../libchart/classes/libchart.php";
$chart = new LineChart();
$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("06-01", 273));
$dataSet->addPoint(new Point("06-02", 421));
$dataSet->addPoint(new Point("06-03", 642));
$dataSet->addPoint(new Point("06-04", 799));
$dataSet->addPoint(new Point("06-05", 1009));
$dataSet->addPoint(new Point("06-06", 1406));
$dataSet->addPoint(new Point("06-07", 1820));
$dataSet->addPoint(new Point("06-08", 2511));
$dataSet->addPoint(new Point("06-09", 2832));
$dataSet->addPoint(new Point("06-10", 3550));
$dataSet->addPoint(new Point("06-11", 4143));
$dataSet->addPoint(new Point("06-12", 4715));
$chart->setDataSet($dataSet);
$chart->setTitle("Sales for 2006");
$chart->render("generated/demo5.png");
開發者ID:ctariel,項目名稱:CyberGestionnaireLGB,代碼行數:31,代碼來源:LineChartTest.php


注:本文中的XYDataSet類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。