I have the following graph that I generate using Google charts:
google.charts.load('current', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawStacked);
function drawStacked() {
var data = google.visualization.arrayToDataTable([
['Ativo', 'Qtd. de erros'],
<?php
$b = 0;
while($b < 5){
echo "['".$tabela['Papel'][$b].", ".$tabela['usuario'][$b]."',".$tabela['Tot_papel'][$b]."],";
$b++;
}
?>
]);
var options = {
title: 'Ranking qtd. de erros por ativos',
isStacked: true,
hAxis: {
title: 'Qtd de erros',
minValue: 0,
},
vAxis: {
title: 'Ativos'
}
};
var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
The% wired call:
<div id="chart_div" class="gogl" style="width: 600px; height: 300px"></div>
All this generates the following chart:
The bars go from left to right, I wanted the chart to be the mirror of what it is now, from right to left.