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