I'm developing some testing with the google chart API. And I'm having a rather 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);
Result
AsyoucanseeontheX-axisitdisplays,correctthedateentered,howeveronthelabelitisdisplayed1dayretroactive.
Ifyounoticeinthistestthereisstillthecolumnwithrole:'annotation'
,inwhichIhadtobythehourstostayonthedayoftheXaxis,ifyouremovethehoursuntilthesameas%with_of%displaysretroactive.
Jsfiddle
link
Does anyone know if any configuration should be done to resolve this?
I've done a lot of research and found nothing about it.