From 7ae09f41e1293f21ffbb9d233e9daed52629885b Mon Sep 17 00:00:00 2001
From: berni
Date: Sun, 9 Mar 2014 13:19:40 +0100
Subject: [PATCH] advanced options sections, changelog update
---
index.html | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/index.html b/index.html
index 3c8020d..10497c0 100644
--- a/index.html
+++ b/index.html
@@ -97,7 +97,6 @@ Usage
color: '#000000' // Fill color
},
limitMax: 'false', // If true, the pointer will not go past the end of the gauge
-
colorStart: '0', // Colors
colorStop: '0', // just experiment with them
strokeColor: '0', // to see which ones work best for you
@@ -113,6 +112,18 @@ Usage
The Gauge
class handles drawing on canvas and starts the animation.
+Advanced options
+
+ -
+ Percentage color
+
If you want to control how Gauge behavaes in relation to the displayed value you can use the Guage option called percentColors. To use it add following entry to the options:
+
+percentColors = [[0.0, "#a9d70b" ], [0.50, "#f9c802"], [1.0, "#ff0000"]];
+
+ see working example at JSFiddle
+
+
+
jQuery plugin
Gauge.js does not require jQuery. Anyway, if you use jQuery you may use the following plugin:
@@ -151,6 +162,12 @@
Supported browsers
Changes
+Version 1.2.1 (9.03.2014)
+
+ - Proper handling of color params issue #47.
+ - Moved percentage color to example/docs + JSFiddle
+
+
Version 1.2 (16.08.2012)
- Prototype chain fix. See issue #7.
@@ -319,9 +336,7 @@ Contact
fdSlider.updateSlider('input-line-width');
fdSlider.updateSlider('input-font-size');
fdSlider.updateSlider('input-angle');
- $("#example").removeClass("donut");
- $("#example").removeClass("gauge");
- $("#example").addClass(type);
+ $("#example").removeClass("donut, gauge").addClass(type);
update();
});