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


PHP Chart::Stroke方法代码示例

本文整理汇总了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();
 }
开发者ID:nterray,项目名称:tuleap,代码行数:15,代码来源:Git_LastPushesGraph.class.php

示例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'));
     }
 }
开发者ID:nterray,项目名称:tuleap,代码行数:43,代码来源:Statistics_DiskUsageGraph.class.php


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