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 |
Skill Bar with Jquery | 2,470 Kb |
Simple Jquery Slider | 2,430 Kb |
Bootstrap Menu with Effect | 2,121 Kb |
Text on fire | 1,941 Kb |
Simple search using AngularJS | 1,802 Kb |
Custom scrollbar crossbrowser | 5,348 Kb |
Simple Form with Icons | 2,071 Kb |
Search button expanding input submit | 2,065 Kb |
Flip CSS Animation with Logo | 1,797 Kb |
Introduction to three.js | 1,916 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 |
Chuck Norris Background | Manz | 1,967 Kb |
Improve | Gavra | 1,652 Kb |
A simple log in form made with css | Mayurelbhar | 2,160 Kb |
Rain Landing in a Pond | Edball | 3,009 Kb |
CSS Parent Selector | Tomhodgins | 2,143 Kb |
SVG email test v2.0 | M_J_Robbins | 2,090 Kb |
Calendar | Miroot | 2,033 Kb |
Toggle menu | Seyedi | 2,279 Kb |
Jstam.com Home Page | Jstam | 10,558 Kb |
CSS 3D Radio buttons | Andreasnylin | 1,650 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!