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);
}
--
You received this message because you are subscribed to the Google Groups
"Google Visualization 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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/db6546b4-ded9-4c12-aecf-f6d419b4fd6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.