Edit this page

RadialGauge HtmlHelper Overview

The RadialGauge HtmlHelper extension is a server-side wrapper for the Kendo UI RadialGauge widget.

Configuration

Below are listed the steps for you to follow when configuring the Kendo UI RadialGauge.

  1. Make sure you followed all the steps from the introductory article on Telerik UI for ASP.NET MVC.

  2. Create a new action method which renders the view.

    Example
        public ActionResult Index()
        {
            return View();
        }
    
  3. Add a RadialGauge.

    Example
    
            <%: Html.Kendo().RadialGauge()
                    .Name("radialGauge") // The name of the radialGauge is mandatory. It specifies the "id" attribute of the widget.
                    .Scale(scale => scale
                        .Min(0) //Set the min value of the RadialGauge.
                        .Max(200) //Set the min value of the RadialGauge.
                    )
                    .Pointer(pointer => pointer
                        .Value(10) //Set the value of the RadialGauge.
                    )
            %>
    
    
            @(Html.Kendo().RadialGauge()
                  .Name("radialGauge") //The name of the RadialGauge is mandatory. It specifies the "id" attribute of the widget.
                  .Scale(scale => scale
                      .Min(0) // Set the min value of the RadialGauge.
                      .Max(200) // Set the min value of the RadialGauge.
                  )
                  .Pointer(pointer => pointer
                      .Value(10) //Set the value of the RadialGauge.
                  )
            )
    

Reference

Existing Instances

To reference an existing Kendo UI RadialGauge instance, use the jQuery.data() configuration option. Once a reference is established, use the RadialGauge API to control its behavior.

Example
    //Put this after your Kendo UI RadialGauge for ASP.NET MVC declaration.
    <script>
    $(function() {
        //Notice that the Name() of the RadialGauge is used to get its client-side instance.
        var gauge = $("#radialGauge").data("kendoRadialGauge");
    });
    </script>

See Also