CircularGauge PHP Class Overview
The Kendo UI CircularGauge for PHP is a server-side wrapper for the Kendo UI CircularGauge widget.
Getting Started
Configuration
Below are listed the steps for you to follow when configuring the Kendo UI CircularGauge for PHP.
Step 1 Make sure you followed all the steps from the introductory article on Telerik UI for PHP—include the autoloader, JavaScript, and CSS files.
Step 2 Create a CircularGauge.
$gauge = new \Kendo\Dataviz\UI\CircularGauge('gauge');
$gauge->value(55)
->centerTemplate('Temperature')
->scale(array(
'min' => 0,
'max' => 140,
'majorTicks' => array(
'visible' => true
),
'minorTicks' => array(
'visible' => true
),
'labels' => array(
'visible' => true
)
));
Step 3 Output the CircularGauge by echoing the result of the render
method.
echo $gauge->render();
Reference
Client-Side Instances
You are able to reference an existing CircularGauge instance via the jQuery.data()
. Once a reference is established, use the CircularGauge API to control its behavior.
// Put this after your Kendo CircularGauge for PHP render() call
<script>
$(function() {
// Notice that the Name() of the circularGauge is used to get its client-side instance
var gauge = $("#circularGauge").data("kendoCircularGauge");
gauge.value(20);
});
</script>