Help!
I'm trying to setup a ScatterChart to track double parking over the course
of the day. Here's my code:
var f2 = new google.visualization.DateFormat({ pattern: 'h:mm aa' });
var occ_by_time = {
data: new google.visualization.DataTable(),
options: {
title: 'Double Parking by Time of Day',
legend: 'none',
height: 200,
lineWidth: 2,
pointSize: 1,
hAxis: { format: 'h aa' },
vAxis: { minValue: 0 }
},
chart: new google.visualization.ScatterChart(document.getElementById(
'double-parking-chart'))
};
occ_by_time.data.addColumn('timeofday', 'Time');
occ_by_time.data.addColumn('number', 'Double Parkers');
for(var i = 0; i < data.length; i++) {
console.log(data[i]);
occ_by_time.data.addRow(data[i]);
}
f2.format(occ_by_time.data, 0);
occ_by_time.chart.draw(occ_by_time.data, occ_by_time.options);
For whatever reason, the vAxis minValue is being ignored - the chart starts
at -1 (most of the values in this dataset are 0). Why is this happening?
The code is taken directly
from
https://google-developers.appspot.com/chart/interactive/docs/gallery/columnchart#Configuration_Options
...
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.