Awesome javascript animation dashboard implemented using HTML5 canvas: gauge. js? 1.1.2-

Source: Internet
Author: User
Today, we will share the implementation of the awesome animation dashboard from guage. js. This class library uses the html5 canvas to generate a dynamic custom dashboard. Not dependent on ...,.

Awesome javascript animation dashboard implemented using HTML5 canvas: gauge. js? 1.1.2

var opts = {  lines: 12, // The number of lines to draw  angle: 0.21, // The length of each line  lineWidth: 0.44, // The line thickness  pointer: {    length: 0.9, // The radius of the inner circle    strokeWidth: 0.108 // The rotation offset  },  colorStart: '#909090',   // Colors  colorStop: '#8FC0DA',    // just experiment with them  strokeColor: '#E0E0E0'   // to see which ones work best for you};var target = document.getElementById('foo'); // your canvas elementvar gauge = new Gauge(target).setOptions(opts); // create sexy gauge!gauge.maxValue = 3000; // set max gauge valuegauge.animationSpeed = 46; // set animation speed (32 is default value)gauge.set(650); // set actual value


If you use jQuery, you can use the following plug-in code:

$.fn.gauge = function(opts) {  this.each(function() {    var $this = $(this),        data = $this.data();     if (data.gauge) {      data.gauge.stop();      delete data.gauge;    }    if (opts !== false) {      data.gauge = new Gauge(this).setOptions(opts);    }  });  return this;};

If you want to quickly create a dynamic meter, gauge. js is definitely a good choice.


The above is the awesome javascript animation dashboard: gauge. js implemented using the HTML5 canvas? For more information about 1.1.2, see PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.