Your search did not match any results.
Gauges

Value Indicators API

Documentation
This demo shows how to use the API of the CircularGauge to change its value and subvalue indicators at runtime. To get and set the values of the indicators, the value and subvalues methods are utilized.
<div id="gauge-demo"> <div class="dx-fieldset options"> <div class="dx-field"> <div class="dx-field-label">Main generator</div> <div class="dx-field-value"> @(Html.DevExtreme().NumberBox() .ID("main-generator") .Min(10) .Max(40) .Value(34) .Width(150) .ShowSpinButtons(true) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Additional generator 1</div> <div class="dx-field-value"> @(Html.DevExtreme().NumberBox() .ID("additional-generator-one") .Min(10) .Max(40) .Value(12) .Width(150) .ShowSpinButtons(true) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Additional generator 2</div> <div class="dx-field-value"> @(Html.DevExtreme().NumberBox() .ID("additional-generator-two") .Min(10) .Max(40) .Value(23) .Width(150) .ShowSpinButtons(true) ) </div> </div> @(Html.DevExtreme().Button() .Text("Apply") .OnClick(@<text> function() { var gauge = $("#gauge").dxCircularGauge("instance"); gauge.value($("#main-generator").dxNumberBox("option", "value")); gauge.subvalues([ $("#additional-generator-one").dxNumberBox("option", "value"), $("#additional-generator-two").dxNumberBox("option", "value") ]); } </text>) ) </div> @(Html.DevExtreme().CircularGauge() .ID("gauge") .Scale(s => s .StartValue(10) .EndValue(40) .TickInterval(5) .Label(l => l.CustomizeText(@<text> function (arg) { return arg.valueText + " kV"; } </text>)) ) .Tooltip(t => t.Enabled(true)) .Title(t => t .Text("Generators Voltage (kV)") .Font(f => f.Size(28)) ) .Value(34) .Subvalues(new double[] { 12, 23 }) ) </div>
using DevExtreme.MVC.Demos.Models.SampleData; using System.Collections.Generic; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class GaugesController : Controller { public ActionResult ValueIndicatorsAPI() { return View(); } } }
.options { width: 300px; float: right; } #gauge-demo { height: 440px; width: 100%; } .dx-fieldset { margin-left: 0; margin-right: 0; } .dx-field-value:not(.dx-switch):not(.dx-checkbox):not(.dx-button), .dx-field-value-static { width: 50%; } .dx-field-label { padding-right: 0; width: 50%; } #gauge { width: 60%; height: 100%; float: left; }