本文整理汇总了PHP中Chart::Stroke方法的典型用法代码示例。如果您正苦于以下问题:PHP Chart::Stroke方法的具体用法?PHP Chart::Stroke怎么用?PHP Chart::Stroke使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chart
的用法示例。
在下文中一共展示了Chart::Stroke方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayAccumulatedGraph
/**
* Create a JpGraph accumulated barPlot chart
*
* @param Array $bplot Array of JpGraph barPlot objects
* @param Chart $graph The output graph that will contains accumulated barPlots
*
* @return Void
*/
private function displayAccumulatedGraph($bplot, $graph)
{
$abplot = new AccBarPlot($bplot);
$abplot->SetAbsWidth(10);
$graph->Add($abplot);
$graph->Stroke();
}
示例2: displayProjectTotalSizeGraph
/**
*
* @param Integer $groupId
* @param String $groupBy
* @param Date $startDate
* @param Date $endDate
* @param Boolean $absolute Is y-axis relative to data set or absolute (starting from 0)
*/
function displayProjectTotalSizeGraph($groupId, $groupBy, $startDate, $endDate, $absolute = true)
{
$graph = new Chart(420, 340, "auto");
$graph->img->SetMargin(70, 50, 30, 70);
$graph->SetScale("textlin");
$graph->title->Set("Total project size growth over the time");
$graph->yaxis->title->Set("Size");
$graph->yaxis->SetTitleMargin(60);
$graph->yaxis->setLabelFormatCallback(array($this, 'sizeReadable'));
if ($absolute) {
$graph->yaxis->scale->SetAutoMin(0);
}
$data = $this->_dum->getWeeklyEvolutionProjectTotalSize($groupId, $groupBy, $startDate, $endDate);
if (is_array($data) && count($data) > 1) {
$dates = array();
$ydata = array();
foreach ($data as $xdate => $values) {
$dates[] = $xdate;
$ydata[] = (double) $values;
}
$lineplot = new LinePlot($ydata);
$color = '#6BA132';
$lineplot->SetColor($color);
$lineplot->SetFillColor($color . ':1.5');
$lineplot->value->SetFont($graph->getFont(), FS_NORMAL, 8);
$lineplot->value->setFormatCallback(array($this, 'sizeReadable'));
$graph->Add($lineplot);
$graph->xaxis->title->Set("Weeks");
$graph->xaxis->SetTitleMargin(35);
$graph->xaxis->SetTickLabels($dates);
$graph->Stroke();
} else {
$this->displayError($GLOBALS['Language']->getText('plugin_statistics', 'no_data_error'));
}
}