function resfrescaSensores(){
    $("#sensor_container").html("");
    //genero los radiobuttons para seleccionar sensor
    var sensors = new Object();
    for(var hour in data){
        for(var name in data[hour]){
            if(sensors[name] == undefined){
                sensors[name] = name;
                var sel = ""
                var classSel = "";
                if(name == sensorPreferido){
                    sel = " checked='checked'";
                    classSel = " selected"
                }
                var radio = $("<div class='radio_file" + classSel + "'><label for='" + name + "'>" + name + "</label><input type='radio' name='sensors' value='" + name + "' id='" + name + "'"+ sel +" /></div>");
                $("#sensor_container").append(radio);
            }
        }
    }
    // y preparo que cuando se cambie la selección, recargue la tabla
    $("input:radio[name=sensors]").change(function(e){
        dataGraph.jgvJSONGraphic("changeProp", $(this).val(), window.data);
        sensorPreferido = $(this).val();
        $(".radio_file.selected").removeClass("selected");
        $(this).parent().addClass("selected");
    });    
}
//recarga los radio button de los sensores
recarga los radio button de los sensores
recarga los radio button de los sensores
function resfrescaSensores(){
    $("#sensor_container").html("");
    var sensors = new Object();
    for(var hour in data){
        for(var name in data[hour]){
            if(sensors[name] == undefined){
                sensors[name] = name;
                var sel = ""
                var classSel = "";
                if(name == sensorPreferido){
                    sel = " checked='checked'";
                    classSel = " selected"
                }
                var radio = $("<div class='radio_file" + classSel + "'><label for='" + name + "'>" + name + "</label><input type='radio' name='sensors' value='" + name + "' id='" + name + "'"+ sel +" /></div>");
                $("#sensor_container").append(radio);
            }
        }
    }
    $("input:radio[name=sensors]").change(function(e){
        dataGraph.jgvJSONGraphic("changeProp", $(this).val(), window.data);
        sensorPreferido = $(this).val();
        $(".radio_file.selected").removeClass("selected");
        $(this).parent().addClass("selected");
    });    
}
function resfrescaSensores ( ) { $ ( "#sensor_container" ) . html ( "" ) ; var sensors = new Object ( ) ; for ( var hour in data ) { for ( var name in data [ hour ] ) { if ( sensors [ name ] == undefined ) { sensors [ name ] = name ; var sel = "" var classSel = "" ; if ( name == sensorPreferido ) { sel = " checked='checked'" ; classSel = " selected" } var radio = $ ( "<div class='radio_file" + classSel + "'><label for='" + name + "'>" + name + "</label><input type='radio' name='sensors' value='" + name + "' id='" + name + "'" + sel + " /></div>" ) ; $ ( "#sensor_container" ) . append ( radio ) ; } } } $ ( "input:radio[name=sensors]" ) . change ( function ( e ) { dataGraph . jgvJSONGraphic ( "changeProp" , $ ( this ) . val ( ) , window . data ) ; sensorPreferido = $ ( this ) . val ( ) ; $ ( ".radio_file.selected" ) . removeClass ( "selected" ) ; $ ( this ) . parent ( ) . addClass ( "selected" ) ; } ) ; }
recarga los radio button de los sensores
recarga los radio button de los sensores
//genero los radiobuttons para seleccionar sensor // y preparo que cuando se cambie la selección, recargue la tabla