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


PHP Graph::SetyTitle方法代码示例

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


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

示例1: Graph

    $ydata2[$i] = 0;
    $i = 1;
    $xdata[$i] = $i;
    $xlabel[$i] = $month . "-" . $day + 1;
    $ydata1[$i] = 0;
    $ydata2[$i] = 0;
    $i = 2;
}
$graph = new Graph(600, 350);
$graph->addDebug("We appended {$i} rows of data to the graphing set.");
$graph->addDebug("{$begin_time}");
$graph->addDebug("{$sql}");
$data1 = $graph->AddData($xdata, $ydata1, $xlabel);
$data2 = $graph->AddData($xdata, $ydata2, $xlabel);
$graph->DrawGrid('gray');
$graph->LineGraph($data1, 'red');
$graph->LineGraph($data2, 'blue');
$pm = ProjectManager::instance();
$graph->SetTitle("Codendi Statistics: " . util_unconvert_htmlspecialchars($pm->getProject($group_id)->getPublicName()));
$graph->SetSubTitle("Page Views (red) and Downloads (blue) for the past {$i} days");
$graph->SetxTitle('Date');
$graph->SetyTitle('Views (red) / Downloads (blue)');
$graph->DrawAxis();
//$graph->showDebug();
// If PHP3 then assume GD library < 1.6 with only GIF Support
// if PHP4 then we have GD library >= 1.6 with only PNG Support
if (substr(phpversion(), 0, 1) == "3") {
    $graph->ShowGraph('gif');
} else {
    $graph->ShowGraph('png');
}
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:stats_graph.php

示例2: gmstrftime

// require you to be a member of the super-admin group
session_require(array('group' => '1', 'admin_flags' => 'A'));
$request = HTTPRequest::instance();
$group_id = $request->getValidated('group_id', 'GroupId');
if (!$group_id) {
    $group_id = 0;
}
$year = $request->getValidated('year', 'uint');
if (!$year) {
    $year = gmstrftime("%Y", time());
}
$sql = "SELECT month,day,site_views,subdomain_views FROM stats_site ORDER BY month ASC, day ASC";
$res = db_query($sql);
$i = 0;
while ($row = db_fetch_array($res)) {
    $xdata[$i] = $i;
    $xlabel[$i] = substr($row['month'], 4) + 1 - 1 . "/" . $row['day'];
    $ydata1[$i] = $row["site_views"] + $row["subdomain_views"];
    ++$i;
}
$graph = new Graph(750, 550);
$data1 = $graph->AddData($xdata, $ydata1, $xlabel);
$graph->DrawGrid('gray');
$graph->LineGraph($data1, 'red');
$graph->SetTitle("Codendi Page Views");
$graph->SetSubTitle("Page Views (RED) since beginning of time ( {$i} days )");
$graph->SetxTitle('Date');
$graph->SetyTitle('Views (RED)');
$graph->DrawAxis();
//$graph->showDebug();
$graph->ShowGraph('png');
开发者ID:pombredanne,项目名称:tuleap,代码行数:31,代码来源:views_graph.php

示例3: Graph

// Need at least 2 data points
//
if ($i == 0) {
    $xdata[0] = 0;
    $xlabel[0] = "";
    $ydata1[0] = 0;
    $ydata2[0] = 0;
    $xdata[1] = 1;
    $xlabel[1] = "";
    $ydata1[1] = 0;
    $ydata2[1] = 0;
}
if ($i == 1) {
    $xdata[1] = 1;
    $xlabel[1] = $xlabel[0];
    $ydata1[1] = $ydata1[0];
    $ydata2[1] = $ydata2[0];
}
$graph = new Graph(750, 550);
$data1 = $graph->AddData($xdata, $ydata1, $xlabel);
$data2 = $graph->AddData($xdata, $ydata2, $xlabel);
$graph->DrawGrid('gray');
$graph->LineGraph($data1, 'red');
$graph->LineGraph($data2, 'blue');
$graph->SetTitle(_('New Additions, by Day'));
$graph->SetSubTitle(_('New Users (RED), New Projects (BLUE)'));
$graph->SetxTitle(_('Date'));
$graph->SetyTitle(_('Users (RED) / Projects (BLUE)'));
$graph->DrawAxis();
//$graph->showDebug();
$graph->ShowGraph('png');
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:users_graph.php


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