google.charts.load('current', {packages: ['corechart', 'bar']});
google.charts.setOnLoadCallback(drawAxisTickColors);
function drawAxisTickColors() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'City');
data.addColumn('number', 'Motivation Level');
data.addColumn('number', 'Energy Level');
data.addRows([
['A', 1, .25],
['B', 2, .5],
['C', 3, 1],
['D', 4, 2.25],
['E', 5, 2.25],
]);
var options = {
title: 'Motivation and Energy Level Throughout the Day',
focusTarget: 'category',
hAxis: {
title: 'City Name',
format: 'h:mm a',
viewWindow: {
min: [7, 30, 0],
max: [17, 30, 0]
},
textStyle: {
fontSize: 14,
color: '#053061',
bold: true,
italic: false
},
titleTextStyle: {
fontSize: 18,
color: '#053061',
bold: true,
italic: false
}
},
vAxis: {
title: 'Rating (scale of 1-10)',
textStyle: {
fontSize: 18,
color: '#67001f',
bold: false,
italic: false
},
titleTextStyle: {
fontSize: 18,
color: '#67001f',
bold: true,
italic: false
}
}
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}