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

"label" should accept controller's variables #60

Open Tails128 opened 6 years ago

Tails128 commented 6 years ago

Hi,

I'm facing a specific use-case: I am using a time which i want to display in minutes, but in order to keep the animation smooth I need to use the time as seconds (e.g: with max=1m i'd like to display 60 ticks). In order to do this I've set label-only=true and i am updating the label with something like this:

minutes = Math.ceil(seconds / 60);
label = '${minutes} m';

Currently the way to make this work is to: