Minimalist gauge widget built using Raphael
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example
README.mdown
gauge.js
gauge.min.js

README.mdown

About

Minimalist gauge widget built using Raphael.

Gauge

Usage

Include Raphael and this library.

  window.onload = function() {

    /*
     * div       = div you want gauge rendered to
     * percent   = percentage you want rendered
     * fill      = background fill color
     * highlight = highlight color used for middle circle
     * opts      = extended attribute for the gauge
     */

    g = new gauge("gauge", 30, "#BED54E", "#063743", {"threshold":{"40":"yellow", "80":"red"}});

    setInterval(function() {
      g.update(Math.floor(Math.random() * (0 - 100 + 1) + 100));
    }, 3000);
  }