Skip to content

Commit

Permalink
Fixed needle would no longer point passed the maxium value
Browse files Browse the repository at this point in the history
  • Loading branch information
tforssander committed Mar 15, 2017
1 parent e3093d7 commit 0e850a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ nv.models.gauge = function() {
}

function buildNeedlePath(value, range, cx, cy, min, max, radius) {
if (value > max) {
value = max;
}

var delta = range / 1;
var tailValue = value - (range * (1/(270/360)) / 2);

Expand Down

0 comments on commit 0e850a0

Please sign in to comment.