LinearGauge PHP Class Overview
The Kendo UI LinearGauge for PHP is a server-side wrapper for the Kendo UI LinearGauge widget.
The LinearGauge is part of Telerik UI for PHP, a
professional grade UI library with 90+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Getting Started
Configuration
Below are listed the steps for you to follow when configuring the Kendo UI LinearGauge 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 LinearGauge.
$gauge = new \Kendo\Dataviz\UI\LinearGauge('gauge');
$gauge->pointer(array('value' => 10))
->scale(array('min' => 0, 'max' => 100));
Step 3 Output the LinearGauge by echoing the result of the render
method.
echo $gauge->render();
Reference
Client-Side Instances
You are able to reference an existing LinearGauge instance via the jQuery.data()
. Once a reference is established, use the LinearGauge API to control its behavior.
// Put this after your Kendo LinearGauge for PHP render() call
<script>
$(function() {
// Notice that the Name() of the linearGauge is used to get its client-side instance
var gauge = $("#linearGauge").data("kendoLinearGauge");
gauge.value(20);
});
</script>