ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Chart\ScaleBar Namespace Reference

Functions

 base ()
 

description: > Example of rendering a base scale bar. More...

 
 ten_items ()
 

description: > Example for rendering a scale bar with ten items More...

 

Function Documentation

◆ base()

ILIAS\UI\examples\Chart\ScaleBar\base ( )


description: > Example of rendering a base scale bar.

expected output: > ILIAS shows four equal stripes with a label each: None, Low, Medium, High.

The "Medium" stripe is particularly highlighted. No stripe is clickable.

Definition at line 33 of file base.php.

References $c, $DIC, Vendor\Package\$f, and $renderer.

34 {
35  //Init Factory and Renderer
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39 
40  $c = $f->chart()->scaleBar(
41  array(
42  "None" => false,
43  "Low" => false,
44  "Medium" => true,
45  "High" => false
46  )
47  );
48 
49  //Render
50  return $renderer->render($c);
51 }
$renderer
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:22

◆ ten_items()

ILIAS\UI\examples\Chart\ScaleBar\ten_items ( )


description: > Example for rendering a scale bar with ten items

expected output: > ILIAS shows ten equal stripes with a number between 0-9 each.

Stripe "6" is particularly highlighted. No stripe is clickable.

Definition at line 33 of file ten_items.php.

References $c, $DIC, Vendor\Package\$f, and $renderer.

34 {
35  //Init Factory and Renderer
36  global $DIC;
37  $f = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39 
40  $c = $f->chart()->scaleBar(
41  array(
42  "0" => false,
43  "1" => false,
44  "2" => false,
45  "3" => false,
46  "4" => false,
47  "5" => false,
48  "6" => true,
49  "7" => false,
50  "8" => false,
51  "9" => false
52  )
53  );
54 
55  //Render
56  return $renderer->render($c);
57 }
$renderer
$c
Definition: deliver.php:25
global $DIC
Definition: shib_login.php:22