ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4include_once "Services/Chart/classes/class.ilChart.php";
5
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 {
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}
An exception for terminatinating execution or to throw for unit testing.
Chart data spider series.
Abstract chart data series base class.
Generator for spider charts.
addCustomJS()
Add type-specific JS script.
setLegLabels($a_val)
Set leg labels.
parseGlobalOptions(stdClass $a_options)
Convert (global) properties to flot config.
getLegLabels()
Get leg labels.
getYAxisMax()
Get y axis max value.
isValidDataType(ilChartData $a_series)
Validate data series.
getDataInstance($a_type=null)
Get data series instance.
setYAxisMax($a_val)
Set y axis max value.
Abstract Chart generator base class.
static renderColor($a_value, $a_opacity=1)
Render html color code.
$a_type
Definition: workflow.php:92