\Kendo\Dataviz\UI\ArcGauge

A PHP wrapper for Kendo UI ArcGauge.

Inherits from \Kendo\UI\Widget.

Usage

To use ArcGauge 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 ArcGauge

<?php
// Create a new instance of ArcGauge and specify its id
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');

// Configure it
$arcGauge->color('value')

// Output it

echo $arcGauge->render();
?>

Methods

centerTemplate

The label template. Template variables: * value - the value

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->centerTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->centerTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

color

The color of the value pointer. Accepts a valid CSS color string, including hex and rgb.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value string

Example

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->color('value');
?>

addColor

Adds one or more ArcGaugeColor to the ArcGauge.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value[, $value2, ...] \Kendo\Dataviz\UI\ArcGaugeColor |array

Example - using \Kendo\Dataviz\UI\ArcGaugeColor

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$color = new \Kendo\Dataviz\UI\ArcGaugeColor();
$color = 'value';
$color->color($color);
$arcGauge->addColor($color);
?>

Example - using array

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$color = 'value';
$arcGauge->addColor(array('color' => $color));
?>

Example - adding more than one ArcGaugeColor

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$first  = new \Kendo\Dataviz\UI\ArcGaugeColor();
$second = new \Kendo\Dataviz\UI\ArcGaugeColor();
$arcGauge->addColor($first, $second);
?>

gaugeArea

The gauge area configuration options. This is the entire visible area of the gauge.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value \Kendo\Dataviz\UI\ArcGaugeGaugeArea |array

Example - using \Kendo\Dataviz\UI\ArcGaugeGaugeArea

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$gaugeArea = new \Kendo\Dataviz\UI\ArcGaugeGaugeArea();
$background = 'value';
$gaugeArea->background($background);
$arcGauge->gaugeArea($gaugeArea);
?>

Example - using array

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$background = 'value';
$arcGauge->gaugeArea(array('background' => $background));
?>

opacity

The opacity of the value pointer.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value float

Example

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->opacity(1);
?>

renderAs

Specifies the preferred widget rendering mode.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value string

Example

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->renderAs('value');
?>

scale

Configures the scale.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value \Kendo\Dataviz\UI\ArcGaugeScale |array

Example - using \Kendo\Dataviz\UI\ArcGaugeScale

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$scale = new \Kendo\Dataviz\UI\ArcGaugeScale();
$endAngle = 1;
$scale->endAngle($endAngle);
$arcGauge->scale($scale);
?>

Example - using array

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$endAngle = 1;
$arcGauge->scale(array('endAngle' => $endAngle));
?>

theme

The gauge theme. This can be either a built-in theme or "sass". When set to "sass" the gauge 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\ArcGauge

Parameters

$value string

Example

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->theme('value');
?>

transitions

A value indicating if transition animations should be played.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value boolean

Example

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->transitions(true);
?>

value

The gauge value.

Returns

\Kendo\Dataviz\UI\ArcGauge

Parameters

$value float

Example

<?php
$arcGauge = new \Kendo\Dataviz\UI\ArcGauge('ArcGauge');
$arcGauge->value(1);
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy