diff --git a/src/WriteDayOfWeekData.php b/src/WriteDayOfWeekData.php index 8f774b6..4c930c7 100644 --- a/src/WriteDayOfWeekData.php +++ b/src/WriteDayOfWeekData.php @@ -35,6 +35,18 @@ public function write() { $data[$item->getDateTimeAs('D')]++; } + if (true) { + $maxCommits = max($data); + $dataArray = $labelArray = array(); + foreach($data as $day=>$commits) { + $dataArray[] = intval($commits / $maxCommits * 100); + $labelArray[] = $day; + } + $url = 'http://chart.apis.google.com/chart?cht=bvg&chtt=Hour+Of+Day&chs=400x300&chxt=x&chxl=0:|'.implode('|',$labelArray).'&chd=t:'.implode(',',$dataArray); + + print $url; + } + if (isset($this->configData['file']) && $this->configData['file']) { if (!$handle = fopen($this->configData['file'], 'w')) {