ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilChartSpider.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once "Services/Chart/classes/class.ilChart.php";
5 
13 class ilChartSpider extends ilChart
14 {
15  protected $leg_labels = array(); // [array]
16  protected $y_max = 0; // [float]
17 
18  public function getDataInstance($a_type = null)
19  {
20  include_once "Services/Chart/classes/class.ilChartDataSpider.php";
21  return new ilChartDataSpider();
22  }
23 
24  protected function isValidDataType(ilChartData $a_series)
25  {
26  return ($a_series instanceof ilChartDataSpider);
27  }
28 
34  public function setLegLabels($a_val)
35  {
36  $this->leg_labels = $a_val;
37  }
38 
44  public function getLegLabels()
45  {
46  return $this->leg_labels;
47  }
48 
49 
55  public function setYAxisMax($a_val)
56  {
57  $this->y_max = $a_val;
58  }
59 
65  public function getYAxisMax()
66  {
67  return $this->y_max;
68  }
69 
70  protected function addCustomJS()
71  {
72  $tpl = $this->tpl;
73 
74  $tpl->addJavascript("Services/Chart/js/flot/jquery.flot.highlighter.js");
75  $tpl->addJavascript("Services/Chart/js/flot/jquery.flot.spider.js");
76  }
77 
78  public function parseGlobalOptions(stdClass $a_options)
79  {
80  $a_options->grid = new stdClass();
81  $a_options->grid->hoverable = false;
82  $a_options->grid->clickable = false;
83  $a_options->grid->ticks = $this->getYAxisMax();
84  $a_options->grid->tickColor = ilChart::renderColor("#000", "0.1");
85  $a_options->grid->mode = "spider";
86  }
87 }
Chart data spider series.
parseGlobalOptions(stdClass $a_options)
Generator for spider charts.
getYAxisMax()
Get y axis max value.
Abstract Chart generator base class.
$a_type
Definition: workflow.php:92
isValidDataType(ilChartData $a_series)
getLegLabels()
Get leg labels.
setYAxisMax($a_val)
Set y axis max value.
Create styles array
The data for the language used.
setLegLabels($a_val)
Set leg labels.
getDataInstance($a_type=null)
static renderColor($a_value, $a_opacity=1)
Render html color code.
Abstract chart data series base class.