ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
getDataInstance (?int $a_type=null) | |
Get data series instance. More... | |
setSize (string $a_x, string $a_y) | |
Set chart size. More... | |
addData (ilChartData $a_series, ?int $a_idx=null) | |
Add data series. More... | |
setLegend (ilChartLegend $a_legend) | |
setColors (array $a_values) | |
getColors () | |
setShadow (int $a_value) | |
getShadow () | |
setAutoResize (bool $a_value) | |
Toggle auto-resizing on window resize/redraw. More... | |
setStacked (bool $a_value) | |
parseGlobalOptions (stdClass $a_options) | |
Convert (global) properties to flot config. More... | |
getHTML () | |
Render. More... | |
Static Public Member Functions | |
static | getInstanceByType (int $a_type, string $a_id) |
static | isValidColor (string $a_value) |
Validate html color code. More... | |
static | renderColor (string $a_value, float $a_opacity=1) |
Render html color code. More... | |
Data Fields | |
const | TYPE_GRID = 1 |
const | TYPE_PIE = 2 |
const | TYPE_SPIDER = 3 |
Protected Member Functions | |
__construct (string $a_id) | |
isValidDataType (ilChartData $a_series) | |
Validate data series. More... | |
isValid () | |
Basic validation. More... | |
initJS () | |
Init JS script files. More... | |
addCustomJS () | |
Add type-specific JS script. More... | |
Protected Attributes | |
ilGlobalTemplateInterface | $tpl |
string | $id = "" |
string | $width = "" |
string | $height = "" |
array | $data = [] |
ilChartLegend | $legend = null |
int | $shadow = 0 |
array | $colors = [] |
bool | $auto_resize = false |
bool | $stacked = false |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Abstract Chart generator base class
Definition at line 23 of file class.ilChart.php.
|
protected |
Definition at line 40 of file class.ilChart.php.
References $DIC, and setShadow().
|
protected |
Add type-specific JS script.
Definition at line 219 of file class.ilChart.php.
Referenced by initJS().
ilChart::addData | ( | ilChartData | $a_series, |
?int | $a_idx = null |
||
) |
Add data series.
Definition at line 101 of file class.ilChart.php.
References $data, isValidDataType(), and null.
ilChart::getColors | ( | ) |
Definition at line 129 of file class.ilChart.php.
References $colors.
Referenced by getHTML().
|
abstract |
Get data series instance.
Referenced by getInstanceByType().
ilChart::getHTML | ( | ) |
Render.
Definition at line 233 of file class.ilChart.php.
References $stacked, getColors(), getShadow(), initJS(), isValid(), and parseGlobalOptions().
|
static |
Definition at line 51 of file class.ilChart.php.
References getDataInstance(), isValidDataType(), and null.
Referenced by SurveyMetricQuestionEvaluation\getChart(), SurveyMatrixQuestionEvaluation\getChart(), SurveyQuestionEvaluation\getChart(), ilSessionStatisticsGUI\getChart(), ilLPObjectStatisticsTypesTableGUI\getGraph(), ilLPObjectStatisticsDailyTableGUI\getGraph(), ilLPObjectStatisticsTableGUI\getGraph(), ilLPObjectStatisticsLPTableGUI\getGraph(), and ilWikiStatGUI\renderGraph().
ilChart::getShadow | ( | ) |
Definition at line 173 of file class.ilChart.php.
References $shadow.
Referenced by getHTML().
|
protected |
Init JS script files.
Definition at line 195 of file class.ilChart.php.
References $tpl, addCustomJS(), ILIAS\UICore\GlobalTemplate\addJavaScript(), iljQueryUtil\initjQuery(), and ILIAS\UI\examples\Chart\Bar\Horizontal\stacked().
Referenced by getHTML().
|
protected |
Basic validation.
Definition at line 81 of file class.ilChart.php.
Referenced by getHTML().
|
static |
Validate html color code.
Definition at line 137 of file class.ilChart.php.
Referenced by ilChartLegend\setBackground(), ilChartData\setFill(), and ilChartLegend\setLabelBorder().
|
abstractprotected |
Validate data series.
Referenced by addData(), and getInstanceByType().
ilChart::parseGlobalOptions | ( | stdClass | $a_options | ) |
Convert (global) properties to flot config.
Definition at line 226 of file class.ilChart.php.
Referenced by getHTML().
|
static |
Render html color code.
Definition at line 150 of file class.ilChart.php.
Referenced by ilChartDataSpider\parseData(), ilChartData\parseData(), ilChartDataSpider\parseGlobalOptions(), ilChartSpider\parseGlobalOptions(), ilChartDataPie\parseGlobalOptions(), and ilChartLegend\parseOptions().
ilChart::setAutoResize | ( | bool | $a_value | ) |
Toggle auto-resizing on window resize/redraw.
Definition at line 181 of file class.ilChart.php.
ilChart::setColors | ( | array | $a_values | ) |
Definition at line 120 of file class.ilChart.php.
ilChart::setLegend | ( | ilChartLegend | $a_legend | ) |
Definition at line 115 of file class.ilChart.php.
Referenced by ilChartPie\parseGlobalOptions().
ilChart::setShadow | ( | int | $a_value | ) |
Definition at line 168 of file class.ilChart.php.
Referenced by __construct().
ilChart::setSize | ( | string | $a_x, |
string | $a_y | ||
) |
Set chart size.
Definition at line 92 of file class.ilChart.php.
ilChart::setStacked | ( | bool | $a_value | ) |
Definition at line 187 of file class.ilChart.php.
References ILIAS\UI\examples\Chart\Bar\Horizontal\stacked().
|
protected |
Definition at line 37 of file class.ilChart.php.
|
protected |
Definition at line 36 of file class.ilChart.php.
Referenced by getColors().
|
protected |
Definition at line 33 of file class.ilChart.php.
Referenced by addData().
|
protected |
Definition at line 32 of file class.ilChart.php.
|
protected |
Definition at line 30 of file class.ilChart.php.
|
protected |
Definition at line 34 of file class.ilChart.php.
Referenced by ilChartPie\parseGlobalOptions().
|
protected |
Definition at line 35 of file class.ilChart.php.
Referenced by getShadow().
|
protected |
Definition at line 38 of file class.ilChart.php.
Referenced by getHTML().
|
protected |
Definition at line 29 of file class.ilChart.php.
Referenced by ilChartPie\addCustomJS(), ilChartSpider\addCustomJS(), and initJS().
|
protected |
Definition at line 31 of file class.ilChart.php.
const ilChart::TYPE_GRID = 1 |
Definition at line 25 of file class.ilChart.php.
Referenced by SurveyMetricQuestionEvaluation\getChart(), SurveyMatrixQuestionEvaluation\getChart(), SurveyQuestionEvaluation\getChart(), ilSessionStatisticsGUI\getChart(), ilLPObjectStatisticsTypesTableGUI\getGraph(), ilLPObjectStatisticsDailyTableGUI\getGraph(), ilLPObjectStatisticsTableGUI\getGraph(), ilLPObjectStatisticsLPTableGUI\getGraph(), and ilWikiStatGUI\renderGraph().
const ilChart::TYPE_PIE = 2 |
Definition at line 26 of file class.ilChart.php.
const ilChart::TYPE_SPIDER = 3 |
Definition at line 27 of file class.ilChart.php.