Speedometer, Velocimeter
How do I make an speedometer, velocimeter?
Trying to implement a car velocimeter using css+gauge.js. What is a speedometer, velocimeter? How do you make a speedometer, velocimeter? This script and codes were developed by Hélio Marcondes on 09 November 2022, Wednesday.
Speedometer, Velocimeter - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Speedometer, Velocimeter</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <canvas id="foo"></canvas>
<div class="zero">0</div>
<div class="twohundred">200</div>
<div class="wrap">
<button onclick="chamar()">Try</button> <input type="text" id="campo">Insert a number 0 ~ 200</div>
00 <script src='https://bernii.github.io/gauge.js/dist/gauge.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Speedometer, Velocimeter - Script Codes CSS Codes
*{ margin:0; padding:0;
}
#foo{ height:200px; width:400px;
}
.wrap{ position:absolute; top:210px; left:50px;
}
.zero{ position:absolute; top:165px; left:80px;
}
.twohundred{ position:absolute; top:165px; left:280px;
}
Speedometer, Velocimeter - Script Codes JS Codes
var opts = { lines: 12, // The number of lines to draw angle: 0.00, // The length of each line lineWidth: 0.44, // The line thickness pointer: { length: 0.5, // The radius of the inner circle strokeWidth: 0.035, // The rotation offset color: 'red' // Fill color }, limitMax: false, // If true, the pointer will not go past the end of the gauge colorStart: 'blue', // Colors colorStop: '#8FC0DA', // just experiment with them strokeColor: '#E0E0E0', // to see which ones work best for you generateGradient: true
};
var target = document.getElementById('foo'); // your canvas element
var gauge = new Gauge(target).setOptions(opts); // create sexy gauge!
gauge.maxValue = 200; // set max gauge value
gauge.animationSpeed = 32; // set animation speed (32 is default value)
function chamar(valor){ valor=document.getElementById("campo").value; gauge.set(valor); // set actual value
}
Developer | Hélio Marcondes |
Username | haykou |
Uploaded | November 09, 2022 |
Rating | 3 |
Size | 2,256 Kb |
Views | 40,480 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Flip CSS Animation with Logo | 1,797 Kb |
Search button expanding input submit | 2,065 Kb |
Simple way for icons inside input | 1,847 Kb |
Multi step form | 5,689 Kb |
Sticky Header using Jquery | 2,024 Kb |
Upload image with preview | 2,014 Kb |
Simple search using AngularJS | 1,802 Kb |
Introduction to three.js | 1,916 Kb |
Skill Bar with Jquery | 2,470 Kb |
Pure AngularJS Tabs | 2,067 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS only simple parallax scroll | Stanssongs | 3,708 Kb |
HTM5 picture dropzone | Jaysalvat | 2,576 Kb |
NAV WPMANAGER | Mstoic | 1,991 Kb |
Expert Help | SinceSidSlid | 4,064 Kb |
Haml Calendar | Katydecorah | 5,643 Kb |
Material design buttons | Fischaela | 4,381 Kb |
A Pen by John Malc | F789gh | 1,420 Kb |
This in constructor context | _shree33 | 1,718 Kb |
Swiftype Lower Third | Zumwalt | 4,796 Kb |
Simple Login Form | JoshBlackwood | 4,418 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!