class Chart extends UIComponent

Constants

SYSTEM_TEMPLATE_UI_FOLDER

Properties

$xf_link from  UIComponent
$link_id from  UIComponent
array $GPvars from  UIComponent
Controller $mod from  UIComponent
protected array $local_template_marker from  UIComponent
protected $_overwrite_param_array
protected bool|array|ModelCollection $marker_content from  UIComponent
string $mod_object_manager from  UIComponent
protected bool $_orig_marker_content from  UIComponent
protected array $_allowed_params_filter from  UIComponent
string $unique_dom_id from  UIComponent
protected string $uid from  UIComponent
string read-only $_content

When used in template this property will contain the XML/HTML within the XUI Nodes

from  UIComponent
protected $default_options
protected $xtag_params
$width
$height
$alt
$gradient_fill
$title
$x_axis_label
$y_axis_label
$custom_tooltip
$x_axis_label_vertical
$x_axis_label_steps
array $x_axis_interpolation

Values that are not within the specified timespan are cropped BUT are used for internal functions

string $x_axis_date_format

if passed labels are timestamps set this option to date() format string (e.g. 'd.m.Y')

array $palette

Colour Palette to use

int $ofc_chart_version

Use version 1 for best compatibility Use version 2 for advanced features, like on-click or gradient-fill

int $y_axis_init_scale_value

Use to set an Y-Scale value indipendent from given data array.

bool $set_labels_explicit

set values explicit - prevent labels from beeing float values

Methods

__construct(string $id = false, array $options = array())

Construct new Chart Object

string
__toString()

No description

add_data_cb(array $cb, array $params)

Add datacallback The callback Function is expected to return an array like this: array('values'=>array(1,2,3,4),'labels'=>array('test','label','goes','here'))

add_dataset(string $label, array $values, $links = array())

Adds a new dataset to the chart

mixed
get($var)

Get Variable / Option

string
get_unique_dom_id()

Generates a unique dom id, dependent on the provided UID, as well as the current context.

Template|null
get_view(string|bool $section = false)

Return new template view If using within module xui the tpl file should be named [class_name].tpl e.g. xui_core_table.tpl within the module's template folder

init()

put your comment there.

string
parse_template(string $template_content, array|bool $marker_array = false)

No description

string|null
parse_template_cb_wrapper(mixed $matches)

No description

mixed|string
parse_xtag($xml_source)

No description

process()

Process Chart Will return JSON formatted data if requested by chart automatically

render()

Render Object

mixed
render_xtag_element()

No description

void
reset_marker_content()

restores original content of marker_content

void
set(mixed $var, mixed $value = false)

Set Variable / Option

void
set_array(mixed $member_array, mixed $vars)

Set Variable / Option for an array

set_custom_tooltip($tip)

No description

set_data_callback(array $cb)

Set datacallback The callback Function is expected to return an array like this: array('values'=>array(1,2,3,4),'labels'=>array('test','label','goes','here'))

set_gradient_fill(bool $enabled = true)

Set to true if you wish areas to be filled with slight gradient

set_labels($labels)

Sets the x-Axis values

void
set_marker_content(mixed $marker_content = false)

sets marker_content to passed data -> restore original content with reset_marker_content()

set_mod(mixed $mod)

Set link to owning module

set_params(string $id, array $options = array())

Set Chart params

void
set_render_params(mixed $input_params = array())

Used to inject params. Only allowed params will be used (see $allowed_params_filter)

set_type(string $type = 'bar')

Set Chart Type

Details

at line 109
__construct(string $id = false, array $options = array())

Construct new Chart Object

Parameters

string $id

(Unique Chart ID for this page)

array $options

Example array('type'=>'area','data_cb' => array($this, 'chart_data_cb'))

in UIComponent at line 324
string __toString()

No description

Return Value

string

at line 185
add_data_cb(array $cb, array $params)

Add datacallback The callback Function is expected to return an array like this: array('values'=>array(1,2,3,4),'labels'=>array('test','label','goes','here'))

Parameters

array $cb

format: array($object,'function')

array $params

parameter for callback function

at line 154
add_dataset(string $label, array $values, $links = array())

Adds a new dataset to the chart

Parameters

string $label
array $values
$links

in UIComponent at line 185
mixed get($var)

Get Variable / Option

Parameters

$var

Return Value

mixed

in UIComponent at line 202
string get_unique_dom_id()

Generates a unique dom id, dependent on the provided UID, as well as the current context.

Return Value

string

in UIComponent at line 289
Template|null get_view(string|bool $section = false)

Return new template view If using within module xui the tpl file should be named [class_name].tpl e.g. xui_core_table.tpl within the module's template folder

Parameters

string|bool $section

Name

Return Value

Template|null

Exceptions

Exception

in UIComponent at line 72
init()

put your comment there.

..

in UIComponent at line 221
string parse_template(string $template_content, array|bool $marker_array = false)

No description

Parameters

string $template_content

HTML Template

array|bool $marker_array

Markers and Values

Return Value

string

Parsed HTML Content

in UIComponent at line 234
string|null parse_template_cb_wrapper(mixed $matches)

No description

Parameters

mixed $matches

Return Value

string|null

in UIComponent at line 260
mixed|string parse_xtag($xml_source)

No description

Parameters

$xml_source

Return Value

mixed|string

Exceptions

ContentException

at line 208
process()

Process Chart Will return JSON formatted data if requested by chart automatically

at line 470
render()

Render Object

in UIComponent at line 268
mixed render_xtag_element()

No description

Return Value

mixed

in UIComponent at line 173
void reset_marker_content()

restores original content of marker_content

Return Value

void

in UIComponent at line 106
void set(mixed $var, mixed $value = false)

Set Variable / Option

Parameters

mixed $var

Name of Variable to Set (Alternative: Assoc-Array for multiple variables)

mixed $value

Value of Variable

Return Value

void

in UIComponent at line 122
void set_array(mixed $member_array, mixed $vars)

Set Variable / Option for an array

Parameters

mixed $member_array

Name of Variable to Set (Alternative: Assoc-Array for multiple variables)

mixed $vars

Value of Variable

Return Value

void

at line 199
set_custom_tooltip($tip)

No description

Parameters

$tip

at line 174
set_data_callback(array $cb)

Set datacallback The callback Function is expected to return an array like this: array('values'=>array(1,2,3,4),'labels'=>array('test','label','goes','here'))

Parameters

array $cb

format: array($object,'function')

at line 195
set_gradient_fill(bool $enabled = true)

Set to true if you wish areas to be filled with slight gradient

Parameters

bool $enabled

at line 164
set_labels($labels)

Sets the x-Axis values

Parameters

$labels

in UIComponent at line 165
void set_marker_content(mixed $marker_content = false)

sets marker_content to passed data -> restore original content with reset_marker_content()

Parameters

mixed $marker_content

Return Value

void

in UIComponent at line 90
set_mod(mixed $mod)

Set link to owning module

Parameters

mixed $mod

at line 131
Chart set_params(string $id, array $options = array())

Set Chart params

Parameters

string $id

(Unique Chart ID for this page)

array $options

Example array('type'=>'area','data_cb' => array($this, 'chart_data_cb'))

Return Value

Chart

in UIComponent at line 135
void set_render_params(mixed $input_params = array())

Used to inject params. Only allowed params will be used (see $allowed_params_filter)

Parameters

mixed $input_params

Return Value

void

at line 144
set_type(string $type = 'bar')

Set Chart Type

Parameters

string $type

valid values are: 'bar','pie','area','line', 'hbar'