Tiny values not showing in visualization.BarChart randomly

13 views
Skip to first unread message

Oscar Gardiazabal

unread,
Dec 30, 2016, 9:53:56 AM12/30/16
to Google Visualization API

Some light on this?


This is the code:

var opciones_riesgo_sensor = {
        title: "Ataques de Bajo riesgo detectados por el Sensor:",
        legend: {position: "bottom", textStyle: {color: "black", fontSize: 12}},
        chartArea: {width: "45%", left: 300},
        width: 640,
        vAxis: {title: "Ataques", titleTextStyle: {color: "red"}},
        fontName: "Arial",
        fontSize: 10,
        bar: {groupWidth: "90%"},
        backgroundColor: "#f8fbfc"
};

var arr = [["", "Detectados", "Bloqueados"], [...]];

        
var data = google.visualization.arrayToDataTable(arr);
        
var view = new google.visualization.DataView(data);

        view
.setColumns([0, 1,{
            calc
: "stringify",
            sourceColumn
: 1,
            type
: "string",
            role
: "annotation"
        
},
        
2,
        
{
            calc
: "stringify",
            sourceColumn
: 2,
            type
: "string",
            role
: "annotation"
        
}]);

        
var chart = new google.visualization.BarChart(document.getElementById("[...]"));

        opciones_riesgo_sensor
.title = "Ataques de Bajo riesgo detectados por el [...]";
        opciones_riesgo_sensor
.height = 100 + 28 * (arr.length - 1);
        chart
.draw(view, opciones_riesgo_sensor);
});


Thanks

Reply all
Reply to author
Forward
0 new messages