ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\Chart\ScaleBar Namespace Reference

Functions

 base ()
 
 ten_items ()
 

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.

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:26

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

◆ 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.

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}

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