当前位置: 首页>>代码示例>>PHP>>正文


PHP Chart::load方法代码示例

本文整理汇总了PHP中Chart::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Chart::load方法的具体用法?PHP Chart::load怎么用?PHP Chart::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Chart的用法示例。


在下文中一共展示了Chart::load方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Chart

        echo '</tr>';
        $i++;
    }
    echo '</table>';
} else {
    echo '<div class="report">No delivery orders found.</div>';
}
?>


<?php 
echo '<h2 class="report-title">Bottom Selling Produce</h2>';
if (count($reports['bottom_sellers']) > 0) {
    //show the chart
    $chart = new Chart('ColumnChart');
    $chart->load($reports['bottom_sellers'], 'array');
    $options = array('is3D' => true, 'width' => 800, 'height' => 400, 'hAxis' => array('title' => 'Produce Name'), 'chartArea' => array('top' => 5, 'height' => '80%'));
    echo $chart->draw('bottom_sellers', $options);
    echo '<div id="bottom_sellers" class="report-chart"></div>';
    //show the data
    echo '<table class="report-data">';
    echo '<tr>';
    echo '<th>Rank</th>';
    foreach (current($reports['bottom_sellers']) as $k => $v) {
        echo '<th>' . $k . '</th>';
    }
    echo '</tr>';
    $i = 1;
    foreach ($reports['bottom_sellers'] as $row_date => $row) {
        echo '<tr>';
        echo '<td>' . $i . '</td>';
开发者ID:nomoregrapes,项目名称:Fair-Food-Carlisle---Community-Edition,代码行数:31,代码来源:produce.php

示例2: TwitterDB

<html>
<head>
<?php 
include 'TwitterDB.php';
include 'Chart.php';
$twitterDB = new TwitterDB();
//$twitterDB->printArray($_SERVER);
$chart = new Chart('PieChart');
$options = array();
if (!empty($_GET) && isset($_GET) && array_key_exists('charts', $_GET) && !empty($_GET['charts'])) {
    $flag = false;
    if ($_GET['charts'] == 'retweetcount-vs-text') {
        $flag = true;
        $data = $twitterDB->getRetweetCountAndText();
        $chart->load($data, 'array');
        $options = array('title' => 'How many times a tweet is retweeted limited to 10.', 'is3D' => true, 'width' => 500, 'height' => 400);
    } else {
        if ($_GET['charts'] == 'different-days') {
            $flag = true;
            $data = $twitterDB->getTweetsOfDifferentDays();
            $chart->load($data, 'array');
            $options = array('title' => 'Different days tweets analytics', 'is3D' => true, 'width' => 500, 'height' => 400);
        } else {
            if ($_GET['charts'] == 'status-source') {
                $flag = true;
                $data = $twitterDB->getStatusSource();
                $chart->load($data, 'array');
                $options = array('title' => 'Different types of sources used to tweet', 'is3D' => true, 'width' => 500, 'height' => 400);
            } else {
                if ($_GET['charts'] == 'favorite-count') {
                    $flag = true;
开发者ID:harsh91,项目名称:twitter-analytics,代码行数:31,代码来源:tweets.php

示例3: createChart

 protected function createChart($chartDiv)
 {
     if (count($this->messageResults) == 0) {
         return '';
     }
     $chart = new Chart('ComboChart');
     $data = array();
     foreach ($this->messageResults as $row) {
         $data[] = array('ID' => $row['id'], 'Sent' => (int) $row['sent'], 'Opened' => (int) $row['openUsers'], 'Clicked' => (int) $row['clickUsers'], 'Bounced' => (int) $row['bouncecount']);
     }
     $chart->load($data, 'array');
     $options = array('height' => self::IMAGE_HEIGHT, 'axisTitlesPosition' => 'out', 'vAxis' => array('title' => 'Subscribers', 'gridlines' => array('count' => 10), 'logScale' => false, 'format' => '#'), 'hAxis' => array('title' => 'Campaign'), 'seriesType' => 'line', 'series' => array(0 => array('type' => 'bars')), 'legend' => array('position' => 'bottom'), 'colors' => array('blue', 'green', 'yellow', 'red'));
     $result = $chart->draw($chartDiv, $options);
     return $result;
 }
开发者ID:jbenicky,项目名称:phplist-plugin-statistics,代码行数:15,代码来源:Messages.php

示例4: Chart

        }
        echo '</tr>';
    }
    echo '</table>';
} else {
    echo '<div class="report">No orders made during this time period.</div>';
}
?>


<?php 
echo '<h2 class="report-title">Value of Orders</h2>';
if (count($reports['value']) > 0) {
    //show the chart
    $chart = new Chart('ColumnChart');
    $chart->load($reports['value'], 'array');
    $options = array('is3D' => true, 'width' => 800, 'height' => 400, 'hAxis' => array('title' => 'Date of Delivery'), 'chartArea' => array('top' => 5, 'height' => '80%'));
    echo $chart->draw('report-value', $options);
    echo '<div id="report-value" class="report-chart"></div>';
    //show the data
    echo '<table class="report-data">';
    echo '<tr>';
    foreach (current($reports['value']) as $k => $v) {
        echo '<th>' . $k . '</th>';
    }
    echo '</tr>';
    foreach ($reports['value'] as $row_date => $row) {
        echo '<tr>';
        foreach ($row as $k => $v) {
            if (is_float($v)) {
                echo '<td>&pound;' . number_format($v, 2) . '</td>';
开发者ID:nomoregrapes,项目名称:Fair-Food-Carlisle---Community-Edition,代码行数:31,代码来源:orders.php


注:本文中的Chart::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。