tengo el siguiente código:Gráficos de Google - evitar mostrar valores negativos en el eje Y
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
['Year', 'People'],
['2010',0]
]);
// Create and draw the visualization.
new google.visualization.ColumnChart(document.getElementById('visualization')).
draw(data,
{title:"Yearly Coffee Consumption by Country",
width:600, height:400,
hAxis: {title: "Year"},
backgroundColor: 'none'
}
);
}
Lo que me da el siguiente cuadro
¿Cómo puedo hacer para evitar que se muestre valores negativos en el eje Y? He intentado agregar vAxis: {minValue:0}
sin ningún tipo de suerte.
Hay un parque infantil/caja de arena para estas tablas: Google Charts Playground
Ahora esto en el o su mano parece arreglar mi problema. ¡Gracias! – slarti42uk
esta es la respuesta correcta –
'viewWindowMode:" explicit "' ya no es necesaria ya que ahora está en desuso. https://developers.google.com/chart/interactive/docs/gallery/linechart#configuration-options – etoxin