Hello all!
Below is a code for timeline.
The problem is that dates on hAxis are always Sundays + in some cases Sundays are bold comparing to other dates on hAxis.
Is there any solution how to start weeks from Mondays?
function drawChart() {
var container = document.getElementById('visualization');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({
type: 'string',
id: 'Term'
});
dataTable.addColumn({
type: 'string',
id: 'Name'
});
dataTable.addColumn({
type: 'string',
role: 'style'
});
dataTable.addColumn({
type: 'datetime',
id: 'Start'
});
dataTable.addColumn({
type: 'datetime',
id: 'End'
});
dataTable.addRows([
['1', 'test1', 'color: #00f000;', new Date(2015, 11, 1), new Date(2015, 11, 21)],
['2', 'test2', 'color: #00ff00;', new Date(2015, 11, 1), new Date(2015, 11, 15)],
['3', 'test3', 'color: #00ff00;', new Date(2015, 11, 1), new Date(2015, 11, 31)],
['2', 'test2', 'color: #ffff00;', new Date(2015, 11, 1), new Date(2015, 11, 23)]
]);
var options = {
timeline: { showRawLabels: true, showBarLabels: false },
avoidOverlappingGridLines: false,
tooltip: {isHtml: true},
hAxis: {
format: 'd-MMM',
}
};
chart.draw(dataTable, options);
}