jqwidgets-framework
Version:
jQWidgets is an advanced jQuery, Angular, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
82 lines (77 loc) • 3.21 kB
HTML
<html lang="en">
<head>
<title id='Description'>Custom Element Knob SemiKnob</title>
<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" />
<meta name="description" content="This is an example of a semi Custom Element Knob." />
<link rel="stylesheet" href="../jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
<script type="text/javascript" src="../scripts/webcomponents-lite.min.js"></script>
<script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../jqwidgets/jqxcore.elements.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" src="../scripts/demos.js"></script>
<script>
JQXElements.settings['KnobSettings'] =
{
value: -100,
min: -100,
max: 100,
startAngle: 200,
endAngle: 340,
step: 0.5,
snapToStep: true,
dragStartAngle: 200,
dragEndAngle: 340,
rotation: 'clockwise',
labels: {
offset: '88%',
step: 20,
visible: true,
formatFunction: (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: '35%', // specifies the inner Radius of the dial
outerRadius: '70%' // specifies the outer Radius of the dial
},
pointer: {
type: 'line', thickness: 4, style: { fill: '#ff6126', stroke: '#333' },
size: '70%', offset: '0%'
}
};
</script>
</head>
<body>
<div class="example-description">
Custom element Knob with Draw Restrictions.
</div>
<jqx-knob settings='KnobSettings'>
</jqx-knob>
</body>
</html>