In Studio we can also used a Thingworx State definition.

Depending on the value of particular Thingworx Thing property the state will change the apearance of a value
Here in the example the value of Value Display widget is the dependent Field. Means this what is used to decide which state from the thingworx stated defintion is used for the display of the widget

Here is a sample definition for a Style definition :

Regarding to the question how to check a value in a code to execute a function depending on a value change - in this case you can use the Angular js watch construct - something like this:
////////////
$scope.$watch( // watch for the color setting
function() {
return $scope.app.params['testNUMber'];
}
,
function()
{ console.warn("$watch with nubmer= "+ $scope.app.params['testNUMber'])
$scope.setWidgetProp('gauge-1', 'hiddenValue', $scope.app.params['testNUMber'])
$scope.setWidgetProp('gauge-1', 'stateFormatValue','hiddenValue')
}
//end of the second function
);
This code will call the function when the parameter testNUMber will change its value
In this case it will set the value to hiddenValue /customized value/ this will determing the correct state for the guage display