Javascript Gauge On Web Page, Example Code.
Posted: Wed Dec 09, 2015 4:19 pm
gauges demo,
Download and , upload your file manager on esp
"http://newmaan.com/gauge.min.js" ( javascript file)
paste this code,
Download and , upload your file manager on esp
"http://newmaan.com/gauge.min.js" ( javascript file)
paste this code,
Code: Select all
wprint |<!doctype html>|
wprint |<html>|
wprint |<head>|
wprint |<title>Gtest</title>|
wprint |<script src=/file?file=gauge.min.js></script>|
wprint |</head>|
wprint |<body>|
wprint |<canvas id="gauge1" width="400" height="400"|
wprint |data-type="canv-gauge"|
wprint |data-title="Speed"|
wprint |data-min-value="0"|
wprint |data-max-value="220"|
wprint |data-major-ticks="0 20 40 60 80 100 120 140 160 180 200 220"|
wprint |data-minor-ticks="2"|
wprint |data-stroke-ticks="true"|
wprint |data-units="Km/h"|
wprint |data-value-format="3.2"|
wprint |data-glow="true"|
wprint |data-animation-delay="10"|
wprint |data-animation-duration="200"|
wprint |data-animation-fn="bounce"|
wprint |data-colors-needle="#f00 #00f"|
wprint |data-highlights="0 30 #eee, 30 60 #ccc, 60 90 #aaa, 90 220 #eaa"|
wprint |data-onready="setInterval( function() { Gauge.Collection.get('gauge1').setValue( Math.random() * 220);}, 1000);"|
wprint |></canvas>|
wprint |<canvas data-type="canv-gauge" data-value="17.34"></canvas>|
wprint |<canvas width="300" height="300"|
wprint |data-type="canv-gauge"|
wprint |data-title="Hip-Hop"|
wprint |data-onready="setInterval( function() { Gauge.Collection[2].setValue( Math.random() * 100);}, 1000);"|
wprint |></canvas>|
wprint |<canvas width="200" height="200"|
wprint |data-type="canv-gauge"|
wprint |data-title="Negative Values"|
wprint |data-min-value="-50"|
wprint |data-max-value="50"|
wprint |data-onready="setInterval( function() { Gauge.Collection[3].setValue( (Math.random()*100) -50 );}, 1000);"|
wprint |></canvas>|
wprint |</body>|
wprint |</html>|