JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://bernii.github.com/gauge.js/dist/gauge.min.js"></script>
<html>
<body>
<canvas id="foo"></canvas>
</body>
</html>
JavaScript
var opts = {
lines: 12, // The number of lines to draw
angle: 10, // The length of each line
lineWidth: 0.44, // The line thickness
pointer: {
length: 0.9, // The radius of the inner circle
strokeWidth: 0.035, // The rotation offset
color: '#000000' // Fill color
},
colorStart: '#6FADCF', // 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 = 3000; // set max gauge value
gauge.animationSpeed = 32; // set animation speed (32 is default value)
gauge.set(1250); // set actual value