ashish-chopra / angular-gauge

A reusable gauge directive for Angular 1.x apps and dashboards
https://ashish-chopra.github.io/angular-gauge/
MIT License
95 stars 36 forks source link

added 2 new properties. negate & display value. this allows for few … #25

Closed rohan-buechner closed 7 years ago

rohan-buechner commented 7 years ago

…additional permutations when using this component.

Negate: purely for display, but the value must still be calculated as positive, eg when used for fridges, or cold values

Display Value: When measuring fuel or liquid, and you want an actual value in litres, but still want the chart to calculate in percentages

ashish-chopra commented 7 years ago

Don't need explain again. I saw your comments now

ashish-chopra commented 7 years ago

for case 2, there are two parameters (used and total). Use them instead of value. The Gauge will display range based on the percentage of used out of total, but display will show used value.

For case 1, based on my study, if i support two new parameters in new release, namely max and min, they go very well with value parameter in catering negative values and will become quite generic as well. And, what i observed, once min and max are introduced in the gauge, used and total will no longer be needed.

Any comments?

rohan-buechner commented 7 years ago

@ashish-chopra my only comment would be is that the current naming isn't obvious. (Will have to see the new release to see if that works better, for my use cases)

Something as display value cant be confused as to what its purpose is vs used and value, in its current form, im still not sure what each does unless I look into your code first.

ashish-chopra commented 7 years ago

@rohan-buchner , As said earlier, i introduced min, max attributes which works with value attribute just like <meter> element in HTML5. This would take care negative, positive, configurable ranges. Take an update to v2.0.0 to get this feature. Thanks for pointing this out earlier!!!