示例#1
0
 function customizeGraph()
 {
     parent::customizeGraph();
     $this->prepareData();
     $this->set_data($this->arrayData);
     $this->set_x_labels($this->arrayLabel);
     $this->set_x_label_style(12, $this->x_axis_colour, 0, 2, $this->bg_colour);
     $this->set_x_axis_steps(2);
     $this->set_y_max($this->maxData);
     $this->y_label_steps(2);
     $this->bar_filled(50, '#3B5AA9', '#063E7E', 'visits', 10);
 }
示例#2
0
 function customizeGraph()
 {
     parent::customizeGraph();
     $this->prepareData();
     $this->set_y_max($this->maxData);
     $line_1 = new line_hollow(1, 3, '0x3357A0');
     $line_1->key('visits', 10);
     $i = 0;
     foreach ($this->arrayData as $value) {
         // hack until we have proper date handling
         $spacePosition = strpos($this->arrayLabel[$i], ' ');
         if ($spacePosition === false) {
             $spacePosition = strlen($this->arrayLabel[$i]);
         }
         // generate the link on the dot, to the given day' statistics
         $link = Piwik_Url::getCurrentScriptName() . Piwik_Url::getCurrentQueryStringWithParametersModified(array('date' => substr($this->arrayLabel[$i], 0, $spacePosition), 'module' => 'Home', 'action' => 'index', 'viewDataTable' => null));
         $line_1->add_link($value, $link);
         $i++;
     }
     $this->data_sets[] = $line_1;
     $this->set_x_labels($this->arrayLabel);
     $this->area_hollow(1, 3, 4, '0x3357A0', ' visits', 10);
 }