Your search did not match any results.
Gauges

Value Indicators API

API Reference
This demo shows how to use the API of dxCircularGauge to change its value and subvalue indicators at runtime. The value and subvalues methods allow you to get and set a value or a set of subvalues for value or subvalue indicators respectively.
Copy to Codepen
Apply
Reset
$(function(){ var gauge = $("#gauge").dxCircularGauge({ scale: { startValue: 10, endValue: 40, tickInterval: 5, label: { customizeText: function (arg) { return arg.valueText + " kV"; } } }, tooltip: { enabled: true }, title: { text: "Generators Voltage (kV)", font: { size: 28 } }, value: 34, subvalues: [12, 23] }).dxCircularGauge("instance"); var mainGenerator = $("#main-generator").dxTextBox({ value: 34, width: 150 }).dxTextBox("instance"); var additionalGeneratorOne = $("#additional-generator-one").dxTextBox({ value: 12, width: 150 }).dxTextBox("instance"); var additionalGeneratorTwo = $("#additional-generator-two").dxTextBox({ value: 23, width: 150 }).dxTextBox("instance"); $("#edit").dxButton({ text: "Edit", onClick: function() { gauge.value(mainGenerator.option("value")); gauge.subvalues([additionalGeneratorOne.option("value"), additionalGeneratorTwo.option("value")]); } }); });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src="js/jquery-3.1.0.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.4/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.4/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/16.2.4/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/16.2.4/js/dx.all.js"></script> <link rel="stylesheet" type ="text/css" href ="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <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"> <div id="main-generator"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">Additional generator 1</div> <div class="dx-field-value"> <div id="additional-generator-one"></div> </div> </div> <div class="dx-field"> <div class="dx-field-label">Additional generator 2</div> <div class="dx-field-value"> <div id="additional-generator-two"></div> </div> </div> <div id="edit"></div> </div> <div id="gauge"></div> </div> </div> </body> </html>
.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; }