UNPKG

jqwidgets-framework

Version:

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

64 lines (60 loc) 2.84 kB
<!DOCTYPE html> <html lang="en"> <head> <title id='Description'>jqxGauge Fluid Size Example. The width and height of the Gauge in this demo are in Percentages.</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/jqxgauge.js"></script> <style> html, body { padding: 0; margin: 0; width: 100%; height: 100%; overflow: hidden; } </style> <script type="text/javascript"> $(document).ready(function () { $('#gaugeContainer').jqxGauge({ ranges: [{ startValue: 0, endValue: 55, style: { fill: '#4bb648', stroke: '#4bb648' }, endWidth: 5, startWidth: 1 }, { startValue: 55, endValue: 110, style: { fill: '#fbd109', stroke: '#fbd109' }, endWidth: 10, startWidth: 5 }, { startValue: 110, endValue: 165, style: { fill: '#ff8000', stroke: '#ff8000' }, endWidth: 13, startWidth: 10 }, { startValue: 165, endValue: 220, style: { fill: '#e02629', stroke: '#e02629' }, endWidth: 16, startWidth: 13 }], ticksMinor: { interval: 10, size: '5%' }, ticksMajor: { interval: 20, size: '9%' }, value: 0, width: '40%', height: '80%', colorScheme: 'scheme05', animationDuration: 1200 }); var count = 0; $("#changeSize").click(function () { count++; if (count % 2 == 0) { $('#gaugeContainer').jqxGauge({ width: 200, height: 300 }); } else { $('#gaugeContainer').jqxGauge({ width: 400, height: 500 }); } }); }); </script> </head> <body> <div id="gaugeContainer"></div> <button id="changeSize">Change Size</button> <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>