Skip to content

gristmill/gauge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);
  }

About

Minimalist gauge widget built using Raphael

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published