/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php

require_once($ADEI_ROOTDIR . "/classes/views/basehistogramview.php");

class histogramview extends BASEHistogramView {
    var $title = "Histogram";

    function __construct(REQUEST $req  = NULL, $opts) {
        //$this->shelldisplay = false;
        parent::__construct($req, $opts);
    }

    function GetOptions() {
	$data = $this->GetDataOptions("x");
        $hist = $this->GetHistOptions();

        return array_merge($data, $hist);
    }

    function GetView() {
        $res = $this->GetData("x");
        $info = array(
            array("title"=>_("From"), "value" => date('c', $this->ivl->GetWindowStart())),
            array("title"=>_("To"), "value" => date('c', $this->ivl->GetWindowEnd())),
            array("title"=>_("Resolution"), "value" => $res['info'][0]['resolution']),
        );

        $x = array();
        foreach ($res['data'] as $val) {
            if (isset($val[0])) array_push($x, $val[0]);
        }

        $view = $this->GetHistView($x);
        $this->MergeViewInfo($view, $info, VIEW::MERGE_START);

        return $view;
    }
};

?>