\Kendo\Dataviz\UI\LinearGauge
A PHP wrapper for Kendo UI LinearGauge.
Inherits from \Kendo\UI\Widget.
Usage
To use LinearGauge in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo LinearGauge
<?php
// Create a new instance of LinearGauge and specify its id
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
// Configure it
$linearGauge->renderAs('value')
// Output it
echo $linearGauge->render();
?>
Methods
gaugeArea
The gauge area configuration options. This is the entire visible area of the gauge.
Returns
\Kendo\Dataviz\UI\LinearGauge
Parameters
$value \Kendo\Dataviz\UI\LinearGaugeGaugeArea|array
Example - using \Kendo\Dataviz\UI\LinearGaugeGaugeArea
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$gaugeArea = new \Kendo\Dataviz\UI\LinearGaugeGaugeArea();
$background = 'value';
$gaugeArea->background($background);
$linearGauge->gaugeArea($gaugeArea);
?>
Example - using array
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$background = 'value';
$linearGauge->gaugeArea(array('background' => $background));
?>
addPointerItem
Adds one or more LinearGaugePointerItem to the LinearGauge.
Returns
\Kendo\Dataviz\UI\LinearGauge
Parameters
$value[, $value2, ...] \Kendo\Dataviz\UI\LinearGaugePointerItem|array
Example - using \Kendo\Dataviz\UI\LinearGaugePointerItem
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$pointerItem = new \Kendo\Dataviz\UI\LinearGaugePointerItem();
$color = 'value';
$pointerItem->color($color);
$linearGauge->addPointerItem($pointerItem);
?>
Example - using array
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$color = 'value';
$linearGauge->addPointerItem(array('color' => $color));
?>
Example - adding more than one LinearGaugePointerItem
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$first = new \Kendo\Dataviz\UI\LinearGaugePointerItem();
$second = new \Kendo\Dataviz\UI\LinearGaugePointerItem();
$linearGauge->addPointerItem($first, $second);
?>
renderAs
Sets the preferred rendering engine. If it is not supported by the browser, the Gauge will switch to the first available mode.The supported values are: "svg" - renders the widget as inline SVG document, if available or "canvas" - renders the widget as a Canvas element, if available..
Returns
\Kendo\Dataviz\UI\LinearGauge
Parameters
$value string
Example
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$linearGauge->renderAs('value');
?>
scale
Configures the scale.
Returns
\Kendo\Dataviz\UI\LinearGauge
Parameters
$value \Kendo\Dataviz\UI\LinearGaugeScale|array
Example - using \Kendo\Dataviz\UI\LinearGaugeScale
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$scale = new \Kendo\Dataviz\UI\LinearGaugeScale();
$majorUnit = 1;
$scale->majorUnit($majorUnit);
$linearGauge->scale($scale);
?>
Example - using array
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$majorUnit = 1;
$linearGauge->scale(array('majorUnit' => $majorUnit));
?>
theme
The gauge theme. This can be either a built-in theme or "sass". When set to "sass" the chart will read the variables from the Sass-based themes.The supported values are: "sass" - special value, see notes; "black"; "blueopal"; "bootstrap"; "default"; "highcontrast"; "metro"; "metroblack"; "moonlight"; "silver" or "uniform".
Returns
\Kendo\Dataviz\UI\LinearGauge
Parameters
$value string
Example
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$linearGauge->theme('value');
?>
transitions
A value indicating if transition animations should be played.
Returns
\Kendo\Dataviz\UI\LinearGauge
Parameters
$value boolean
Example
<?php
$linearGauge = new \Kendo\Dataviz\UI\LinearGauge('LinearGauge');
$linearGauge->transitions(true);
?>