UNPKG

jqwidgets-framework

Version:

jQWidgets is an advanced Angular, Vue, Blazor, React, Web Components, jquery, ASP .NET MVC, Custom Elements and HTML5 UI framework.

94 lines (91 loc) 3.9 kB
<!DOCTYPE html> <html lang="en"> <head> <title id='Description'>jqxKnob with custom marks</title> <link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> <script type="text/javascript" src="../../../scripts/jquery-1.12.4.min.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxdraw.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxknob.js"></script> <script type="text/javascript" src="../../../jqwidgets/jqxnumberinput.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#container').jqxKnob({ value: -100, min: -100, max: 100, startAngle: 120, endAngle: 480, dragStartAngle: 120, dragEndAngle: 420, step: 0.5, snapToStep: true, rotation: 'clockwise', labels: { offset: '88%', step: 20, visible: true, formatFunction: function (label) { if (label == 0) return "Off"; if (label == -100) return "Min"; if (label == 100) return "Max"; return label; } }, marks: { colorRemaining: "#333", colorProgress: "#17a25d", offset: '75%', thickness: 2, size: '1%', majorSize: '1%', majorInterval: 10, minorInterval: 5 }, progressBar: { size: '70%', offset: '0%' }, spinner: { style: { fill: '#17a25d', stroke: '#17a25d' }, innerRadius: '65%', // specifies the inner Radius of the dial outerRadius: '70%' // specifies the outer Radius of the dial , marks: { colorRemaining: "#fff", colorProgress: "#fff", offset: '68%', thickness: 4, type: 'circle', size: '5%', majorSize: '5%', majorInterval: 20, minorInterval: 20 } }, dial: { style: { fill: '#17a25d', stroke: '#17a25d' }, innerRadius: '0%', // specifies the inner Radius of the dial outerRadius: '50%' // specifies the outer Radius of the dial }, pointer: { type: 'arrow', thickness: 25, style: { fill: "#ff6126", stroke: "#333" }, size: '60%', offset: '50%' } }); }); </script> </head> <body class='default'> <div id='container'> </div> <div style="position: absolute; bottom: 5px; right: 5px;"> <a href="https://www.jqwidgets.com/" alt="https://www.jqwidgets.com/"><img alt="https://www.jqwidgets.com/" title="https://www.jqwidgets.com/" src="https://www.jqwidgets.com/wp-content/design/i/logo-jqwidgets.png"/></a> </div> </body> </html>