My current code will only change dynamically the total. I would like to change the Max value dynamically as well, since the max value will change depending on the filter you apply.
The code is the following
    resource1=[
 "//cdn.jsdelivr.net/raphael/2.1.0/raphael-min.js",
 "//cdn.jsdelivr.net/justgage/1.0.1/justgage.min.js"
]
//add scripts to head
$.getScript(resource1[0],function(){
 $.getScript(resource1[1],init1)
})
init1 = function(){
  var h = new JustGage({
    id: "gaugeHoras", 
    value: parseInt($("TOTAL").text()), 
    min: 0,
    max: 30,
    title: "Horas"
  });  
    $("LISTBOX").click(function(){
    h.refresh(parseInt($("TOTAL").text()))
  })
}