Beispiel #1
0
/**
 * Returns graph of planned tasks in taskmanager
 * 
 * @param int $year
 * @return string
 */
function web_AnalyticsTaskmanMonthGraph($year)
{
    $allmonths = months_array();
    $yearcount = zb_AnalyticsTaskmanGetCountYear($year);
    $chartData = array(0 => array(__('Month'), __('Jobs')));
    $chartOptions = "\n            'focusTarget': 'category',\n                        'hAxis': {\n                        'color': 'none',\n                            'baselineColor': 'none',\n                    },\n                        'vAxis': {\n                        'color': 'none',\n                            'baselineColor': 'none',\n                    },\n                        'curveType': 'function',\n                        'pointSize': 5,\n                        'crosshair': {\n                        trigger: 'none'\n                    },";
    foreach ($yearcount as $eachmonth => $count) {
        $chartData[] = array($year . '-' . $eachmonth, $count);
    }
    $result = wf_gchartsLine($chartData, __('Task manager activity during the year'), '100%', '400px', $chartOptions) . wf_delimiter();
    return $result;
}
Beispiel #2
0
/**
 * Returns graph of planned tasks in taskmanager
 * 
 * @param int $year
 * @return string
 */
function web_AnalyticsTaskmanMonthGraph($year)
{
    $allmonths = months_array();
    $yearcount = zb_AnalyticsTaskmanGetCountYear($year);
    $data = __('Month') . ',' . __('Jobs') . "\n";
    foreach ($yearcount as $eachmonth => $count) {
        $data .= $year . '-' . $eachmonth . '-' . '-01,' . $count . "\n";
    }
    $result = wf_tag('div', false, '', '') . __('Task manager activity during the year');
    $result .= wf_Graph($data, '800', '300', false) . wf_tag('div', true);
    return $result;
}