Skip to content

Release 1.0.4

Compare
Choose a tag to compare
@naikus naikus released this 30 Nov 06:24
· 53 commits to master since this release
335e00e

Fixed minor bugs

  • Value dial colour now shows for initial value
  • Positive min and max values now work correctly (e.g. min: 50, max: 150)
var gauge = Gauge( document.getElementById("gauge2"),  {
    min: 50, // +ve min value
    max: 150,
    dialStartAngle: 180,
    dialEndAngle: 0,
    value: 50, // The color is correctly shown now
    color: function(value) {
      if(value < 20) {
        return "#5ee432";
      }else if(value < 40) {
        return "#fffa50";
      }else if(value < 60) {
        return "#f7aa38";
      }else {
        return "#ef4655";
      }
    }
  }
);