However, I can only get this result if I use a number for Day. If I try to plot with strings, I get this:
As you can see, the x labels are not aggregated. Here is my code - any help is appreciated. Thanks!
google.charts.load('current', {'packages':['scatter']});
google.charts.setOnLoadCallback(drawChart);
function drawChart () {
var data = new google.visualization.DataTable();
data.addColumn('number', 'Day');
data.addColumn('timeofday', 'Time of Day');
// S=1, M=2, T=3, W=4, T=5, F=6, S=7
// This works, but no labels...
/*
data.addRows([
[3, [0, 45, 0]],
[3, [11, 45, 0]],
[6, [21, 45, 0]],
[3, [12, 40, 0]],
[6, [11, 25, 0]],
[6, [10, 25, 0]],
[2, [11, 15, 0]]
]);
*/
// This doesn't work
data.addRows([
['Tuesday', [0, 45, 0]],
['Tuesday', [11, 45, 0]],
['Friday', [21, 45, 0]],
['Tuesday', [12, 40, 0]],
['Friday', [11, 25, 0]],
['Friday', [10, 25, 0]],
['Monday', [11, 15, 0]]
]);
var options = {
width: 800,
height: 500,
selectionMode: 'multiple',
aggregationTarget: 'category',
chart: {title: 'Timeline'},
axes: {x: {0: {side: 'bottom'}}}
};
var chart = new google.charts.Scatter(document.getElementById('scatter_top_x'));
chart.draw(data, options)
}