1
I’m developing some test with the google Chart API.
And I’m having a somewhat peculiar problem.
Code
data = new google.visualization.DataTable();
data.addColumn({ type : 'date', label : 'Day' });
data.addColumn({ type : 'date', label : 'DayAnnotation', role : 'annotation' });
data.addColumn({ type : 'number', label : 'Total' });
data.addColumn({ type : 'number', label : 'Frete' });
data.addRow([ new Date('2015-06-01'), new Date('2015-06-01T23:00'), 24974.46, 10871 ]);
data.addRow([ new Date('2015-06-02'), new Date('2015-06-02T23:00'), 26075.61, 12485 ]);
data.addRow([ new Date('2015-06-03'), new Date('2015-06-03T23:00'), 41915.09, 22489 ]);
var options = {
title : 'Monthly Coffee Production by Country',
vAxis : { title : 'Cups' },
hAxis : { title : 'Month' },
seriesType : 'bars',
series : { 5: { type : 'line' } },
width : 500,
height : 300,
};
chart = new google.visualization['ComboChart'](Element);
chart.draw(data, options);
Upshot
As you can see in the X-axis it displays, correct the date informed, however the label is showing 1day retroactive.
If you notice in this test you still have the column with role : 'annotation'
, in which I had to put the hours to keep on the day of the X-axis, if I remove the hours until the same annotation
retroactive display.
Jsfiddle
Does anyone know if any configuration should be made to resolve this?
I’ve done a lot of research and I haven’t found anything about it.