A reusable gauge directive for Angular 1.x apps and dashboards
Contains contribution from the community. Thank you, everyone, for your helping hands.
Features:
If the gauge value changes, the gauge will not redraw from 0 as always. It moves differentially from current value to new value (increase or decrease based on new value as compared to current value). Thanks @karlmtc #40
label-only
mode is introduced. When set to true
it will show the text label only given in the label
attribute at the center of the gauge. Thanks @anunesse #45
fraction-size
is introduced. Angular Gauge uses number filter to display value at the center. fraction-size
provides the number of fraction digits to show. It is the same parameter that is passed to number filter. Thanks @karlmtc #44
Angular ~1.6.6 latest compatibility verified and example and website are updated to new version.
Bug Fixes
Merged pull request #37 to fix bower download issue. Rest is same as v2.1.0.
Introduced a much required feature - threshold based color ranges- in angular-gauge.
A new property thresholds
for <ng-gauge>
has been introduced that can take an object of key-value pairs. The key represents the threshold point (minimum value after which it takes the color represented by the value object); and value is an object that holds a color property. For more information checkout README's section
Configure Threshold Color Ranges
.
Issue #34 - not redrawing when drop to zero, fixed.
This is a major release 2.0.0 for angular-gauge library. It contains some breaking changes, if you are upgrading from 1.x versions.
min
attribute introduced to configure the minimum value of the gauge scale.max
attribute introduced to configure the maximum value of the gauge scale.value
attribute is now compatible with min
and max
attributes to display value within the range only.Do not use it in production, this is just for dummy purpose.
This version contains major performance and rendering improvement of gauge and eradicate all the gauge problems with equation, animation duration and overflow and underflow. Major highlights are given below:
NOTE: There is NO BREAKING CHANGE introduced in this release.
2
to 6
.#ffcc66
torgba(0, 150, 136, 1)
.#ccc
to rgba(0,0,0,0.1)
.font-weight
CSS property of text over the gauge (label text, append text, prepend text and value text) changed to normal
.duration
is set t 1200
. and now logic of using duration for animating frames is improved in the core algorithm.A patch release to include bug fixes:
duration
property added in the gauge to customize duration of gauge animation.ngGaugeProvider
. Checkout Global Defaults section in README.