After playing around with the jQuery Knob framework, I've realized that it was difficult to work with AngularJS dynamic values and decided to make my own arc/ knobs in pure CSS.
In the knob, I represent 3 values: minimum, maximum and current value, which should all be dynamic. The color of the knob changes when the value exceeds its range.
HTML:
<div class="{{getColor()}} arc arc_start"></div>
JS:
function getColor(){
if($scope.value > $scope.maximum){
return "arc_danger";
}
if($scope.value < $scope.minimum){
return "arc_gray";
}
return "arc_success";
}
Now, if the value is within the range, I want to illustrate it using a small knob cursor, similar to the one implemented in jQuery Knob.
This is the link to the plunkr, which illustrates what I want to achieve. http://plnkr.co/edit/Zb8bVih4hireLwNS3bfc?p=preview