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

change value dynamically #23

Closed husamawajan closed 7 years ago

husamawajan commented 7 years ago

thank you for your effort but how can i change the value dynamically ?

rohan-buechner commented 7 years ago

@husamawajan Erm... bind to it.

  <ng-gauge
   type="arch"
   thick="13"
   value="$ctrl.yourValue"
   cap="Static Title"
   foreground-color="#ff9800"
   background-color="rgba(255,255,255,0.3)"
   append="{{$ctrl.someAppend}}">
  </ng-gauge>

Then in your controller

   SomeService.getData()
   .then(function (data) {
     this.yourValue = data;
   });

only problem with this component is on every value refresh, it re-draws from 0...

ashish-chopra commented 7 years ago

Hi @husamawajan checkout in case you need to see a working example of the query you asked, check out the new website for the library at https://ashish-chopra.github.io/angular-gauge/ in Demos section.

Keep posting your issues/queries/feature requests/suggestions to improve the library.