Chart
class Chart extends UIComponent
Constants
SYSTEM_TEMPLATE_UI_FOLDER |
|
Properties
Link | $xf_link | from UIComponent | |
string | $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 new Chart Object
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'))
Adds a new dataset to the chart
Generates a unique dom id, dependent on the provided UID, as well as the current context.
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
No description
Process Chart Will return JSON formatted data if requested by chart automatically
Render Object
Set Variable / Option for an array
No description
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 to true if you wish areas to be filled with slight gradient
Sets the x-Axis values
sets marker_content to passed data -> restore original content with reset_marker_content()
Set Chart params
Used to inject params. Only allowed params will be used (see $allowed_params_filter)
Set Chart Type
Details
at line 109
__construct(string $id = false, array $options = array())
Construct new Chart Object
in
UIComponent at line 324
string
__toString()
No description
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'))
at line 154
add_dataset(string $label, array $values, $links = array())
Adds a new dataset to the chart
in
UIComponent at line 185
mixed
get($var)
Get Variable / Option
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.
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
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
in
UIComponent at line 234
string|null
parse_template_cb_wrapper(mixed $matches)
No description
in
UIComponent at line 260
mixed|string
parse_xtag($xml_source)
No description
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
in
UIComponent at line 173
void
reset_marker_content()
restores original content of marker_content
in
UIComponent at line 106
void
set(mixed $var, mixed $value = false)
Set Variable / Option
in
UIComponent at line 122
void
set_array(mixed $member_array, mixed $vars)
Set Variable / Option for an array
at line 199
set_custom_tooltip($tip)
No description
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'))
at line 195
set_gradient_fill(bool $enabled = true)
Set to true if you wish areas to be filled with slight gradient
at line 164
set_labels($labels)
Sets the x-Axis values
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()
in
UIComponent at line 90
set_mod(mixed $mod)
Set link to owning module
at line 131
Chart
set_params(string $id, array $options = array())
Set Chart params
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)
at line 144
set_type(string $type = 'bar')
Set Chart Type