lightview
Version:
Small, simple, powerful web UI and micro front end creation ... Great ideas from Svelte, React, Vue and Riot combined.
18 lines • 645 B
HTML
<head>
<title>Chart</title>
<link href="../components/gauge-repl.html" rel="module">
<script src="../../lightview.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="https://unpkg.com/json5@^2.0.0/dist/index.min.js"></script>
</head>
<body>
<l-gauge id="myGauge" style="max-width:750px" type="Gauge" label="Laptop" value="50"></l-gauge>
<script>
const gauge = document.getElementById("myGauge");
setInterval(function() {
gauge.setValue(40 + Math.round(60 * Math.random()));
}, 2500);
</script>
</body>
</html>