ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilChartPie.php
Go to the documentation of this file.
1 <?php
2 
23 class ilChartPie extends ilChart
24 {
25  public function getDataInstance(?int $a_type = null): ilChartData
26  {
27  return new ilChartDataPie();
28  }
29 
30  protected function isValidDataType(ilChartData $a_series): bool
31  {
32  return ($a_series instanceof ilChartDataPie);
33  }
34 
35  protected function addCustomJS(): void
36  {
37  $tpl = $this->tpl;
38 
39  $tpl->addJavaScript("assets/js/jquery.flot.pie.js");
40  }
41 
42  public function parseGlobalOptions(stdClass $a_options): void
43  {
44  // if no inner labels set, use legend
45  if (!isset($a_options->series->pie->label) &&
46  !$this->legend) {
47  $legend = new ilChartLegend();
48  $legend->setPosition("nw");
49  $this->setLegend($legend);
50  }
51  }
52 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parseGlobalOptions(stdClass $a_options)
getDataInstance(?int $a_type=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setPosition(string $a_position)
setLegend(ilChartLegend $a_legend)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ilChartLegend $legend
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isValidDataType(ilChartData $a_series)