diff --git a/README.md b/README.md index 2550a2e..c6c9edf 100644 --- a/README.md +++ b/README.md @@ -178,10 +178,11 @@ pointerOptions: { Used to refresh Gauge value and max value -`refresh(val, max)` +`refresh(val, max, min)` - `val` : The Gauge value (required) - `max` : The Gauge Max value (optional) +- `min` : The Gauge Min value (optional) ### Destroy diff --git a/examples/refresh-minimum-maximum.html b/examples/refresh-minimum-maximum.html index 7a055af..61b5b4a 100644 --- a/examples/refresh-minimum-maximum.html +++ b/examples/refresh-minimum-maximum.html @@ -57,17 +57,17 @@ }); document.getElementById('g1_setmax100').addEventListener('click', function() { - g1.refresh(g1.originalValue, 20, 100); + g1.refresh(g1.originalValue, 100, 20); return false; }); document.getElementById('g1_setmax200').addEventListener('click', function() { - g1.refresh(g1.originalValue, 30, 200); + g1.refresh(g1.originalValue, 200, 30); return false; }); document.getElementById('g1_setmax400').addEventListener('click', function() { - g1.refresh(g1.originalValue, 5, 400); + g1.refresh(g1.originalValue, 400, 5); return false; }); diff --git a/justgage.js b/justgage.js index b7b93a9..b34dc30 100644 --- a/justgage.js +++ b/justgage.js @@ -795,7 +795,7 @@ JustGage = function(config) { }; /** Refresh gauge level */ -JustGage.prototype.refresh = function(val, min, max) { +JustGage.prototype.refresh = function(val, max, min) { var obj = this; var displayVal, color, max = max || null, min = min || null;